Commit f6dac7cc authored by hanfeng's avatar hanfeng

Merge branch 'dev' of http://113.105.137.151:22280/youjj/cloud-platform into dev

parents 5cfb478d eb00c8a5
......@@ -6,7 +6,6 @@
<groupId>com.xxfc.common</groupId>
<artifactId>xx-common-platform</artifactId>
<version>2.0-SNAPSHOT</version>
<relativePath>../../xx-common/xx-common-platform/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>com.xxfc.platform</groupId>
......
......@@ -6,7 +6,6 @@
<groupId>com.xxfc.common</groupId>
<artifactId>xx-common-platform-web</artifactId>
<version>2.0-SNAPSHOT</version>
<relativePath>../../xx-common/xx-common-platform-web/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>com.xxfc.platform</groupId>
......
......@@ -150,7 +150,11 @@ public class BranchCompany {
* 上下架:1-上架;2-下架
*/
private Integer state;
/**
* 是否app展示:1-是;2-否
*/
@Column(name = "is_show")
private Integer isShow;
/**
* 是否删除:0-正常;1-删除
......
......@@ -55,6 +55,8 @@ public class CompanyVo extends PageParam {
String addrDetail;
@ApiModelProperty("上下架:1-上架;2-下架")
Integer state;
@ApiModelProperty("是否app展示:1-是;2-否")
Integer isShow;
@ApiModelProperty("负责人")
private String leader;
@ApiModelProperty("负责人联系方式")
......
......@@ -46,6 +46,7 @@ public class BranchCompanyStockApplyInfoBiz extends BaseBiz<BranchCompanyStockAp
BeanUtils.copyProperties(applyVo, applyInfo);
applyInfo.setState(BranchCompanyStockApplyState.Apply.getCode());
applyInfo.setCreateTime(new Date());
applyInfo.setCompanyId(applyVo.getStockRightId());
mapper.insertSelective(applyInfo);
}
......
......@@ -439,12 +439,14 @@ 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 = new HashMap<>();
//加入预定申请记录
VehicleBookRecord vehicleBookRecord = null;
if(bookVehicleVo.getVehicleBookRecordId() == null) {
//检验时间是否可以预定
map = vehicleBookHourInfoBiz.getPredictableHours(bookVehicleVo.getBookStartDate(), bookVehicleVo.getBookEndDate(), bookVehicleVo.getNotCheckTimeLegal());
vehicleBookRecord = new VehicleBookRecord();
BeanUtil.copyProperties(bookVehicleVo, vehicleBookRecord, CopyOptions.create().setIgnoreNullValue(true).setIgnoreError(true));
vehicleBookRecord.setBookStartDate(startDay.toDate());
......@@ -464,19 +466,19 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR
bookVehicleVo.setUnbookStartDate(new DateTime(vehicleBookRecord.getBookStartDate()).toString(DATE_TIME_FORMATTER));
bookVehicleVo.setUnbookEndDate(new DateTime(vehicleBookRecord.getBookEndDate()).toString(DATE_TIME_FORMATTER));
unbookVehicle(bookVehicleVo);
map = vehicleBookHourInfoBiz.getPredictableHours(startDay.toString(DATE_TIME_FORMATTER), endDay.toString(DATE_TIME_FORMATTER), bookVehicleVo.getNotCheckTimeLegal());
//检验时间是否可以预定
map = vehicleBookHourInfoBiz.getPredictableHours(bookVehicleVo.getBookStartDate(), bookVehicleVo.getBookEndDate(), bookVehicleVo.getNotCheckTimeLegal());
vehicleBookRecord.setBookStartDate(startDay.toDate());
vehicleBookRecord.setBookEndDate(endDay.toDate());
vehicleBookRecordBiz.updateSelectiveByIdRe(vehicleBookRecord);
}
}
for(Map.Entry<String,List<String>> entry : yearMonthAndDate.entrySet()) {
Boolean rsEach = applyVehicle4EmployeePerMonth(bookVehicleVo.getVehicleId(),entry.getValue(),entry.getKey(), map);
if(Boolean.FALSE.equals(rsEach)){
throw new BaseException(ResultCode.VEHICLE_IS_BOOKED);
}
}
vehicleBookRecord.setBookStartDate(startDay.toDate());
vehicleBookRecord.setBookEndDate(endDay.toDate());
vehicleBookRecordBiz.updateSelectiveByIdRe(vehicleBookRecord);
}
}
//添加预定日期记录
Boolean hasSuc = bookedVehicle(bookVehicleVo);
if(!hasSuc){
......@@ -956,17 +958,6 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR
return Boolean.TRUE;
}
public Map<String, Integer> getDateInfo(String yearMonthDay) {
Map<String, Integer> map = new HashMap<>();
if(StringUtils.isNotBlank(yearMonthDay)) {
DateTime dateTime = DateTime.parse(yearMonthDay, YEARMONTH_DATE_TIME_FORMATTER);
Integer andOperationFactor = 0;
andOperationFactor |= 1<<(dateTime.dayOfMonth().get()-1);
map.put(dateTime.toString(YEARMONTH_DATE_TIME_FORMATTER), andOperationFactor);
}
return map;
}
/**
* 获取某月份相应预定日期查询条件
* @param yearMonthAndDate 年月 - 预定日期条件字符串(yyyy-MM-dd)
......
......@@ -3,26 +3,26 @@
<mapper namespace="com.xxfc.platform.vehicle.mapper.CompanyBaseMapper" >
<select id="getList" parameterType="com.xxfc.platform.vehicle.pojo.vo.CompanyVo" resultType="com.xxfc.platform.vehicle.pojo.vo.CompanyVo">
SELECT
c.id as companyId,
c.`name` as companyName,
c.addr_detail as addrDetail,
c.state,
c.status,
c.is_show as isShow,
c.leader,
c.leader_contact_info as leaderContactInfo,
c.latitude,
c.longitude,
c.vehice_service_phone as vehiceServicePhone,
c.tour_service_phone as tourServicePhone,
c.zone_id as zoneId,
b.zone_id as zoneId,
a.name as zoneName,
c.addr_province as addrProvince,
c.province_name as provinceName,
c.addr_city as addrCity,
c.city_name as cityName,
c.addr_town as addrTown,
c.town_name as townName,
b.addr_province as addrProvince,
b.province_name as provinceName,
b.addr_city as addrCity,
b.city_name as cityName,
b.addr_town as addrTown,
b.town_name as townName,
b.cover,
b.id,
b.`name`,
......@@ -33,25 +33,25 @@
r.total,
r.type,
r.price
FROM branch_company c
LEFT JOIN company_base b ON c.company_base_id=b.id
LEFT JOIN branch_company_stock_info_right r ON c.company_base_id=r.company_base_id
LEFT JOIN area a ON c.zone_id=a.id
FROM company_base b
LEFT JOIN branch_company c ON c.company_base_id=b.id
LEFT JOIN branch_company_stock_info_right r ON b.id=r.company_base_id
LEFT JOIN area a ON b.zone_id=a.id
<where>
b.is_del=0
<if test="zoneId != null and zoneId !='' ">
and c.zone_id = #{zoneId}
and b.zone_id = #{zoneId}
</if>
<if test="addrProvince != null and addrProvince != ''">
and c.addr_province =#{addrProvince}
and b.addr_province =#{addrProvince}
</if>
<if test="addrCity != null and addrCity != ''">
and c.addr_city =#{addrCity}
and b.addr_city =#{addrCity}
</if>
<if test="name != null and name != ''">
and b.`name` like CONCAT('%',#{name},'%')
and (b.`name` like CONCAT('%',#{name},'%') or c.`name` like CONCAT('%',#{name},'%') )
</if>
</where>
order by c.id desc
order by b.id desc
</select>
</mapper>
\ No newline at end of file
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