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