Commit e77935f4 authored by lisong's avatar lisong

Merge remote-tracking branch 'origin/developer' into developer

parents 5e3dcd6e 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("物联编码重复");
} }
......
...@@ -38,6 +38,8 @@ public interface CarMapper extends BaseMapper<Car> { ...@@ -38,6 +38,8 @@ public interface CarMapper extends BaseMapper<Car> {
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);
List<CarIndexVo> getCarsIotInfoByIotCode(@Param("iotCode") String iotCode); List<CarIndexVo> getCarsIotInfoByIotCode(@Param("iotCode") String iotCode);
......
...@@ -181,7 +181,7 @@ public interface IEquipmentSpecificSerivce extends IService<EquipmentSpecific> { ...@@ -181,7 +181,7 @@ public interface IEquipmentSpecificSerivce extends IService<EquipmentSpecific> {
* *
* @param indexs * @param indexs
*/ */
void updateEquipmentSpecIndexRealtimeData(List<EquipmentSpecificIndex> indexs); void updateEquipmentSpecIndexRealtimeData(EquipmentSpecificIndex index);
List<EquipmentSpecificVo> getEquipAndCarIotcodeByIotcode(String iotCode); List<EquipmentSpecificVo> getEquipAndCarIotcodeByIotcode(String iotCode);
......
...@@ -1631,10 +1631,9 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM ...@@ -1631,10 +1631,9 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
} }
@Override @Override
public void updateEquipmentSpecIndexRealtimeData(List<EquipmentSpecificIndex> indexs) { public void updateEquipmentSpecIndexRealtimeData(EquipmentSpecificIndex index) {
// TODO Auto-generated method stub // TODO Auto-generated method stub
if (!ObjectUtils.isEmpty(indexs)) { if (!ObjectUtils.isEmpty(index)) {
EquipmentSpecificIndex index = indexs.get(0);
EquipmentSpecific es = equipmentSpecificMapper.selectById(index.getEquipmentSpecificId()); EquipmentSpecific es = equipmentSpecificMapper.selectById(index.getEquipmentSpecificId());
es.setRealtimeIotEsIndexId(index.getId()); es.setRealtimeIotEsIndexId(index.getId());
es.setRealtimeIotIndexKey(index.getNameKey()); es.setRealtimeIotIndexKey(index.getNameKey());
......
...@@ -248,6 +248,18 @@ ...@@ -248,6 +248,18 @@
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">
SELECT SELECT
......
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