更新
This commit is contained in:
parent
035d61cb33
commit
6a75c68a5d
@ -141,7 +141,7 @@ public class AppSwiperController extends BaseController
|
||||
{
|
||||
LambdaQueryWrapper<ShopMallPartners> queryWrapper =new LambdaQueryWrapper<>();
|
||||
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);
|
||||
if (ObjectUtil.isEmpty(partner)){
|
||||
return error("信息有误");
|
||||
|
@ -3,6 +3,7 @@ package cn.iocoder.yudao.module.inspection.controller;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.module.inspection.service.AppInspectionPartnerService;
|
||||
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 {
|
||||
|
||||
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);
|
||||
return success(list);
|
||||
}
|
||||
|
@ -92,6 +92,10 @@ public class InspectionInfoController extends BaseController {
|
||||
public CommonResult edit(@RequestBody InspectionInfo inspectionInfo) throws Exception {
|
||||
return toAjax(inspectionInfoService.updateInspectionInfo(inspectionInfo));
|
||||
}
|
||||
@PostMapping("/updateLeadMan")
|
||||
public CommonResult updateLeadMan(@RequestBody InspectionInfo inspectionInfo){
|
||||
return toAjax(inspectionInfoService.updateLeadMan(inspectionInfo));
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/del")
|
||||
|
@ -183,7 +183,7 @@ public class InspectionMallPartnersController extends BaseController {
|
||||
ShopMallPartners partner = new ShopMallPartners();
|
||||
if (roles.contains("jcshop")){
|
||||
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);
|
||||
if (ObjectUtil.isEmpty(partner)){
|
||||
return;
|
||||
|
@ -163,4 +163,6 @@ public class InspectionInfo extends TenantBaseDO
|
||||
private String selectType;
|
||||
@TableField(exist = false)
|
||||
private String projectName;
|
||||
@TableField(exist = false)
|
||||
private String leadManName;
|
||||
}
|
||||
|
@ -49,6 +49,13 @@ public interface IInspectionInfoService extends IService<InspectionInfo>
|
||||
* @return 结果
|
||||
*/
|
||||
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")){
|
||||
LambdaQueryWrapper<PartnerWorker> queryWrapperWork =new LambdaQueryWrapper<>();
|
||||
queryWrapperWork.eq(PartnerWorker::getUserId,user.getId());
|
||||
queryWrapperWork.orderByAsc(PartnerWorker::getPartnerId);
|
||||
queryWrapperWork.last("limit 1");
|
||||
PartnerWorker worker = partnerWorkerService.getOne(queryWrapperWork);
|
||||
if (ObjectUtil.isEmpty(worker)){
|
||||
throw new Exception("信息有误");
|
||||
@ -1467,6 +1469,7 @@ public class AppInspectionPartnerServiceImpl extends ServiceImpl<AppInspectionPa
|
||||
if (ObjectUtil.isNotNull(info.getLeadManId())){
|
||||
AdminUserDO leadMan = adminUserService.getById(info.getLeadManId());
|
||||
res.setLeadManName(leadMan.getNickname());
|
||||
res.setLeadManId(info.getLeadManId());
|
||||
}else {
|
||||
res.setLeadManName("");
|
||||
}
|
||||
|
@ -332,6 +332,17 @@ public class InspectionInfoServiceImpl extends ServiceImpl<InspectionInfoMapper,
|
||||
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()));
|
||||
String stepTitle = "";
|
||||
if (ObjectUtil.isNotNull(project)) {
|
||||
inspectionStepInfo.setTitle(project.getProjectName() + "项目检测完成");
|
||||
inspectionStepInfo.setTitle(project.getProjectName());
|
||||
} else {
|
||||
inspectionStepInfo.setTitle("项目检测完成");
|
||||
}
|
||||
|
@ -88,4 +88,6 @@ public class InspectionInfoVo {
|
||||
private String leadManName;
|
||||
@TableField(exist = false)
|
||||
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,
|
||||
oi.order_no AS orderNo,
|
||||
oi.phonenumber AS buyPhone,
|
||||
ip.project_name AS projectName
|
||||
ip.project_name AS projectName,
|
||||
su.nickname AS leadManName
|
||||
FROM
|
||||
inspection_info ii
|
||||
LEFT JOIN
|
||||
@ -284,36 +285,40 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
order_info oi ON ii.inspection_order_id = oi.id
|
||||
LEFT JOIN
|
||||
inspection_project ip ON iwn.project_id = ip.id
|
||||
LEFT JOIN
|
||||
system_users su ON ii.lead_man_id = su.id
|
||||
<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">
|
||||
AND ii.car_num LIKE CONCAT('%', #{inspectionInfo.carNum}, '%')
|
||||
</if>
|
||||
<!-- 待接受 -->
|
||||
<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 iwn.status = '0'
|
||||
-- AND ii.now_order_num = iwn.order_num
|
||||
ORDER BY ii.create_time DESC
|
||||
</if>
|
||||
<!-- 进行中 -->
|
||||
<if test="inspectionInfo.status == 2">
|
||||
AND ii.status = '0'
|
||||
AND iwn.status = '1'
|
||||
AND iwn.deal_user_id = #{inspectionInfo.dealUserId}
|
||||
ORDER BY iwn.update_time DESC
|
||||
</if>
|
||||
<!-- 已完成 -->
|
||||
<if test="inspectionInfo.status == 3">
|
||||
AND iwn.status = '2'
|
||||
AND iwn.deal_user_id = #{inspectionInfo.dealUserId}
|
||||
ORDER BY iwn.update_time DESC
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY ii.create_time DESC
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
@ -21,9 +21,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</select>
|
||||
<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">
|
||||
select su.*
|
||||
from system_user_role sr
|
||||
left join system_users su on sr.user_id = su.id
|
||||
select distinct su.*
|
||||
from system_users su
|
||||
left join system_user_role sr on su.id = sr.user_id
|
||||
left join system_role sr2 on sr.role_id = sr2.id
|
||||
<where>
|
||||
su.deleted = 0 and sr2.service_package_id = 'jiance'
|
||||
|
Loading…
Reference in New Issue
Block a user