Merge branch 'dev-nx' of http://192.168.0.56:3000/bonus/devicesmgt into dev-nx
This commit is contained in:
commit
e64e333dc9
|
|
@ -34,6 +34,7 @@ public class LeaseUserBook {
|
|||
private Long companyId;
|
||||
private String parentName;
|
||||
private String typeName;
|
||||
private String manageType;
|
||||
|
||||
/** 图片路径 */
|
||||
@ApiModelProperty(value = "图片路径")
|
||||
|
|
|
|||
|
|
@ -102,6 +102,7 @@ public interface TmTaskMapper {
|
|||
List<TmTask> getLeaseOutListByUser(TmTask task);
|
||||
|
||||
List<TmTask> getLeaseDetailByParentId(TmTask record);
|
||||
List<TmTask> getLeaseDetailByjjbz(TmTask record);
|
||||
|
||||
List<TmTask> getMaTypeDetails(LeaseApplyDetails leaseApplyDetails);
|
||||
|
||||
|
|
|
|||
|
|
@ -287,7 +287,14 @@ 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")) {
|
||||
List<TmTask> leaseDetailByParentId = tmTaskMapper.getLeaseDetailByjjbz(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);
|
||||
|
|
@ -295,7 +302,6 @@ public class TmTaskServiceImpl implements TmTaskService {
|
|||
tmTask.setOutboundType(manageTypeByTypeId);
|
||||
}
|
||||
}*/
|
||||
return leaseDetailByParentId;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@
|
|||
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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
<if test="userId != 1">
|
||||
and aa.user_id = #{userId}
|
||||
and mtk.user_id = #{userId}
|
||||
</if>
|
||||
<if test="code != null and code != ''">
|
||||
and tt.code like concat('%', #{code}, '%')
|
||||
|
|
@ -1075,11 +1074,8 @@
|
|||
<if test="taskStatus != null">
|
||||
and tt.task_status = #{taskStatus}
|
||||
</if>
|
||||
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
|
||||
</select>
|
||||
<select id="getLeaseDetailByParentId" resultType="com.bonus.sgzb.app.domain.TmTask">
|
||||
SELECT
|
||||
|
|
@ -1220,7 +1216,6 @@
|
|||
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 ma_type_keeper mtk on lad.type_id = mtk.type_id
|
||||
WHERE tt.task_status in(33,34,35)
|
||||
<if test="code != null and code != ''">
|
||||
and tt.code like concat('%', #{code}, '%')
|
||||
|
|
@ -1265,4 +1260,36 @@
|
|||
lad.parennt_id = #{id}
|
||||
GROUP BY lad.type_id
|
||||
</select>
|
||||
<select id="getLeaseDetailByjjbz" resultType="com.bonus.sgzb.app.domain.TmTask">
|
||||
SELECT
|
||||
lai.task_id as taskId,
|
||||
lad.id as id,
|
||||
lad.parennt_id as parentId,
|
||||
lad.pre_num - ifnull(lad.al_num,0) as outNum,
|
||||
lad.pre_num as preCountNum,
|
||||
ifnull(lad.al_num,0) as alNum,
|
||||
mt2.type_name as typeName,
|
||||
mt.type_name as typeModelName,
|
||||
mt.manage_type as manageType,
|
||||
mt.num as num,
|
||||
GROUP_CONCAT(su.user_name) as userName,
|
||||
lad.status as status,
|
||||
lad.type_id as typeId
|
||||
FROM
|
||||
lease_apply_details lad
|
||||
LEFT JOIN lease_apply_info lai on lad.parennt_id = lai.id
|
||||
LEFT JOIN ma_type mt on lad.type_id = mt.type_id
|
||||
LEFT JOIN ma_type mt2 on mt.parent_id = mt2.type_id
|
||||
LEFT JOIN ma_type_keeper mtk on lad.type_id = mtk.type_id
|
||||
LEFT JOIN sys_user su on mtk.user_id = su.user_id
|
||||
WHERE
|
||||
lad.parennt_id = #{id}
|
||||
<if test="userName != null and userName != ''">
|
||||
and su.user_name like concat('%', #{userName}, '%')
|
||||
</if>
|
||||
<if test="typeId != null and typeId != ''">
|
||||
and lad.type_id = #{typeId}
|
||||
</if>
|
||||
GROUP BY lad.type_id
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -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
|
||||
</select>
|
||||
|
||||
<update id="updateKeeperByTypeId">
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,12 +46,18 @@
|
|||
<if test="item.id != null">type_id,</if>
|
||||
<if test="item.parentId != null">parent_id,</if>
|
||||
<if test="item.totalNum != null">part_num,</if>
|
||||
<if test="item.wholeTypeName != null">whole_type_name,</if>
|
||||
<if test="item.createBy != null">create_by,</if>
|
||||
<if test="item.createTime != null">create_time,</if>
|
||||
status
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="item.id != null">#{item.id},</if>
|
||||
<if test="item.parentId != null">#{item.parentId},</if>
|
||||
<if test="item.totalNum != null">#{item.totalNum},</if>
|
||||
<if test="item.wholeTypeName != null">#{item.wholeTypeName},</if>
|
||||
<if test="item.createBy != null">#{item.createBy},</if>
|
||||
<if test="item.createTime != null">#{item.createTime},</if>
|
||||
1
|
||||
</trim>
|
||||
</foreach>
|
||||
|
|
@ -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'
|
||||
<if test="keyWord != null and keyWord != ''">
|
||||
and (
|
||||
mt2.type_name like concat('%', #{keyWord}, '%') or
|
||||
|
|
|
|||
Loading…
Reference in New Issue