物流司机信息
This commit is contained in:
parent
62f05ffba9
commit
adea21c192
@ -0,0 +1,190 @@
|
||||
package org.jeecg.modules.tms.basicdata.logisticsdriver.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
import java.io.IOException;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLDecoder;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.system.query.QueryGenerator;
|
||||
import org.jeecg.common.util.oConvertUtils;
|
||||
import org.jeecg.modules.tms.basicdata.logisticsdriver.entity.LogisticsDriver;
|
||||
import org.jeecg.modules.tms.basicdata.logisticsdriver.service.ILogisticsDriverService;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.jeecg.modules.tms.basicdata.vehiclepallet.entity.VehiclePallet;
|
||||
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
||||
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||
import org.jeecgframework.poi.excel.entity.ImportParams;
|
||||
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
||||
import org.jeecg.common.system.base.controller.JeecgController;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||
|
||||
/**
|
||||
* @Description: 物流司机信息
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-04-25
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="物流司机信息")
|
||||
@RestController
|
||||
@RequestMapping("/logisticsdriver/logisticsDriver")
|
||||
@Slf4j
|
||||
public class LogisticsDriverController extends JeecgController<LogisticsDriver, ILogisticsDriverService> {
|
||||
@Autowired
|
||||
private ILogisticsDriverService logisticsDriverService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param logisticsDriver
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "物流司机信息-分页列表查询")
|
||||
@ApiOperation(value="物流司机信息-分页列表查询", notes="物流司机信息-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<LogisticsDriver>> queryPageList(LogisticsDriver logisticsDriver,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<LogisticsDriver> queryWrapper = QueryGenerator.initQueryWrapper(logisticsDriver, req.getParameterMap());
|
||||
Page<LogisticsDriver> page = new Page<LogisticsDriver>(pageNo, pageSize);
|
||||
IPage<LogisticsDriver> pageList = logisticsDriverService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param logisticsDriver
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "物流司机信息-添加")
|
||||
@ApiOperation(value="物流司机信息-添加", notes="物流司机信息-添加")
|
||||
//@RequiresPermissions("org.jeecg.modules.tms:tms_logistics_driver:add")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody LogisticsDriver logisticsDriver) {
|
||||
logisticsDriverService.save(logisticsDriver);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param logisticsDriver
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "物流司机信息-编辑")
|
||||
@ApiOperation(value="物流司机信息-编辑", notes="物流司机信息-编辑")
|
||||
//@RequiresPermissions("org.jeecg.modules.tms:tms_logistics_driver:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody LogisticsDriver logisticsDriver) {
|
||||
logisticsDriverService.updateById(logisticsDriver);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "物流司机信息-通过id删除")
|
||||
@ApiOperation(value="物流司机信息-通过id删除", notes="物流司机信息-通过id删除")
|
||||
//@RequiresPermissions("org.jeecg.modules.tms:tms_logistics_driver:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
logisticsDriverService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "物流司机信息-批量删除")
|
||||
@ApiOperation(value="物流司机信息-批量删除", notes="物流司机信息-批量删除")
|
||||
//@RequiresPermissions("org.jeecg.modules.tms:tms_logistics_driver:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.logisticsDriverService.removeByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "物流司机信息-通过id查询")
|
||||
@ApiOperation(value="物流司机信息-通过id查询", notes="物流司机信息-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<LogisticsDriver> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
LogisticsDriver logisticsDriver = logisticsDriverService.getById(id);
|
||||
if(logisticsDriver==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(logisticsDriver);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param logisticsDriver
|
||||
*/
|
||||
//@RequiresPermissions("org.jeecg.modules.tms:tms_logistics_driver:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, LogisticsDriver logisticsDriver) {
|
||||
return super.exportXls(request, logisticsDriver, LogisticsDriver.class, "物流司机信息");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
//@RequiresPermissions("tms_logistics_driver:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, LogisticsDriver.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询司机信息
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(value = "/getDriverInfo")
|
||||
public Result<?> getDriverInfo() {
|
||||
List<LogisticsDriver> list = logisticsDriverService.list();
|
||||
List<String> strings = list.stream().map(s -> s.getLogistics() + "&-" + s.getCarNum() + "&-" +
|
||||
s.getDriverName() + "&-" + s.getDriverTel() + "&-" + s.getDriverIdCard())
|
||||
.distinct().collect(Collectors.toList());
|
||||
return Result.OK(strings);
|
||||
}
|
||||
}
|
@ -0,0 +1,78 @@
|
||||
package org.jeecg.modules.tms.basicdata.logisticsdriver.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.jeecg.common.aspect.annotation.Dict;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* @Description: 物流司机信息
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-04-25
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("tms_logistics_driver")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="tms_logistics_driver对象", description="物流司机信息")
|
||||
public class LogisticsDriver implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "主键")
|
||||
private java.lang.String id;
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private java.lang.String createBy;
|
||||
/**创建日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
private java.util.Date createTime;
|
||||
/**更新人*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private java.lang.String updateBy;
|
||||
/**更新日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "更新日期")
|
||||
private java.util.Date updateTime;
|
||||
/**所属部门*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
private java.lang.String sysOrgCode;
|
||||
/**物流公司*/
|
||||
@Excel(name = "物流公司", width = 15)
|
||||
@ApiModelProperty(value = "物流公司")
|
||||
private java.lang.String logistics;
|
||||
/**车牌号*/
|
||||
@Excel(name = "车牌号", width = 15)
|
||||
@ApiModelProperty(value = "车牌号")
|
||||
private java.lang.String carNum;
|
||||
/**姓名*/
|
||||
@Excel(name = "姓名", width = 15)
|
||||
@ApiModelProperty(value = "姓名")
|
||||
private java.lang.String driverName;
|
||||
/**身份证*/
|
||||
@Excel(name = "身份证", width = 15)
|
||||
@ApiModelProperty(value = "身份证")
|
||||
private java.lang.String driverIdCard;
|
||||
/**电话*/
|
||||
@Excel(name = "电话", width = 15)
|
||||
@ApiModelProperty(value = "电话")
|
||||
private java.lang.String driverTel;
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
package org.jeecg.modules.tms.basicdata.logisticsdriver.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.jeecg.modules.tms.basicdata.logisticsdriver.entity.LogisticsDriver;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 物流司机信息
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-04-25
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface LogisticsDriverMapper extends BaseMapper<LogisticsDriver> {
|
||||
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.jeecg.modules.tms.basicdata.logisticsdriver.mapper.LogisticsDriverMapper">
|
||||
|
||||
</mapper>
|
@ -0,0 +1,14 @@
|
||||
package org.jeecg.modules.tms.basicdata.logisticsdriver.service;
|
||||
|
||||
import org.jeecg.modules.tms.basicdata.logisticsdriver.entity.LogisticsDriver;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @Description: 物流司机信息
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-04-25
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface ILogisticsDriverService extends IService<LogisticsDriver> {
|
||||
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package org.jeecg.modules.tms.basicdata.logisticsdriver.service.impl;
|
||||
|
||||
import org.jeecg.modules.tms.basicdata.logisticsdriver.entity.LogisticsDriver;
|
||||
import org.jeecg.modules.tms.basicdata.logisticsdriver.mapper.LogisticsDriverMapper;
|
||||
import org.jeecg.modules.tms.basicdata.logisticsdriver.service.ILogisticsDriverService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* @Description: 物流司机信息
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-04-25
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class LogisticsDriverServiceImpl extends ServiceImpl<LogisticsDriverMapper, LogisticsDriver> implements ILogisticsDriverService {
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user