|
|
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
|
|
import com.taauav.admin.entity.LsAdmin; |
|
|
|
import com.taauav.admin.entity.TauvEquipment; |
|
|
|
import com.taauav.admin.mapper.LsAdminMapper; |
|
|
|
import com.taauav.admin.query.TauvDriverQuery; |
|
|
|
import com.taauav.admin.service.ISysCityService; |
|
|
@@ -16,6 +17,7 @@ import com.taauav.admin.mapper.TauvDriverMapper; |
|
|
|
import com.taauav.admin.service.ISysAdminService; |
|
|
|
import com.taauav.admin.service.ITauvDriverService; |
|
|
|
import com.taauav.common.service.impl.BaseServiceImpl; |
|
|
|
import com.taauav.common.util.DateUtil; |
|
|
|
import org.springframework.beans.BeanUtils; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.beans.factory.annotation.Value; |
|
|
@@ -158,6 +160,28 @@ public class TauvDriverServiceImpl extends BaseServiceImpl<TauvDriverMapper, Tau |
|
|
|
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("删除成功"); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 根据编号获取数据 |
|
|
|
* |
|
|
@@ -190,7 +214,8 @@ public class TauvDriverServiceImpl extends BaseServiceImpl<TauvDriverMapper, Tau |
|
|
|
map.put("start_point", info.getStartPoint()); |
|
|
|
map.put("end_point", info.getEndPoint()); |
|
|
|
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; |
|
|
|
if (info.getCreateUser() > 0) { |
|
|
|
adminInfo = iSysAdminService.findById(info.getCreateUser()); |