更新
This commit is contained in:
parent
035d61cb33
commit
6a75c68a5d
@ -141,7 +141,7 @@ public class AppSwiperController extends BaseController
|
|||||||
{
|
{
|
||||||
LambdaQueryWrapper<ShopMallPartners> queryWrapper =new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<ShopMallPartners> queryWrapper =new LambdaQueryWrapper<>();
|
||||||
LoginUser user = SecurityFrameworkUtils.getLoginUser();
|
LoginUser user = SecurityFrameworkUtils.getLoginUser();
|
||||||
queryWrapper.eq(ShopMallPartners::getUserId,user.getId()).eq(ShopMallPartners::getType,"jc").eq(ShopMallPartners::getIsBanned,"0");
|
queryWrapper.orderByAsc(ShopMallPartners::getPartnerId).eq(ShopMallPartners::getType,"jc").eq(ShopMallPartners::getIsBanned,"0").last("limit 1");
|
||||||
ShopMallPartners partner = partnersService.getOne(queryWrapper);
|
ShopMallPartners partner = partnersService.getOne(queryWrapper);
|
||||||
if (ObjectUtil.isEmpty(partner)){
|
if (ObjectUtil.isEmpty(partner)){
|
||||||
return error("信息有误");
|
return error("信息有误");
|
||||||
|
@ -3,6 +3,7 @@ package cn.iocoder.yudao.module.inspection.controller;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||||
import cn.iocoder.yudao.module.inspection.service.AppInspectionPartnerService;
|
import cn.iocoder.yudao.module.inspection.service.AppInspectionPartnerService;
|
||||||
import cn.iocoder.yudao.module.shop.entity.ShopMallPartners;
|
import cn.iocoder.yudao.module.shop.entity.ShopMallPartners;
|
||||||
@ -43,6 +44,10 @@ public class InspectionEquInfoController extends BaseController
|
|||||||
public CommonResult list(Integer pageNum,Integer pageSize,InspectionEquInfo inspectionEquInfo) throws Exception {
|
public CommonResult list(Integer pageNum,Integer pageSize,InspectionEquInfo inspectionEquInfo) throws Exception {
|
||||||
|
|
||||||
Page page =new Page(pageNum,pageSize);
|
Page page =new Page(pageNum,pageSize);
|
||||||
|
if (ObjectUtil.isNull(inspectionEquInfo.getPartnerId())) {
|
||||||
|
ShopMallPartners partners = partnerService.shopInfoByUserId();
|
||||||
|
inspectionEquInfo.setPartnerId(partners.getPartnerId());
|
||||||
|
}
|
||||||
IPage<InspectionEquInfo> list = inspectionEquInfoService.selectInspectionEquInfoList(page,inspectionEquInfo);
|
IPage<InspectionEquInfo> list = inspectionEquInfoService.selectInspectionEquInfoList(page,inspectionEquInfo);
|
||||||
return success(list);
|
return success(list);
|
||||||
}
|
}
|
||||||
|
@ -92,6 +92,10 @@ public class InspectionInfoController extends BaseController {
|
|||||||
public CommonResult edit(@RequestBody InspectionInfo inspectionInfo) throws Exception {
|
public CommonResult edit(@RequestBody InspectionInfo inspectionInfo) throws Exception {
|
||||||
return toAjax(inspectionInfoService.updateInspectionInfo(inspectionInfo));
|
return toAjax(inspectionInfoService.updateInspectionInfo(inspectionInfo));
|
||||||
}
|
}
|
||||||
|
@PostMapping("/updateLeadMan")
|
||||||
|
public CommonResult updateLeadMan(@RequestBody InspectionInfo inspectionInfo){
|
||||||
|
return toAjax(inspectionInfoService.updateLeadMan(inspectionInfo));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@PostMapping("/del")
|
@PostMapping("/del")
|
||||||
|
@ -183,7 +183,7 @@ public class InspectionMallPartnersController extends BaseController {
|
|||||||
ShopMallPartners partner = new ShopMallPartners();
|
ShopMallPartners partner = new ShopMallPartners();
|
||||||
if (roles.contains("jcshop")){
|
if (roles.contains("jcshop")){
|
||||||
LambdaQueryWrapper<ShopMallPartners> queryWrapper =new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<ShopMallPartners> queryWrapper =new LambdaQueryWrapper<>();
|
||||||
queryWrapper.eq(ShopMallPartners::getUserId,user.getId()).eq(ShopMallPartners::getType,"jc").eq(ShopMallPartners::getIsBanned,"0");
|
queryWrapper.orderByAsc(ShopMallPartners::getPartnerId).eq(ShopMallPartners::getType,"jc").eq(ShopMallPartners::getIsBanned,"0").last("limit 1");
|
||||||
partner = shopMallPartnersService.getOne(queryWrapper);
|
partner = shopMallPartnersService.getOne(queryWrapper);
|
||||||
if (ObjectUtil.isEmpty(partner)){
|
if (ObjectUtil.isEmpty(partner)){
|
||||||
return;
|
return;
|
||||||
|
@ -163,4 +163,6 @@ public class InspectionInfo extends TenantBaseDO
|
|||||||
private String selectType;
|
private String selectType;
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String projectName;
|
private String projectName;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String leadManName;
|
||||||
}
|
}
|
||||||
|
@ -49,6 +49,13 @@ public interface IInspectionInfoService extends IService<InspectionInfo>
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int updateInspectionInfo(InspectionInfo inspectionInfo) throws Exception;
|
public int updateInspectionInfo(InspectionInfo inspectionInfo) throws Exception;
|
||||||
|
/**
|
||||||
|
* 修改引车员
|
||||||
|
*
|
||||||
|
* @param inspectionInfo 【请填写功能名称】
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateLeadMan(InspectionInfo inspectionInfo);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除【请填写功能名称】
|
* 批量删除【请填写功能名称】
|
||||||
|
@ -184,6 +184,8 @@ public class AppInspectionPartnerServiceImpl extends ServiceImpl<AppInspectionPa
|
|||||||
}else if (roles.contains("jcworker")){
|
}else if (roles.contains("jcworker")){
|
||||||
LambdaQueryWrapper<PartnerWorker> queryWrapperWork =new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<PartnerWorker> queryWrapperWork =new LambdaQueryWrapper<>();
|
||||||
queryWrapperWork.eq(PartnerWorker::getUserId,user.getId());
|
queryWrapperWork.eq(PartnerWorker::getUserId,user.getId());
|
||||||
|
queryWrapperWork.orderByAsc(PartnerWorker::getPartnerId);
|
||||||
|
queryWrapperWork.last("limit 1");
|
||||||
PartnerWorker worker = partnerWorkerService.getOne(queryWrapperWork);
|
PartnerWorker worker = partnerWorkerService.getOne(queryWrapperWork);
|
||||||
if (ObjectUtil.isEmpty(worker)){
|
if (ObjectUtil.isEmpty(worker)){
|
||||||
throw new Exception("信息有误");
|
throw new Exception("信息有误");
|
||||||
@ -1467,6 +1469,7 @@ public class AppInspectionPartnerServiceImpl extends ServiceImpl<AppInspectionPa
|
|||||||
if (ObjectUtil.isNotNull(info.getLeadManId())){
|
if (ObjectUtil.isNotNull(info.getLeadManId())){
|
||||||
AdminUserDO leadMan = adminUserService.getById(info.getLeadManId());
|
AdminUserDO leadMan = adminUserService.getById(info.getLeadManId());
|
||||||
res.setLeadManName(leadMan.getNickname());
|
res.setLeadManName(leadMan.getNickname());
|
||||||
|
res.setLeadManId(info.getLeadManId());
|
||||||
}else {
|
}else {
|
||||||
res.setLeadManName("");
|
res.setLeadManName("");
|
||||||
}
|
}
|
||||||
|
@ -332,6 +332,17 @@ public class InspectionInfoServiceImpl extends ServiceImpl<InspectionInfoMapper,
|
|||||||
return baseMapper.updateById(inspectionInfo);
|
return baseMapper.updateById(inspectionInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改引车员
|
||||||
|
*
|
||||||
|
* @param inspectionInfo 【请填写功能名称】
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateLeadMan(InspectionInfo inspectionInfo) {
|
||||||
|
return baseMapper.updateById(inspectionInfo);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除【请填写功能名称】
|
* 批量删除【请填写功能名称】
|
||||||
*
|
*
|
||||||
|
@ -196,7 +196,7 @@ public class InspectionWorkNodeServiceImpl extends ServiceImpl<InspectionWorkNod
|
|||||||
.eq(DlInspectionProject::getId, workNode.getProjectId()));
|
.eq(DlInspectionProject::getId, workNode.getProjectId()));
|
||||||
String stepTitle = "";
|
String stepTitle = "";
|
||||||
if (ObjectUtil.isNotNull(project)) {
|
if (ObjectUtil.isNotNull(project)) {
|
||||||
inspectionStepInfo.setTitle(project.getProjectName() + "项目检测完成");
|
inspectionStepInfo.setTitle(project.getProjectName());
|
||||||
} else {
|
} else {
|
||||||
inspectionStepInfo.setTitle("项目检测完成");
|
inspectionStepInfo.setTitle("项目检测完成");
|
||||||
}
|
}
|
||||||
|
@ -88,4 +88,6 @@ public class InspectionInfoVo {
|
|||||||
private String leadManName;
|
private String leadManName;
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
List<InspectionWorkNode> workNodes;
|
List<InspectionWorkNode> workNodes;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Long leadManId;
|
||||||
}
|
}
|
||||||
|
@ -275,7 +275,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
iwn.status AS workNodeStatus,
|
iwn.status AS workNodeStatus,
|
||||||
oi.order_no AS orderNo,
|
oi.order_no AS orderNo,
|
||||||
oi.phonenumber AS buyPhone,
|
oi.phonenumber AS buyPhone,
|
||||||
ip.project_name AS projectName
|
ip.project_name AS projectName,
|
||||||
|
su.nickname AS leadManName
|
||||||
FROM
|
FROM
|
||||||
inspection_info ii
|
inspection_info ii
|
||||||
LEFT JOIN
|
LEFT JOIN
|
||||||
@ -284,36 +285,40 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
order_info oi ON ii.inspection_order_id = oi.id
|
order_info oi ON ii.inspection_order_id = oi.id
|
||||||
LEFT JOIN
|
LEFT JOIN
|
||||||
inspection_project ip ON iwn.project_id = ip.id
|
inspection_project ip ON iwn.project_id = ip.id
|
||||||
|
LEFT JOIN
|
||||||
|
system_users su ON ii.lead_man_id = su.id
|
||||||
<where>
|
<where>
|
||||||
<!-- 工单负责人或角色ID匹配 -->
|
|
||||||
(ii.lead_man_id = #{inspectionInfo.leadManId}
|
|
||||||
OR iwn.role_id IN
|
|
||||||
<foreach collection="roleIds" item="roleId" open="(" separator="," close=")">
|
|
||||||
#{roleId}
|
|
||||||
</foreach>)
|
|
||||||
<!-- 车牌号模糊查询 -->
|
<!-- 车牌号模糊查询 -->
|
||||||
<if test="inspectionInfo.carNum != null">
|
<if test="inspectionInfo.carNum != null">
|
||||||
AND ii.car_num LIKE CONCAT('%', #{inspectionInfo.carNum}, '%')
|
AND ii.car_num LIKE CONCAT('%', #{inspectionInfo.carNum}, '%')
|
||||||
</if>
|
</if>
|
||||||
<!-- 待接受 -->
|
<!-- 待接受 -->
|
||||||
<if test="inspectionInfo.status == 1">
|
<if test="inspectionInfo.status == 1">
|
||||||
|
AND <!-- 工单负责人或角色ID匹配 -->
|
||||||
|
(ii.lead_man_id = #{inspectionInfo.leadManId}
|
||||||
|
OR iwn.role_id IN
|
||||||
|
<foreach collection="roleIds" item="roleId" open="(" separator="," close=")">
|
||||||
|
#{roleId}
|
||||||
|
</foreach>)
|
||||||
AND ii.status = '0'
|
AND ii.status = '0'
|
||||||
AND iwn.status = '0'
|
AND iwn.status = '0'
|
||||||
-- AND ii.now_order_num = iwn.order_num
|
-- AND ii.now_order_num = iwn.order_num
|
||||||
|
ORDER BY ii.create_time DESC
|
||||||
</if>
|
</if>
|
||||||
<!-- 进行中 -->
|
<!-- 进行中 -->
|
||||||
<if test="inspectionInfo.status == 2">
|
<if test="inspectionInfo.status == 2">
|
||||||
AND ii.status = '0'
|
AND ii.status = '0'
|
||||||
AND iwn.status = '1'
|
AND iwn.status = '1'
|
||||||
AND iwn.deal_user_id = #{inspectionInfo.dealUserId}
|
AND iwn.deal_user_id = #{inspectionInfo.dealUserId}
|
||||||
|
ORDER BY iwn.update_time DESC
|
||||||
</if>
|
</if>
|
||||||
<!-- 已完成 -->
|
<!-- 已完成 -->
|
||||||
<if test="inspectionInfo.status == 3">
|
<if test="inspectionInfo.status == 3">
|
||||||
AND iwn.status = '2'
|
AND iwn.status = '2'
|
||||||
AND iwn.deal_user_id = #{inspectionInfo.dealUserId}
|
AND iwn.deal_user_id = #{inspectionInfo.dealUserId}
|
||||||
|
ORDER BY iwn.update_time DESC
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
ORDER BY ii.create_time DESC
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
@ -21,9 +21,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</select>
|
</select>
|
||||||
<select id="selectListByRoleId" resultType="cn.iocoder.yudao.module.system.api.user.dto.UserDTO"
|
<select id="selectListByRoleId" resultType="cn.iocoder.yudao.module.system.api.user.dto.UserDTO"
|
||||||
parameterType="cn.iocoder.yudao.module.system.controller.admin.permission.vo.role.RolePageReqVO">
|
parameterType="cn.iocoder.yudao.module.system.controller.admin.permission.vo.role.RolePageReqVO">
|
||||||
select su.*
|
select distinct su.*
|
||||||
from system_user_role sr
|
from system_users su
|
||||||
left join system_users su on sr.user_id = su.id
|
left join system_user_role sr on su.id = sr.user_id
|
||||||
left join system_role sr2 on sr.role_id = sr2.id
|
left join system_role sr2 on sr.role_id = sr2.id
|
||||||
<where>
|
<where>
|
||||||
su.deleted = 0 and sr2.service_package_id = 'jiance'
|
su.deleted = 0 and sr2.service_package_id = 'jiance'
|
||||||
|
Loading…
Reference in New Issue
Block a user