Commit 61acf519 authored by maoying's avatar maoying

Merge branch 'developer' into develop_dl_plan6

parents 7c32611a 867306bc
...@@ -315,7 +315,7 @@ public class CarController extends AbstractBaseController { ...@@ -315,7 +315,7 @@ public class CarController extends AbstractBaseController {
if(car.getIotCode()!=null){ if(car.getIotCode()!=null){
Car ar= carMapper.getCarsByIotCode(car.getIotCode()); Car ar= carMapper.getCarsByIotCodeExcludeCarId(car.getIotCode(),car.getId());
if(ar!=null){ if(ar!=null){
throw new BadRequest("物联编码重复"); throw new BadRequest("物联编码重复");
} }
......
...@@ -37,6 +37,8 @@ public interface CarMapper extends BaseMapper<Car> { ...@@ -37,6 +37,8 @@ public interface CarMapper extends BaseMapper<Car> {
List<String> getIotCodeList(@Param("id") String id); List<String> getIotCodeList(@Param("id") String id);
Car getCarsByIotCode(@Param("iotCode") String iotCode); Car getCarsByIotCode(@Param("iotCode") String iotCode);
Car getCarsByIotCodeExcludeCarId(@Param("iotCode") String iotCode, @Param("carId") Long carId);
List<CarIndexVo> getCarsInfoByOrgCode(@Param("orgCode") String orgCode); List<CarIndexVo> getCarsInfoByOrgCode(@Param("orgCode") String orgCode);
......
...@@ -247,6 +247,18 @@ ...@@ -247,6 +247,18 @@
AND AND
wc.iot_code = #{iotCode} wc.iot_code = #{iotCode}
</select> </select>
<select id="getCarsByIotCodeExcludeCarId" resultType="com.yeejoin.equipmanage.common.entity.Car">
SELECT
wc.car_num
FROM
wl_car wc
WHERE
wc.iot_code IS NOT NULL
AND
wc.iot_code = #{iotCode}
AND wc.id != #{carId}
</select>
<select id="getCarsInfoByOrgCode" resultMap="carIotInfoMap"> <select id="getCarsInfoByOrgCode" resultMap="carIotInfoMap">
......
...@@ -3144,5 +3144,16 @@ ...@@ -3144,5 +3144,16 @@
</sql> </sql>
</changeSet> </changeSet>
<changeSet author="ls" id="2022-06-01-1">
<preConditions onFail="MARK_RAN">
<not>
<columnExists tableName="jc_power_transfer_company_resources" columnName="arrival_time"/>
</not>
</preConditions>
<comment>jc_power_transfer_company_resources add column arrival_time 车辆到场时间</comment>
<sql>
ALTER TABLE jc_power_transfer_company_resources ADD arrival_time varchar(255) NULL COMMENT '车辆到场时间';
</sql>
</changeSet>
</databaseChangeLog> </databaseChangeLog>
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