宁夏试运行问题修改
This commit is contained in:
parent
67ea808d43
commit
4201951630
|
|
@ -457,7 +457,7 @@ public class TmTaskController extends BaseController {
|
||||||
return AjaxResult.error("参数错误");
|
return AjaxResult.error("参数错误");
|
||||||
}
|
}
|
||||||
if (SecurityUtils.getLoginUser() != null) {
|
if (SecurityUtils.getLoginUser() != null) {
|
||||||
Long userid = SecurityUtils.getLoginUser().getUserid();
|
Long userid = SecurityUtils.getLoginUser().getSysUser().getUserId();
|
||||||
task.setUserId(String.valueOf(userid));
|
task.setUserId(String.valueOf(userid));
|
||||||
}
|
}
|
||||||
if (task.getFlag() == 1) {
|
if (task.getFlag() == 1) {
|
||||||
|
|
|
||||||
|
|
@ -144,4 +144,6 @@ public interface TmTaskMapper {
|
||||||
int updateLeaseApplyInfoAuditInfoCq(@Param("record") LeaseApplyInfo leaseApplyInfo);
|
int updateLeaseApplyInfoAuditInfoCq(@Param("record") LeaseApplyInfo leaseApplyInfo);
|
||||||
|
|
||||||
int getDeptId(String createBy);
|
int getDeptId(String createBy);
|
||||||
|
|
||||||
|
List<TmTask> getLeaseOutListByjjbz(TmTask task);
|
||||||
}
|
}
|
||||||
|
|
@ -559,7 +559,13 @@ public class TmTaskServiceImpl implements TmTaskService {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<TmTask> getLeaseOutListByUser(TmTask task) {
|
public List<TmTask> getLeaseOutListByUser(TmTask task) {
|
||||||
return tmTaskMapper.getLeaseOutListByUser(task);
|
Set<String> roles = SecurityUtils.getLoginUser().getRoles();
|
||||||
|
if (roles.contains("jjbz") || roles.contains("fbz")) {
|
||||||
|
//机具班长和副班长可以出库机具设备
|
||||||
|
return tmTaskMapper.getLeaseOutListByjjbz(task);
|
||||||
|
}else {
|
||||||
|
return tmTaskMapper.getLeaseOutListByUser(task);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -1155,4 +1155,50 @@
|
||||||
<select id="getDeptId" resultType="java.lang.Integer">
|
<select id="getDeptId" resultType="java.lang.Integer">
|
||||||
select dept_id from sys_user where user_id = #{createBy}
|
select dept_id from sys_user where user_id = #{createBy}
|
||||||
</select>
|
</select>
|
||||||
|
<select id="getLeaseOutListByjjbz" 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
|
||||||
|
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}, '%')
|
||||||
|
</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 = 101
|
||||||
|
GROUP BY lai.id
|
||||||
|
ORDER BY tt.task_status,tt.create_time desc
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getMaUserList" resultType="com.bonus.sgzb.base.domain.WarehouseKeeper">
|
<select id="getMaUserList" resultType="com.bonus.sgzb.base.domain.WarehouseKeeper">
|
||||||
SELECT
|
SELECT distinct
|
||||||
su.user_id AS userId,
|
su.user_id AS userId,
|
||||||
su.nick_name AS userName
|
su.nick_name AS userName
|
||||||
FROM
|
FROM
|
||||||
|
|
|
||||||
|
|
@ -57,6 +57,18 @@ public class LeaseRecord{
|
||||||
@ApiModelProperty(value = "设备编码")
|
@ApiModelProperty(value = "设备编码")
|
||||||
@Excel(name = "设备编码")
|
@Excel(name = "设备编码")
|
||||||
private String maCode;
|
private String maCode;
|
||||||
|
/**
|
||||||
|
* 领料单号
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "领料单号")
|
||||||
|
@Excel(name = "领料单号")
|
||||||
|
private String code;
|
||||||
|
/**
|
||||||
|
* 车牌号
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "车牌号")
|
||||||
|
@Excel(name = "车牌号")
|
||||||
|
private String carCode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 计量单位
|
* 计量单位
|
||||||
|
|
|
||||||
|
|
@ -17,15 +17,15 @@ import java.util.List;
|
||||||
public class ApplyInfoServiceImpl implements ApplyInfoService {
|
public class ApplyInfoServiceImpl implements ApplyInfoService {
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private ApplyInfoMapper leaseApplyInfoMapper;
|
private ApplyInfoMapper applyInfoMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int genderLeaseCode(LeaseApplyInfo record) {
|
public int genderLeaseCode(LeaseApplyInfo record) {
|
||||||
return leaseApplyInfoMapper.insertSelective(record);
|
return applyInfoMapper.insertSelective(record);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<LeaseApplyInfo> selectIdByTaskId(Integer id) {
|
public List<LeaseApplyInfo> selectIdByTaskId(Integer id) {
|
||||||
return leaseApplyInfoMapper.selectIdByTaskId(id);
|
return applyInfoMapper.selectIdByTaskId(id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,27 +14,32 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<select id="getLeaseRecordList" resultType="com.bonus.sgzb.material.domain.LeaseRecord">
|
<select id="getLeaseRecordList" resultType="com.bonus.sgzb.material.domain.LeaseRecord">
|
||||||
SELECT mt2.type_name as typeName,
|
SELECT
|
||||||
mt.type_name as typeModelName,
|
mt2.type_name AS typeName,
|
||||||
bai.agreement_code as agreementCode,
|
mt.type_name AS typeModelName,
|
||||||
mm.ma_code as maCode,
|
bai.agreement_code AS agreementCode,
|
||||||
mt.unit_name as unit,
|
mm.ma_code AS maCode,
|
||||||
lod.out_num as preNum,
|
mt.unit_name AS unit,
|
||||||
su.nick_name as leasePerson,
|
lod.out_num AS preNum,
|
||||||
lod.create_time as createTime,
|
lai.`code` AS code,
|
||||||
bpl.lot_name as proName,
|
su.nick_name AS leasePerson,
|
||||||
bui.unit_name as unitName
|
lod.create_time AS createTime,
|
||||||
FROM lease_out_details lod
|
bpl.lot_name AS proName,
|
||||||
LEFT JOIN lease_apply_info lai on lai.id = lod.parent_id
|
lod.car_code AS carCode,
|
||||||
LEFT JOIN tm_task_agreement tta on tta.task_id = lai.task_id
|
bui.unit_name AS unitName
|
||||||
LEFT JOIN bm_agreement_info bai on bai.agreement_id = tta.agreement_id
|
FROM
|
||||||
LEFT JOIN bm_project_lot bpl on bpl.lot_id = bai.project_id
|
lease_out_details lod
|
||||||
LEFT JOIN bm_unit_info bui on bui.unit_id = bai.unit_id
|
LEFT JOIN lease_apply_info lai ON lai.id = lod.parent_id
|
||||||
LEFT JOIN ma_type mt on mt.type_id = lod.type_id
|
LEFT JOIN tm_task_agreement tta ON tta.task_id = lai.task_id
|
||||||
LEFT JOIN ma_type mt2 on mt2.type_id = mt.parent_id
|
LEFT JOIN bm_agreement_info bai ON bai.agreement_id = tta.agreement_id
|
||||||
LEFT JOIN ma_machine mm on mm.ma_id = lod.ma_id
|
LEFT JOIN bm_project_lot bpl ON bpl.lot_id = bai.project_id
|
||||||
LEFT JOIN sys_user su on su.user_id = lai.lease_person
|
LEFT JOIN bm_unit_info bui ON bui.unit_id = bai.unit_id
|
||||||
where 1 = 1
|
LEFT JOIN ma_type mt ON mt.type_id = lod.type_id
|
||||||
|
LEFT JOIN ma_type mt2 ON mt2.type_id = mt.parent_id
|
||||||
|
LEFT JOIN ma_machine mm ON mm.ma_id = lod.ma_id
|
||||||
|
LEFT JOIN sys_user su ON su.user_id = lai.lease_person
|
||||||
|
WHERE
|
||||||
|
1 = 1
|
||||||
<if test="keyWord != null and keyWord != ''">
|
<if test="keyWord != null and keyWord != ''">
|
||||||
and (bai.agreement_code like concat('%',#{keyWord},'%') or
|
and (bai.agreement_code like concat('%',#{keyWord},'%') or
|
||||||
mm.ma_code like concat('%',#{keyWord},'%') or
|
mm.ma_code like concat('%',#{keyWord},'%') or
|
||||||
|
|
|
||||||
|
|
@ -374,7 +374,8 @@ public class SysUserController extends BaseController {
|
||||||
*/
|
*/
|
||||||
@GetMapping("/getUserByRoleList")
|
@GetMapping("/getUserByRoleList")
|
||||||
public AjaxResult getUserByRoleList(SysUser sysUser) {
|
public AjaxResult getUserByRoleList(SysUser sysUser) {
|
||||||
return success(userService.getUserByRoleList(sysUser));
|
List<SysUser> userByRoleList = userService.getUserByRoleList(sysUser);
|
||||||
|
return success(userByRoleList);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -144,6 +144,30 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<select id="checkEmailUnique" parameterType="String" resultMap="SysUserResult">
|
<select id="checkEmailUnique" parameterType="String" resultMap="SysUserResult">
|
||||||
select user_id, email from sys_user where email = #{email} and del_flag = '0' limit 1
|
select user_id, email from sys_user where email = #{email} and del_flag = '0' limit 1
|
||||||
</select>
|
</select>
|
||||||
|
<select id="selectUserByRole" resultType="com.bonus.sgzb.system.api.domain.SysUser">
|
||||||
|
SELECT DISTINCT
|
||||||
|
u.user_id,
|
||||||
|
u.dept_id,
|
||||||
|
u.nick_name as userName,
|
||||||
|
u.email,
|
||||||
|
u.avatar,
|
||||||
|
u.phonenumber,
|
||||||
|
u.sex,
|
||||||
|
u.STATUS,
|
||||||
|
u.del_flag,
|
||||||
|
u.login_ip,
|
||||||
|
u.login_date,
|
||||||
|
u.create_by,
|
||||||
|
u.create_time,
|
||||||
|
u.remark
|
||||||
|
FROM
|
||||||
|
sys_user u
|
||||||
|
LEFT JOIN sys_user_role sur ON u.user_id = sur.user_id
|
||||||
|
WHERE
|
||||||
|
u.STATUS = '0'
|
||||||
|
AND u.del_flag = '0'
|
||||||
|
AND sur.role_id IN (133,134)
|
||||||
|
</select>
|
||||||
|
|
||||||
<insert id="insertUser" parameterType="com.bonus.sgzb.system.api.domain.SysUser" useGeneratedKeys="true" keyProperty="userId">
|
<insert id="insertUser" parameterType="com.bonus.sgzb.system.api.domain.SysUser" useGeneratedKeys="true" keyProperty="userId">
|
||||||
insert into sys_user(
|
insert into sys_user(
|
||||||
|
|
@ -224,15 +248,5 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</foreach>
|
</foreach>
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<select id="selectUserByRole" resultMap="SysUserResult">
|
|
||||||
select u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber,
|
|
||||||
u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time,
|
|
||||||
u.remark
|
|
||||||
from sys_user u
|
|
||||||
left join sys_user_role sur on u.user_id = sur.user_id
|
|
||||||
where u.status = '0' and u.del_flag = '0'
|
|
||||||
<if test="roleId != null" >
|
|
||||||
and sur.role_id = #{roleId}
|
|
||||||
</if>
|
|
||||||
</select>
|
|
||||||
</mapper>
|
</mapper>
|
||||||
Loading…
Reference in New Issue