更新
This commit is contained in:
parent
a46996350d
commit
f627b242a9
@ -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("信息有误");
|
||||
|
@ -81,5 +81,16 @@ public class DlInspectionProjectController {
|
||||
return success(pageResult);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改项目排序
|
||||
* @param updateReqVO
|
||||
* @return
|
||||
*/
|
||||
@PutMapping("/updateSort")
|
||||
public CommonResult updateSort(@RequestBody DlInspectionProjectSaveReqVO updateReqVO) {
|
||||
dlInspectionProjectService.updateSort(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -31,6 +31,12 @@ public interface DlInspectionProjectService extends IService<DlInspectionProject
|
||||
*/
|
||||
void updateDlInspectionProject(@Valid DlInspectionProjectSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 更新排序
|
||||
* @param updateReqVO
|
||||
*/
|
||||
void updateSort(DlInspectionProjectSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除检测项目
|
||||
*
|
||||
|
@ -21,6 +21,7 @@ import cn.iocoder.yudao.module.partner.service.IPartnerWorkerService;
|
||||
import cn.iocoder.yudao.module.payment.entity.OrderInfo;
|
||||
import cn.iocoder.yudao.module.payment.entity.OrderInfoDetail;
|
||||
import cn.iocoder.yudao.module.payment.service.IOrderInfoDetailService;
|
||||
import cn.iocoder.yudao.module.shop.service.IShopMallPartnersService;
|
||||
import cn.iocoder.yudao.module.system.controller.admin.dept.vo.post.PostPageReqVO;
|
||||
import cn.iocoder.yudao.module.system.controller.admin.user.vo.user.UserSaveReqVO;
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.dept.PostDO;
|
||||
@ -119,6 +120,8 @@ public class AppInspectionPartnerServiceImpl extends ServiceImpl<AppInspectionPa
|
||||
private RoleService roleService;
|
||||
@Autowired
|
||||
private AdminUserService adminUserService;
|
||||
@Autowired
|
||||
private IShopMallPartnersService partnersService;
|
||||
|
||||
@Override
|
||||
public IPage<PartnerListVo> partnerList(Page<PartnerListVo> page, PartnerListQuery partnerListQuery) {
|
||||
@ -166,28 +169,33 @@ public class AppInspectionPartnerServiceImpl extends ServiceImpl<AppInspectionPa
|
||||
@Override
|
||||
@TenantIgnore
|
||||
public ShopMallPartners shopInfo() throws Exception {
|
||||
LoginUser user = SecurityFrameworkUtils.getLoginUser();
|
||||
Set<Long> userRoleIdListByUserId = permissionService.getUserRoleIdListByUserId(user.getId());
|
||||
List<RoleDO> roleList = roleService.getRoleList(userRoleIdListByUserId);
|
||||
// LoginUser user = SecurityFrameworkUtils.getLoginUser();
|
||||
// Set<Long> userRoleIdListByUserId = permissionService.getUserRoleIdListByUserId(user.getId());
|
||||
// List<RoleDO> roleList = roleService.getRoleList(userRoleIdListByUserId);
|
||||
//
|
||||
// List<String> roles = roleList.stream().map(RoleDO::getCode).collect(Collectors.toList());
|
||||
// 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");
|
||||
// partner = this.getOne(queryWrapper);
|
||||
// if (ObjectUtil.isEmpty(partner)){
|
||||
// throw new Exception("信息有误");
|
||||
// }
|
||||
// }else if (roles.contains("jcworker")){
|
||||
// LambdaQueryWrapper<PartnerWorker> queryWrapperWork =new LambdaQueryWrapper<>();
|
||||
// queryWrapperWork.eq(PartnerWorker::getUserId,user.getId());
|
||||
// PartnerWorker worker = partnerWorkerService.getOne(queryWrapperWork);
|
||||
// if (ObjectUtil.isEmpty(worker)){
|
||||
// throw new Exception("信息有误");
|
||||
// }
|
||||
// partner.setPartnerId(worker.getPartnerId());
|
||||
// }
|
||||
|
||||
List<String> roles = roleList.stream().map(RoleDO::getCode).collect(Collectors.toList());
|
||||
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");
|
||||
partner = this.getOne(queryWrapper);
|
||||
if (ObjectUtil.isEmpty(partner)){
|
||||
throw new Exception("信息有误");
|
||||
}
|
||||
}else if (roles.contains("jcworker")){
|
||||
LambdaQueryWrapper<PartnerWorker> queryWrapperWork =new LambdaQueryWrapper<>();
|
||||
queryWrapperWork.eq(PartnerWorker::getUserId,user.getId());
|
||||
PartnerWorker worker = partnerWorkerService.getOne(queryWrapperWork);
|
||||
if (ObjectUtil.isEmpty(worker)){
|
||||
throw new Exception("信息有误");
|
||||
}
|
||||
partner.setPartnerId(worker.getPartnerId());
|
||||
}
|
||||
LambdaQueryWrapper<ShopMallPartners> queryWrapper =new LambdaQueryWrapper<>();
|
||||
LoginUser user = SecurityFrameworkUtils.getLoginUser();
|
||||
queryWrapper.orderByAsc(ShopMallPartners::getPartnerId).eq(ShopMallPartners::getType,"jc").eq(ShopMallPartners::getIsBanned,"0").last("limit 1");
|
||||
ShopMallPartners partner = partnersService.getOne(queryWrapper);
|
||||
return partner;
|
||||
}
|
||||
|
||||
|
@ -81,6 +81,17 @@ public class DlInspectionProjectServiceImpl extends ServiceImpl<DlInspectionProj
|
||||
projectRoyaltyService.batchInsertProjectRoyalty(collect);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新排序
|
||||
*
|
||||
* @param updateReqVO
|
||||
*/
|
||||
@Override
|
||||
public void updateSort(DlInspectionProjectSaveReqVO updateReqVO) {
|
||||
DlInspectionProject updateObj = BeanUtils.toBean(updateReqVO, DlInspectionProject.class);
|
||||
dlInspectionProjectMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void deleteDlInspectionProject(String id) {
|
||||
|
@ -346,6 +346,9 @@ public class RescueInfoSystem extends BaseController {
|
||||
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||
Page<RescueInfo> page = new Page<>(pageNo, pageSize);
|
||||
if ("".equals(rescueInfo.getFeeType())){
|
||||
rescueInfo.setFeeType(null);
|
||||
}
|
||||
IPage<RescueInfo> rescueInfos = rescueInfoService.getRescueInfoByDriver(rescueInfo, page);
|
||||
List<MoneyManagement> list = rescueInfoService.moneyManagement2(rescueInfos.getRecords(), rescueInfo.getRescueStart());
|
||||
IPage<MoneyManagement> result = new Page<>(pageNo, pageSize);
|
||||
|
@ -345,6 +345,9 @@ public class RescueInfoServiceImpl extends ServiceImpl<RescueInfoMapper, RescueI
|
||||
rescueInfo.setRescueTcBig(rescueTcBig);
|
||||
rescueInfo.setRescueTcMid(rescueTcMid);
|
||||
rescueInfo.setRescueTcSmall(rescueTcSmall);
|
||||
if ("".equals(rescueInfo.getFeeType())){
|
||||
rescueInfo.setFeeType(null);
|
||||
}
|
||||
JSONObject res = baseMapper.listData(rescueInfo);
|
||||
//在计算燃油费
|
||||
JSONObject jsonObject = refuelRecordService.listData(rescueInfo);
|
||||
|
@ -88,7 +88,7 @@
|
||||
<if test="map.rescueType != null">
|
||||
and ri.rescue_type = #{map.rescueType}
|
||||
</if>
|
||||
<if test="map.feeType != null">
|
||||
<if test="map.feeType != null and map.feeType != ''">
|
||||
and ri.fee_type = #{map.feeType}
|
||||
</if>
|
||||
<if test="map.flag != null">
|
||||
@ -126,8 +126,14 @@
|
||||
<if test="flag != null">
|
||||
and ri.driver_id is not null
|
||||
</if>
|
||||
<if test="rescueStart != null">
|
||||
and rescue_time like concat(#{rescueStart}, '%')
|
||||
<if test="feeType != null and feeType != ''">
|
||||
and ri.fee_type = #{feeType}
|
||||
</if>
|
||||
<if test="rescueStartMonth != null">
|
||||
and rescue_time like concat(#{rescueStartMonth}, '%')
|
||||
</if>
|
||||
<if test="rescueStart != null and rescueEnd != null">
|
||||
and rescue_time between concat(#{rescueStart}, ' 00:00:00') and concat(#{rescueEnd}, ' 23:59:59')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
@ -76,7 +76,10 @@
|
||||
<if test="driverCarNum != null ">
|
||||
and rci.rescue_car_num like concat('%',#{driverCarNum},'%')
|
||||
</if>
|
||||
<if test="rescueStart">and rrr.record_time like concat(#{rescueStart},'%')</if>
|
||||
<if test="rescueStartMonth">and rrr.record_time like concat(#{rescueStartMonth},'%')</if>
|
||||
<if test="rescueStart != null and rescueEnd != null">
|
||||
and rrr.record_time between concat(#{rescueStart}, ' 00:00:00') and concat(#{rescueEnd}, ' 23:59:59')
|
||||
</if>
|
||||
</where>
|
||||
|
||||
</select>
|
||||
|
Loading…
Reference in New Issue
Block a user