|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
|
import com.taauav.admin.entity.LsAdmin; |
|
|
import com.taauav.admin.entity.LsAdmin; |
|
|
|
|
|
import com.taauav.admin.entity.TauvEquipment; |
|
|
import com.taauav.admin.mapper.LsAdminMapper; |
|
|
import com.taauav.admin.mapper.LsAdminMapper; |
|
|
import com.taauav.admin.query.TauvDriverQuery; |
|
|
import com.taauav.admin.query.TauvDriverQuery; |
|
|
import com.taauav.admin.service.ISysCityService; |
|
|
import com.taauav.admin.service.ISysCityService; |
|
|
|
|
|
|
|
|
import com.taauav.admin.service.ISysAdminService; |
|
|
import com.taauav.admin.service.ISysAdminService; |
|
|
import com.taauav.admin.service.ITauvDriverService; |
|
|
import com.taauav.admin.service.ITauvDriverService; |
|
|
import com.taauav.common.service.impl.BaseServiceImpl; |
|
|
import com.taauav.common.service.impl.BaseServiceImpl; |
|
|
|
|
|
import com.taauav.common.util.DateUtil; |
|
|
import org.springframework.beans.BeanUtils; |
|
|
import org.springframework.beans.BeanUtils; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.beans.factory.annotation.Value; |
|
|
import org.springframework.beans.factory.annotation.Value; |
|
|
|
|
|
|
|
|
return response.success("添加成功"); |
|
|
return response.success("添加成功"); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 根据ID删除河道 |
|
|
|
|
|
* |
|
|
|
|
|
* @param id 河道ID |
|
|
|
|
|
* @return |
|
|
|
|
|
*/ |
|
|
|
|
|
@Override |
|
|
|
|
|
public Response drop(Integer id) { |
|
|
|
|
|
if (id == null || id <= 0) { |
|
|
|
|
|
return response.failure("河道ID不存在"); |
|
|
|
|
|
} |
|
|
|
|
|
TauvDriver entity = driverMapper.selectById(id); |
|
|
|
|
|
if (entity == null) { |
|
|
|
|
|
return response.failure("河道信息不存在"); |
|
|
|
|
|
} |
|
|
|
|
|
boolean result = this.deleteById(id, entity); |
|
|
|
|
|
if (!result) { |
|
|
|
|
|
return response.failure("删除失败"); |
|
|
|
|
|
} |
|
|
|
|
|
return response.success("删除成功"); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 根据编号获取数据 |
|
|
* 根据编号获取数据 |
|
|
* |
|
|
* |
|
|
|
|
|
|
|
|
map.put("start_point", info.getStartPoint()); |
|
|
map.put("start_point", info.getStartPoint()); |
|
|
map.put("end_point", info.getEndPoint()); |
|
|
map.put("end_point", info.getEndPoint()); |
|
|
map.put("type_list", driver.getTypeList()); |
|
|
map.put("type_list", driver.getTypeList()); |
|
|
map.put("format_create_time", driver.getCreateTime()); |
|
|
|
|
|
|
|
|
map.put("format_create_time", DateUtil.format(info.getCreateTime(), "yyyy-MM-dd HH:mm:ss")); |
|
|
|
|
|
map.put("note", info.getNote()); |
|
|
SysAdmin adminInfo = null; |
|
|
SysAdmin adminInfo = null; |
|
|
if (info.getCreateUser() > 0) { |
|
|
if (info.getCreateUser() > 0) { |
|
|
adminInfo = iSysAdminService.findById(info.getCreateUser()); |
|
|
adminInfo = iSysAdminService.findById(info.getCreateUser()); |