diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/domain/LeaseUserBook.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/domain/LeaseUserBook.java index 1d09f53e..8e7a98b3 100644 --- a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/domain/LeaseUserBook.java +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/domain/LeaseUserBook.java @@ -34,6 +34,7 @@ public class LeaseUserBook { private Long companyId; private String parentName; private String typeName; + private String manageType; /** 图片路径 */ @ApiModelProperty(value = "图片路径") diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/mapper/TmTaskMapper.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/mapper/TmTaskMapper.java index a1e663fa..1f024dd5 100644 --- a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/mapper/TmTaskMapper.java +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/mapper/TmTaskMapper.java @@ -102,6 +102,7 @@ public interface TmTaskMapper { List getLeaseOutListByUser(TmTask task); List getLeaseDetailByParentId(TmTask record); + List getLeaseDetailByjjbz(TmTask record); List getMaTypeDetails(LeaseApplyDetails leaseApplyDetails); diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/service/impl/TmTaskServiceImpl.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/service/impl/TmTaskServiceImpl.java index 62e1f355..20efbf19 100644 --- a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/service/impl/TmTaskServiceImpl.java +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/service/impl/TmTaskServiceImpl.java @@ -140,9 +140,9 @@ public class TmTaskServiceImpl implements TmTaskService { } } //短信通知人员进行出库 - for (LeaseApplyDetails details:leaseApplyDetails) { + for (LeaseApplyDetails details : leaseApplyDetails) { //内部审核以后通知机具管理人进行出库 - smsNotification(details,record.getCode()); + smsNotification(details, record.getCode()); } } else if (record.getTaskStatus() == 32 && companyId != null) { @@ -222,22 +222,22 @@ public class TmTaskServiceImpl implements TmTaskService { } - private void smsNotification(LeaseApplyDetails details,String code) { + private void smsNotification(LeaseApplyDetails details, String code) { TmTask tmTask = new TmTask(); tmTask.setId(details.getParenntId().toString()); //获取机具所属人员 List leaseDetailByParent = tmTaskMapper.getUserByParenntId(tmTask); - for (TmTask tmTaskNew: leaseDetailByParent) { + for (TmTask tmTaskNew : leaseDetailByParent) { //对手机号进行处理,因为存在一种类型的机具归属多个人的情况 - log.info("短信通知人为:{}",tmTaskNew.getUserName()); - if (tmTaskNew.getPhoneNumber()!=null){ + log.info("短信通知人为:{}", tmTaskNew.getUserName()); + if (tmTaskNew.getPhoneNumber() != null) { String[] phoneNumberList = tmTaskNew.getPhoneNumber().split(","); - String message ="尊敬的用户,宁夏智慧仓储管理系统提醒您:您有一个领料单号为:"+code+"的领料申请待处理,请及时查看"; + String message = "尊敬的用户,宁夏智慧仓储管理系统提醒您:您有一个领料单号为:" + code + "的领料申请待处理,请及时查看"; for (int i = 0; i < phoneNumberList.length; i++) { try { remoteUserService.send(phoneNumberList[i], message); - }catch (Exception e){ - log.info("手机号为:{}发送短信失败",phoneNumberList[i]); + } catch (Exception e) { + log.info("手机号为:{}发送短信失败", phoneNumberList[i]); } } } @@ -287,7 +287,14 @@ public class TmTaskServiceImpl implements TmTaskService { */ @Override public List getLeaseAuditListByOne(TmTask record) { - List leaseDetailByParentId = tmTaskMapper.getLeaseDetailByParentId(record); + Set roles = SecurityUtils.getLoginUser().getRoles(); + if (roles.contains("jjbz") || roles.contains("fbz")) { + List leaseDetailByParentId = tmTaskMapper.getLeaseDetailByjjbz(record); + return leaseDetailByParentId; + } else { + List leaseDetailByParentId = tmTaskMapper.getLeaseDetailByParentId(record); + return leaseDetailByParentId; + } /* for (TmTask tmTask : leaseDetailByParentId) { if ("2".equals(tmTask.getManageType())) { List manageTypeByTypeId = tmTaskMapper.getManageTypeByTypeId(tmTask); @@ -295,7 +302,6 @@ public class TmTaskServiceImpl implements TmTaskService { tmTask.setOutboundType(manageTypeByTypeId); } }*/ - return leaseDetailByParentId; } /** diff --git a/sgzb-modules/sgzb-base/src/main/resources/mapper/app/LeaseUserBookMapper.xml b/sgzb-modules/sgzb-base/src/main/resources/mapper/app/LeaseUserBookMapper.xml index 846297da..e3b08f95 100644 --- a/sgzb-modules/sgzb-base/src/main/resources/mapper/app/LeaseUserBookMapper.xml +++ b/sgzb-modules/sgzb-base/src/main/resources/mapper/app/LeaseUserBookMapper.xml @@ -24,9 +24,10 @@ select lub.id, lub.user_id as userId, lub.type_id as typeId, - mt2.type_name as parentName, + mt2.type_name as parentName, mt.type_name as typeName, lub.book_num as bookNum, + mt.manage_type as manageType, lub.company_id as companyId from lease_user_book lub left join ma_type mt on lub.type_id = mt.type_id diff --git a/sgzb-modules/sgzb-base/src/main/resources/mapper/app/TmTaskMapper.xml b/sgzb-modules/sgzb-base/src/main/resources/mapper/app/TmTaskMapper.xml index b55ee650..23b32229 100644 --- a/sgzb-modules/sgzb-base/src/main/resources/mapper/app/TmTaskMapper.xml +++ b/sgzb-modules/sgzb-base/src/main/resources/mapper/app/TmTaskMapper.xml @@ -1045,23 +1045,22 @@ 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, + IFNULL(sum(lad.pre_num),0) as preCountNum, + IFNULL(sum(lad.al_num),0) as alNum, tt.update_time AS updateTimes - FROM + from lease_apply_info lai - LEFT JOIN tm_task tt ON lai.task_id = tt.task_id + 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 - LEFT JOIN ( SELECT mtk.type_id, mtk.user_id FROM ma_type_keeper mtk LEFT JOIN lease_apply_details lad1 ON lad1.type_id = mtk.type_id LIMIT 1 ) aa ON lad.type_id = aa.type_id - WHERE - tt.task_status IN ( 33, 34, 35 ) + 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 + WHERE tt.task_status in(33,34,35) - and aa.user_id = #{userId} + and mtk.user_id = #{userId} and tt.code like concat('%', #{code}, '%') @@ -1075,11 +1074,8 @@ and tt.task_status = #{taskStatus} - GROUP BY - lai.id - ORDER BY - tt.task_status, - tt.create_time DESC + GROUP BY lai.id + ORDER BY tt.task_status,tt.create_time desc + diff --git a/sgzb-modules/sgzb-base/src/main/resources/mapper/base/MaMachineTypeMapper.xml b/sgzb-modules/sgzb-base/src/main/resources/mapper/base/MaMachineTypeMapper.xml index 8dc79719..0678b2a9 100644 --- a/sgzb-modules/sgzb-base/src/main/resources/mapper/base/MaMachineTypeMapper.xml +++ b/sgzb-modules/sgzb-base/src/main/resources/mapper/base/MaMachineTypeMapper.xml @@ -281,7 +281,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" m.lease_price, m.eff_time, m.rent_price, m.buy_price, m.pay_price, m.level, m.rated_load, m.test_load, m.holding_time, m.warn_num, mtf.file_name photoName, mtf.file_url photoUrl, mtf2.file_name documentName, mtf2.file_url documentUrl, mtk.user_id keeperUserId, - su.nick_name keeperUserName, mtr.user_id repairUserId, su1.nick_name repairUserName,mpi.prop_id as propId, mpi.prop_name as propName, + GROUP_CONCAT(su.nick_name) as keeperUserName, mtr.user_id repairUserId, su1.nick_name repairUserName,mpi.prop_id as propId, mpi.prop_name as propName, m.del_flag, m.create_by, m.create_time, m.remark, m.company_id,m.fac_model as facModel from ma_type m @@ -294,6 +294,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" left join ma_type_repair mtr on m.type_id = mtr.type_id left join sys_user su1 on mtr.user_id = su1.user_id where m.type_id = #{typeId} and m.status = '0' + GROUP BY m.type_id diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/MaWhole.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/MaWhole.java index c88b336c..27397add 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/MaWhole.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/MaWhole.java @@ -1,9 +1,13 @@ package com.bonus.sgzb.material.domain; +import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.annotations.ApiModelProperty; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; +import org.springframework.format.annotation.DateTimeFormat; + +import java.util.Date; /** * 整套抱杆表单集合实体类 @@ -26,4 +30,18 @@ public class MaWhole { /** 配套数量 */ @ApiModelProperty(value = "配套数量") private Integer totalNum; + + /** 配套名称 */ + @ApiModelProperty(value = "配套名称") + private String wholeTypeName; + + /** 创建时间 */ + @ApiModelProperty(value = "创建时间") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date createTime; + /** 创建人 */ + @ApiModelProperty(value = "创建人") + private Integer createBy; + } diff --git a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/MaWholeSetMapper.xml b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/MaWholeSetMapper.xml index d73f50d1..f59d0b22 100644 --- a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/MaWholeSetMapper.xml +++ b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/MaWholeSetMapper.xml @@ -46,12 +46,18 @@ type_id, parent_id, part_num, + whole_type_name, + create_by, + create_time, status #{item.id}, #{item.parentId}, #{item.totalNum}, + #{item.wholeTypeName}, + #{item.createBy}, + #{item.createTime}, 1 @@ -76,6 +82,9 @@ JOIN ma_type mt2 ON mt2.type_id = mt.parent_id JOIN ma_type mt3 ON mt3.type_id = mt2.parent_id JOIN ma_type mt4 ON mt4.type_id = mt3.parent_id + WHERE + mt.`status` = '0' + AND mt.del_flag = '0' and ( mt2.type_name like concat('%', #{keyWord}, '%') or