1
This commit is contained in:
parent
971ea9dfb2
commit
a677056951
@ -6,6 +6,7 @@ import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
|||||||
import cn.iocoder.yudao.framework.security.core.LoginUser;
|
import cn.iocoder.yudao.framework.security.core.LoginUser;
|
||||||
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
|
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
|
||||||
import cn.iocoder.yudao.module.inspection.vo.SysDictData;
|
import cn.iocoder.yudao.module.inspection.vo.SysDictData;
|
||||||
|
import cn.iocoder.yudao.module.label.vo.LabelRespVO;
|
||||||
import cn.iocoder.yudao.module.partner.entity.PartnerBalanceDetail;
|
import cn.iocoder.yudao.module.partner.entity.PartnerBalanceDetail;
|
||||||
import cn.iocoder.yudao.module.partner.entity.PartnerWorker;
|
import cn.iocoder.yudao.module.partner.entity.PartnerWorker;
|
||||||
import cn.iocoder.yudao.module.partner.service.IPartnerWorkerService;
|
import cn.iocoder.yudao.module.partner.service.IPartnerWorkerService;
|
||||||
@ -18,6 +19,7 @@ import cn.iocoder.yudao.module.system.service.dict.DictDataService;
|
|||||||
import cn.iocoder.yudao.module.system.service.dict.DictTypeService;
|
import cn.iocoder.yudao.module.system.service.dict.DictTypeService;
|
||||||
import cn.iocoder.yudao.util.StringUtils;
|
import cn.iocoder.yudao.util.StringUtils;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
import cn.iocoder.yudao.module.core.controller.BaseController;
|
import cn.iocoder.yudao.module.core.controller.BaseController;
|
||||||
@ -322,17 +324,16 @@ public class PartnerOwnController extends BaseController {
|
|||||||
* 获取员工信息
|
* 获取员工信息
|
||||||
*/
|
*/
|
||||||
@GetMapping("/getWorkList")
|
@GetMapping("/getWorkList")
|
||||||
public TableDataInfo getWorkList(Long partnerId,String workName,String phoneNum,Long postId,Integer pageNum,Integer pageSize)
|
public CommonResult<IPage<?>> getWorkList(Long partnerId, String workName, String phoneNum, Long postId, Integer pageNum, Integer pageSize)
|
||||||
{
|
{
|
||||||
LoginUser user = SecurityFrameworkUtils.getLoginUser();
|
LoginUser user = SecurityFrameworkUtils.getLoginUser();
|
||||||
ShopMallPartners partnersTmp = partnerList.getById(partnerId);
|
ShopMallPartners partnersTmp = partnerList.getById(partnerId);
|
||||||
if (!partnersTmp.getUserId().equals(user.getId())){
|
if (!partnersTmp.getUserId().equals(user.getId())){
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
// Page<PartnerWorker> page = new Page<>(pageNum, pageSize);
|
Page<LabelRespVO> page = new Page<>(pageNum, pageSize);
|
||||||
PageHelper.startPage(pageNum,pageSize);
|
IPage<PartnerWorker> workList = partnerList.pageWorkList(partnerId,postId, workName, phoneNum,page);
|
||||||
List<PartnerWorker> workList = partnerList.getWorkList(partnerId,postId, workName, phoneNum);
|
return CommonResult.success(workList);
|
||||||
return getDataTable(workList);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/delWorker")
|
@PostMapping("/delWorker")
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package cn.iocoder.yudao.module.inspection.mapper;
|
package cn.iocoder.yudao.module.inspection.mapper;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.module.label.vo.LabelRespVO;
|
||||||
import cn.iocoder.yudao.module.partner.entity.PartnerWorker;
|
import cn.iocoder.yudao.module.partner.entity.PartnerWorker;
|
||||||
import cn.iocoder.yudao.module.payment.entity.OrderInfo;
|
import cn.iocoder.yudao.module.payment.entity.OrderInfo;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
@ -9,6 +10,7 @@ import cn.iocoder.yudao.module.inspection.entity.ShopInspectionCategory;
|
|||||||
import cn.iocoder.yudao.module.inspection.query.PartnerListQuery;
|
import cn.iocoder.yudao.module.inspection.query.PartnerListQuery;
|
||||||
import cn.iocoder.yudao.module.inspection.vo.*;
|
import cn.iocoder.yudao.module.inspection.vo.*;
|
||||||
import cn.iocoder.yudao.module.shop.entity.ShopMallPartners;
|
import cn.iocoder.yudao.module.shop.entity.ShopMallPartners;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
@ -33,6 +35,7 @@ public interface AppInspectionPartnerMapper extends BaseMapper<ShopMallPartners>
|
|||||||
List<GoodsVo> manageGoodsList(@Param("partnerId") Long partnerId, @Param("isListing")String isListing,@Param("goodsTitle") String goodsTitle);
|
List<GoodsVo> manageGoodsList(@Param("partnerId") Long partnerId, @Param("isListing")String isListing,@Param("goodsTitle") String goodsTitle);
|
||||||
List<OrderAppDetail> orderList(@Param("partnerId") Long partnerId, @Param("phoneNum") String phoneNum,@Param("title") String title);
|
List<OrderAppDetail> orderList(@Param("partnerId") Long partnerId, @Param("phoneNum") String phoneNum,@Param("title") String title);
|
||||||
List<PartnerWorker> getWorkList(@Param("partnerId")Long partnerId, @Param("postId") Long postId, @Param("workName") String workName, @Param("phoneNum")String phoneNum);
|
List<PartnerWorker> getWorkList(@Param("partnerId")Long partnerId, @Param("postId") Long postId, @Param("workName") String workName, @Param("phoneNum")String phoneNum);
|
||||||
|
IPage<PartnerWorker> pageWorkList(@Param("partnerId")Long partnerId, @Param("postId") Long postId, @Param("workName") String workName, @Param("phoneNum")String phoneNum,Page<LabelRespVO> page);
|
||||||
List<InspectionInfo> inspectionList(Page<InspectionInfo> page,@Param("partnerId")Long partnerId, @Param("status") String status, @Param("carNum")String carNum);
|
List<InspectionInfo> inspectionList(Page<InspectionInfo> page,@Param("partnerId")Long partnerId, @Param("status") String status, @Param("carNum")String carNum);
|
||||||
List<InspectionInfo> workerInspectionList(@Param("workerId")Long workerId,@Param("status") String status, @Param("searchValue")String searchValue);
|
List<InspectionInfo> workerInspectionList(@Param("workerId")Long workerId,@Param("status") String status, @Param("searchValue")String searchValue);
|
||||||
List<OrderInfo> validationList(@Param("partnerId") Long partnerId, @Param("searchValue") String searchValue);
|
List<OrderInfo> validationList(@Param("partnerId") Long partnerId, @Param("searchValue") String searchValue);
|
||||||
|
@ -1,11 +1,14 @@
|
|||||||
package cn.iocoder.yudao.module.inspection.service;
|
package cn.iocoder.yudao.module.inspection.service;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.module.label.vo.LabelPageReqVO;
|
||||||
|
import cn.iocoder.yudao.module.label.vo.LabelRespVO;
|
||||||
import cn.iocoder.yudao.module.partner.entity.PartnerBalance;
|
import cn.iocoder.yudao.module.partner.entity.PartnerBalance;
|
||||||
import cn.iocoder.yudao.module.partner.entity.PartnerBalanceDetail;
|
import cn.iocoder.yudao.module.partner.entity.PartnerBalanceDetail;
|
||||||
import cn.iocoder.yudao.module.partner.entity.PartnerWorker;
|
import cn.iocoder.yudao.module.partner.entity.PartnerWorker;
|
||||||
import cn.iocoder.yudao.module.payment.entity.OrderInfo;
|
import cn.iocoder.yudao.module.payment.entity.OrderInfo;
|
||||||
import cn.iocoder.yudao.module.system.dal.dataobject.dept.PostDO;
|
import cn.iocoder.yudao.module.system.dal.dataobject.dept.PostDO;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import cn.iocoder.yudao.module.inspection.entity.*;
|
import cn.iocoder.yudao.module.inspection.entity.*;
|
||||||
@ -62,6 +65,8 @@ public interface AppInspectionPartnerService extends IService<ShopMallPartners>
|
|||||||
void addWorker(Long partnerId,String realName,String phoneNum,Long postId) throws Exception;
|
void addWorker(Long partnerId,String realName,String phoneNum,Long postId) throws Exception;
|
||||||
List<PartnerWorker> getWorkList(Long partnerId, Long postId, String workName, String phoneNum);
|
List<PartnerWorker> getWorkList(Long partnerId, Long postId, String workName, String phoneNum);
|
||||||
|
|
||||||
|
IPage<PartnerWorker> pageWorkList(Long partnerId, Long postId, String workName, String phoneNum, Page<LabelRespVO> page);
|
||||||
|
|
||||||
void delWorker(Long partnerId,Long workId);
|
void delWorker(Long partnerId,Long workId);
|
||||||
|
|
||||||
List<InspectionInfo> inspectionList(Page<InspectionInfo> page,Long partnerId, String status, String carNum);
|
List<InspectionInfo> inspectionList(Page<InspectionInfo> page,Long partnerId, String status, String carNum);
|
||||||
|
@ -9,6 +9,7 @@ import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
|
|||||||
import cn.iocoder.yudao.framework.tenant.core.aop.TenantIgnore;
|
import cn.iocoder.yudao.framework.tenant.core.aop.TenantIgnore;
|
||||||
import cn.iocoder.yudao.framework.tenant.core.db.TenantBaseDO;
|
import cn.iocoder.yudao.framework.tenant.core.db.TenantBaseDO;
|
||||||
import cn.iocoder.yudao.module.config.service.IInspSysConfigService;
|
import cn.iocoder.yudao.module.config.service.IInspSysConfigService;
|
||||||
|
import cn.iocoder.yudao.module.label.vo.LabelRespVO;
|
||||||
import cn.iocoder.yudao.module.partner.entity.PartnerBalance;
|
import cn.iocoder.yudao.module.partner.entity.PartnerBalance;
|
||||||
import cn.iocoder.yudao.module.partner.entity.PartnerBalanceDetail;
|
import cn.iocoder.yudao.module.partner.entity.PartnerBalanceDetail;
|
||||||
import cn.iocoder.yudao.module.partner.entity.PartnerCustomerInfo;
|
import cn.iocoder.yudao.module.partner.entity.PartnerCustomerInfo;
|
||||||
@ -39,6 +40,7 @@ import cn.iocoder.yudao.util.VehicleLicenseOCR;
|
|||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
@ -1082,6 +1084,11 @@ public class AppInspectionPartnerServiceImpl extends ServiceImpl<AppInspectionPa
|
|||||||
return baseMapper.getWorkList(partnerId,postId,workName,phoneNum);
|
return baseMapper.getWorkList(partnerId,postId,workName,phoneNum);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IPage<PartnerWorker> pageWorkList(Long partnerId, Long postId, String workName, String phoneNum, Page<LabelRespVO> page) {
|
||||||
|
return baseMapper.pageWorkList(partnerId,postId,workName,phoneNum,page);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void delWorker(Long partnerId, Long workId) {
|
public void delWorker(Long partnerId, Long workId) {
|
||||||
LoginUser user = SecurityFrameworkUtils.getLoginUser();
|
LoginUser user = SecurityFrameworkUtils.getLoginUser();
|
||||||
@ -1413,14 +1420,14 @@ public class AppInspectionPartnerServiceImpl extends ServiceImpl<AppInspectionPa
|
|||||||
PostPageReqVO post =new PostPageReqVO();
|
PostPageReqVO post =new PostPageReqVO();
|
||||||
post.setCode("inspection");
|
post.setCode("inspection");
|
||||||
|
|
||||||
PageResult<PostDO> postPage = postService.getPostPage(post);
|
List<PostDO> postPage = postService.listPostPage(post);
|
||||||
|
|
||||||
List<PostDO> sysPosts = postPage.getList();
|
// List<PostDO> sysPosts = postPage.getList();
|
||||||
PostDO sysPost = new PostDO();
|
// PostDO sysPost = new PostDO();
|
||||||
sysPost.setId(null);
|
// sysPost.setId(null);
|
||||||
sysPost.setName("全部");
|
// sysPost.setName("全部");
|
||||||
sysPosts.add(0,sysPost);
|
// sysPosts.add(sysPost);
|
||||||
return sysPosts;
|
return postPage;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -424,4 +424,23 @@ FROM
|
|||||||
where ipc.deleted = 0 and ia.deleted= 0 and ipc.partner_id = #{partnerId} and ia.appointment_day = #{formDate}
|
where ipc.deleted = 0 and ia.deleted= 0 and ipc.partner_id = #{partnerId} and ia.appointment_day = #{formDate}
|
||||||
order by ipc.create_time desc
|
order by ipc.create_time desc
|
||||||
</select>
|
</select>
|
||||||
|
<select id="pageWorkList" resultType="cn.iocoder.yudao.module.partner.entity.PartnerWorker">
|
||||||
|
SELECT
|
||||||
|
pw.id,pw.user_id,su.nickname as workName,su.mobile as workPhone, su.avatar
|
||||||
|
FROM
|
||||||
|
partner_worker pw
|
||||||
|
INNER JOIN system_users su ON pw.user_id = su.id
|
||||||
|
left JOIN system_user_post sup on sup.user_id = su.id
|
||||||
|
where pw.partner_id = #{partnerId}
|
||||||
|
<if test="workName!=null and workName!=''">
|
||||||
|
and su.nickname like concat('%',#{workName},'%')
|
||||||
|
</if>
|
||||||
|
<if test="phoneNum!=null and phoneNum!=''">
|
||||||
|
and su.mobile like concat('%',#{phoneNum},'%')
|
||||||
|
</if>
|
||||||
|
<if test="postId!=null and postId!=''">
|
||||||
|
and sup.post_id = #{postId}
|
||||||
|
</if>
|
||||||
|
order by pw.create_time desc
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
@ -19,6 +19,12 @@ public interface PostMapper extends BaseMapperX<PostDO> {
|
|||||||
.inIfPresent(PostDO::getStatus, statuses));
|
.inIfPresent(PostDO::getStatus, statuses));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
default List<PostDO> listPostPage(PostPageReqVO reqVO) {
|
||||||
|
return selectList(new LambdaQueryWrapperX<PostDO>().likeIfPresent(PostDO::getCode, reqVO.getCode())
|
||||||
|
.likeIfPresent(PostDO::getName, reqVO.getName())
|
||||||
|
.eqIfPresent(PostDO::getStatus, reqVO.getStatus()));
|
||||||
|
}
|
||||||
|
|
||||||
default PageResult<PostDO> selectPage(PostPageReqVO reqVO) {
|
default PageResult<PostDO> selectPage(PostPageReqVO reqVO) {
|
||||||
return selectPage(reqVO, new LambdaQueryWrapperX<PostDO>()
|
return selectPage(reqVO, new LambdaQueryWrapperX<PostDO>()
|
||||||
.likeIfPresent(PostDO::getCode, reqVO.getCode())
|
.likeIfPresent(PostDO::getCode, reqVO.getCode())
|
||||||
|
@ -38,7 +38,7 @@ public class OAuth2AccessTokenRedisDAO {
|
|||||||
accessTokenDO.setUpdater(null).setUpdateTime(null).setCreateTime(null).setCreator(null).setDeleted(null);
|
accessTokenDO.setUpdater(null).setUpdateTime(null).setCreateTime(null).setCreator(null).setDeleted(null);
|
||||||
long time = LocalDateTimeUtil.between(LocalDateTime.now(), accessTokenDO.getExpiresTime(), ChronoUnit.SECONDS);
|
long time = LocalDateTimeUtil.between(LocalDateTime.now(), accessTokenDO.getExpiresTime(), ChronoUnit.SECONDS);
|
||||||
if (time > 0) {
|
if (time > 0) {
|
||||||
stringRedisTemplate.opsForValue().set(redisKey, JsonUtils.toJsonString(accessTokenDO), time, TimeUnit.SECONDS);
|
stringRedisTemplate.opsForValue().set(redisKey, JsonUtils.toJsonString(accessTokenDO));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,6 +4,7 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
|||||||
import cn.iocoder.yudao.module.system.controller.admin.dept.vo.post.PostPageReqVO;
|
import cn.iocoder.yudao.module.system.controller.admin.dept.vo.post.PostPageReqVO;
|
||||||
import cn.iocoder.yudao.module.system.controller.admin.dept.vo.post.PostSaveReqVO;
|
import cn.iocoder.yudao.module.system.controller.admin.dept.vo.post.PostSaveReqVO;
|
||||||
import cn.iocoder.yudao.module.system.dal.dataobject.dept.PostDO;
|
import cn.iocoder.yudao.module.system.dal.dataobject.dept.PostDO;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import org.springframework.lang.Nullable;
|
import org.springframework.lang.Nullable;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
@ -63,6 +64,7 @@ public interface PostService {
|
|||||||
* @return 部门分页列表
|
* @return 部门分页列表
|
||||||
*/
|
*/
|
||||||
PageResult<PostDO> getPostPage(PostPageReqVO reqVO);
|
PageResult<PostDO> getPostPage(PostPageReqVO reqVO);
|
||||||
|
List<PostDO> listPostPage(PostPageReqVO reqVO);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获得岗位信息
|
* 获得岗位信息
|
||||||
|
@ -126,6 +126,11 @@ public class PostServiceImpl implements PostService {
|
|||||||
return postMapper.selectPage(reqVO);
|
return postMapper.selectPage(reqVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<PostDO> listPostPage(PostPageReqVO reqVO) {
|
||||||
|
return postMapper.listPostPage(reqVO);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PostDO getPost(Long id) {
|
public PostDO getPost(Long id) {
|
||||||
return postMapper.selectById(id);
|
return postMapper.selectById(id);
|
||||||
|
Loading…
Reference in New Issue
Block a user