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 {
if(car.getIotCode()!=null){
Car ar= carMapper.getCarsByIotCode(car.getIotCode());
Car ar= carMapper.getCarsByIotCodeExcludeCarId(car.getIotCode(),car.getId());
if(ar!=null){
throw new BadRequest("物联编码重复");
}
......
......@@ -37,6 +37,8 @@ public interface CarMapper extends BaseMapper<Car> {
List<String> getIotCodeList(@Param("id") String id);
Car getCarsByIotCode(@Param("iotCode") String iotCode);
Car getCarsByIotCodeExcludeCarId(@Param("iotCode") String iotCode, @Param("carId") Long carId);
List<CarIndexVo> getCarsInfoByOrgCode(@Param("orgCode") String orgCode);
......
......@@ -181,7 +181,7 @@ public interface IEquipmentSpecificSerivce extends IService<EquipmentSpecific> {
*
* @param indexs
*/
void updateEquipmentSpecIndexRealtimeData(List<EquipmentSpecificIndex> indexs);
void updateEquipmentSpecIndexRealtimeData(EquipmentSpecificIndex index);
List<EquipmentSpecificVo> getEquipAndCarIotcodeByIotcode(String iotCode);
......
......@@ -1631,10 +1631,9 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
}
@Override
public void updateEquipmentSpecIndexRealtimeData(List<EquipmentSpecificIndex> indexs) {
public void updateEquipmentSpecIndexRealtimeData(EquipmentSpecificIndex index) {
// TODO Auto-generated method stub
if (!ObjectUtils.isEmpty(indexs)) {
EquipmentSpecificIndex index = indexs.get(0);
if (!ObjectUtils.isEmpty(index)) {
EquipmentSpecific es = equipmentSpecificMapper.selectById(index.getEquipmentSpecificId());
es.setRealtimeIotEsIndexId(index.getId());
es.setRealtimeIotIndexKey(index.getNameKey());
......
......@@ -247,6 +247,18 @@
AND
wc.iot_code = #{iotCode}
</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">
......
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