Commit 77ae591a authored by hezhen's avatar hezhen

Merge branch 'dev' into hz_dev

parents 92448e05 9561bc88
......@@ -103,9 +103,9 @@ public class AppUserManageBiz extends BaseBiz<AppUserDetailMapper, AppUserDetail
if (CollectionUtils.isEmpty(appUserManageVos)) {
return new PageInfo<AppUserManageVo>();
}
Set<Integer> usSet = appUserManageDTO.getCitySet();
List<AppUserManageVo> results = appUserManageVos.parallelStream().filter(us -> usSet.contains(us.getCityCode())).collect(Collectors.toList());
PageInfo<AppUserManageVo> pageInfo = PageInfo.of(results);
// Set<Integer> usSet = appUserManageDTO.getCitySet();
// List<AppUserManageVo> results = appUserManageVos.parallelStream().filter(us -> usSet.contains(us.getCityCode())).collect(Collectors.toList());
PageInfo<AppUserManageVo> pageInfo = PageInfo.of(appUserManageVos);
return getAppUserManageVoPageInfo(pageInfo);
}
......
......@@ -208,11 +208,12 @@ public class BaseUserMemberBiz extends BaseBiz<BaseUserMemberMapper, BaseUserMem
if (baseUserMemberVO != null) {
return baseUserMemberVO;
}
return new BaseUserMemberVO();
return null;
}
/**
* 设置用户会员
*
......
......@@ -45,19 +45,20 @@ public class AppUsersManageController extends BaseController<AppUserManageBiz,Ap
@Autowired
private VehicleFeign vehicleFeign;
private Integer ALL_PERMISSIONS=1;
/**
* 查询所有
* @return
*/
@PostMapping("/findAll")
public ObjectRestResponse<PageInfo<AppUserManageVo>> findAllByQuery(@RequestBody AppUserManageDTO appUserManageDTO, HttpServletRequest request) throws Exception {
public ObjectRestResponse<PageInfo<AppUserManageVo>> findAllByQuery(@RequestBody AppUserManageDTO appUserManageDTO) throws Exception {
String token = userAuthConfig.getToken(request);
ObjectRestResponse objectRestResponse = publicController.userinfoByToken(token);
User user = (User) objectRestResponse.getData();
if (user==null){
throw new BaseException("User error!");
}
if (user.getDataAll()==1) {
if (ALL_PERMISSIONS.equals(user.getDataAll())) {
return ObjectRestResponse.succ(baseBiz.findAllByQuery(appUserManageDTO));
}
ObjectRestResponse<Set<Integer>> setObjectRestResponse = vehicleFeign.corporationCity(user.getDataZone(), user.getDataCompany());
......
......@@ -3,7 +3,6 @@ package com.github.wxiaoqi.security.admin.rest;
import com.github.wxiaoqi.security.admin.biz.BaseUserMemberBiz;
import com.github.wxiaoqi.security.admin.dto.BaseUserMemberVO;
import com.github.wxiaoqi.security.admin.dto.UserMemberDTO;
import com.github.wxiaoqi.security.admin.entity.AppUserManage;
import com.github.wxiaoqi.security.admin.entity.BaseUserMember;
import com.github.wxiaoqi.security.admin.feign.UserFeign;
import com.github.wxiaoqi.security.admin.feign.dto.AppUserDTO;
......@@ -15,7 +14,6 @@ import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.lang.reflect.InvocationTargetException;
import java.util.Objects;
/**
......@@ -40,7 +38,9 @@ public class BaseUserMemberController extends BaseController<BaseUserMemberBiz,
@ApiOperation(value = "根据用户id获取用户会员信息")
@GetMapping("/findOne/{userId}")
public ObjectRestResponse<BaseUserMemberVO> findOneByUserId(@PathVariable Integer userId)throws Exception{
return ObjectRestResponse.succ(baseBiz.findOneByUserId(userId));
BaseUserMemberVO oneByUserId = baseBiz.findOneByUserId(userId);
oneByUserId=(oneByUserId==null? new BaseUserMemberVO(): oneByUserId);
return ObjectRestResponse.succ(oneByUserId);
}
......
......@@ -133,6 +133,12 @@
<if test="source !=null ">
and d.source = #{source}
</if>
<if test="citySet != null ">
and d.city_code in
<foreach collection="citySet" item="item" index="index" open="(" separator="," close=")" >
#{item}
</foreach>
</if>
order by l.id ASC
</select>
......
......@@ -87,7 +87,10 @@
<artifactId>spring-cloud-starter-openfeign</artifactId>
</dependency>
<dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-consul-all</artifactId> </dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-consul-all</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
......@@ -95,8 +98,8 @@
</dependency>
<!--<dependency>-->
<!--<groupId>org.springframework.amqp</groupId>-->
<!--<artifactId>spring-rabbit</artifactId>-->
<!--<groupId>org.springframework.amqp</groupId>-->
<!--<artifactId>spring-rabbit</artifactId>-->
<!--</dependency>-->
<dependency>
......
......@@ -36,8 +36,14 @@
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-config-server</artifactId>
</dependency>
<dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-consul-all</artifactId> </dependency>
<dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-consul-all</artifactId> </dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-consul-all</artifactId>
</dependency>
<!-- <dependency>-->
<!-- <groupId>org.springframework.cloud</groupId>-->
<!-- <artifactId>spring-cloud-starter-consul-all</artifactId>-->
<!-- </dependency>-->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
......
......@@ -36,7 +36,10 @@
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-config-server</artifactId>
</dependency>
<dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-consul-all</artifactId> </dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-consul-all</artifactId>
</dependency>
</dependencies>
<build>
......
......@@ -5,20 +5,16 @@ import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import com.github.wxiaoqi.security.common.rest.BaseController;
import com.github.wxiaoqi.security.common.vo.PageDataVO;
import com.xxfc.platform.tour.biz.TourGoodVerificationBiz;
import com.xxfc.platform.tour.common.TourBaseController;
import com.xxfc.platform.tour.entity.TourGoodVerification;
import com.xxfc.platform.tour.vo.TourGoodOrderFindVo;
import com.xxfc.platform.tour.vo.TourGoodOrderVo;
import com.xxfc.platform.tour.vo.TourVerificationInfoVo;
import com.xxfc.platform.vehicle.feign.VehicleFeign;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@RestController
@RequestMapping("/tourGood/verfication")
@IgnoreClientToken
public class TourGoodVerificationController extends TourBaseController<TourGoodVerificationBiz> {
public class TourGoodVerificationController extends BaseController<TourGoodVerificationBiz, TourGoodVerification> {
/**
......
......@@ -102,7 +102,7 @@ public class CertificationController {
// }
// });
// thread.start();
}
}
return result ;
}
} catch (Exception e) {
......
......@@ -251,16 +251,16 @@ public class CertificationService {
}
idInformation.setExpirationDate(expirationDate);
CertificationService cs = applicationContext.getBean(this.getClass());
ObjectRestResponse objRR =cs.addIdInformation(idInformation);
log.info("----请求admin=========" + objRR);
if (objRR.getRel()) {
return ObjectRestResponse.succ(objRR.getData());
}
return cs.addIdInformation(idInformation);
// log.info("----请求admin=========" + objRR);
// if (objRR.getRel()) {
// return ObjectRestResponse.succ(objRR.getData());
// }
}
}
return ObjectRestResponse.succ();
return ObjectRestResponse.createFailedResult(ResultCode.INCOMPLETE_DATA,"网络异常,请稍后再试");
}
......@@ -344,7 +344,8 @@ public class CertificationService {
// idInformation.setId(idInformation1.getId());
// idInformation.setUpdTime(new Date());
// idInformationMapper.updateByPrimaryKeySelective(idInformation);
throw new BaseException("该身份证已存在,不要重复认证!");
log.error("该身份证已存在,不要重复认证");
return ObjectRestResponse.createFailedResult(ResultCode.FAILED_CODE,"该身份证已存在,不要重复认证");
}
log.info("----addIdInformation---userid==="+idInformation.getUserLoginId()+"----name====" + idInformation.getName()+"---IdNumber==="+idInformation.getIdNumber());
//认证成功后修改用户,用户认证状态
......
......@@ -23,6 +23,7 @@ public enum ResCode {
VEHICLE_BOOKED_RECORD_ALREADY_CHANGED(103001,"车辆预定申请已被审批"),
VEHICLE_BOOKED_RECORD_STATUS_CHANGED(103002,"车辆预定申请状态已变更"),
VEHICLE_BOOKED_RECORD_MILEAGE_CHANGED(103003,"请输入仪表盘内当前显示的公里数"),
VEHICLE_BOOKED_RECORD_NOT_EXIST(103004, "预定记录不存在"),
CHECKUSER_AND_PHONE_NOT_NULL(103999, "收车或交车人姓名和电话不能为空"),
USERNAME_AND_TELE_NOT_NULL(104000, "使用人和电话不能为空"),
......
......@@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.time.Instant;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.ZoneOffset;
import java.util.List;
......@@ -94,7 +95,7 @@ public class RentVehicleBookDTO extends PageParam {
this.bookStartDate = bookStartDate;
//首次设置
if(null == this.startDateExtend) {
this.startDateExtend = YMR_SLASH_FORMATTER.format(LocalDateTime.parse(bookStartDate, YMR_SLASH_FORMATTER).minusDays(1L));
this.startDateExtend = YMR_SLASH_FORMATTER.format(LocalDate.parse(bookStartDate, YMR_SLASH_FORMATTER).minusDays(1L));
}
}
......@@ -102,7 +103,7 @@ public class RentVehicleBookDTO extends PageParam {
this.bookEndDate = bookEndDate;
//首次设置
if(null == this.endDateExtend) {
this.endDateExtend = YMR_SLASH_FORMATTER.format(LocalDateTime.parse(bookEndDate, YMR_SLASH_FORMATTER).plusDays(1L));
this.endDateExtend = YMR_SLASH_FORMATTER.format(LocalDate.parse(bookEndDate, YMR_SLASH_FORMATTER).plusDays(1L));
}
}
}
\ No newline at end of file
......@@ -436,6 +436,7 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR
if(yearMonthAndDate.size()>3){//连续的日期最多夸3个月
throw new BaseException(ResultCode.ONLY_BOOK_TWO_MONTH);
}
//检验时间是否可以预定
Map<String, Integer> map = vehicleBookHourInfoBiz.getPredictableHours(bookVehicleVo.getBookStartDate(), bookVehicleVo.getBookEndDate(), bookVehicleVo.getNotCheckTimeLegal());
for(Map.Entry<String,List<String>> entry:yearMonthAndDate.entrySet()){
Boolean rsEach = applyVehicle4EmployeePerMonth(bookVehicleVo.getVehicleId(),entry.getValue(),entry.getKey(), map);
......@@ -458,9 +459,18 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR
vehicleBookRecordBiz.save(vehicleBookRecord);
} else {
vehicleBookRecord = vehicleBookRecordBiz.selectById(bookVehicleVo.getVehicleBookRecordId());
vehicleBookRecord.setBookStartDate(startDay.toDate());
vehicleBookRecord.setBookEndDate(endDay.toDate());
vehicleBookRecordBiz.updateSelectiveByIdRe(vehicleBookRecord);
if(vehicleBookRecord == null) {
throw new BaseException(ResCode.VEHICLE_BOOKED_RECORD_NOT_EXIST.getDesc(), ResCode.VEHICLE_BOOKED_RECORD_NOT_EXIST.getCode());
} else {
//先取消预定,然后再修改
bookVehicleVo.setUnbookStartDate(new DateTime(vehicleBookRecord.getBookStartDate()).toString(DATE_TIME_FORMATTER));
bookVehicleVo.setUnbookEndDate(new DateTime(vehicleBookRecord.getBookEndDate()).toString(DATE_TIME_FORMATTER));
unbookVehicle(bookVehicleVo);
vehicleBookRecord.setBookStartDate(startDay.toDate());
vehicleBookRecord.setBookEndDate(endDay.toDate());
vehicleBookRecordBiz.updateSelectiveByIdRe(vehicleBookRecord);
}
}
// //添加预定时间记录
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment