派单导出
This commit is contained in:
parent
4b2eac7261
commit
4e4d8d9de6
|
|
@ -0,0 +1,48 @@
|
||||||
|
package com.chushang.inspection.work.vo;
|
||||||
|
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
|
import com.chushang.inspection.terminal.vo.FiveStoreVO;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @auther: zhao
|
||||||
|
* @date: 2024/6/28 10:30
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class WrkInfoExportVO implements java.io.Serializable{
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "客户名称", index = 0)
|
||||||
|
private String userName;
|
||||||
|
|
||||||
|
|
||||||
|
@ExcelProperty(value = "工单编号", index = 1)
|
||||||
|
private String workNo;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "创建时间", index = 2)
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "legalName", index = 3)
|
||||||
|
private String legalName;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "终端ID", index = 4)
|
||||||
|
private String terminalId;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "terminalSn", index = 5)
|
||||||
|
private String terminalSn;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "终端编号", index = 6)
|
||||||
|
private String terminalNo;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "终端来源", index = 7)
|
||||||
|
private String terminalSource;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "终端地址", index = 8)
|
||||||
|
private String terminalAddress;
|
||||||
|
}
|
||||||
|
|
@ -1,8 +1,6 @@
|
||||||
package com.chushang.inspection.work.controller;
|
package com.chushang.inspection.work.controller;
|
||||||
|
|
||||||
|
|
||||||
import cn.hutool.core.collection.ListUtil;
|
|
||||||
import cn.hutool.core.lang.Assert;
|
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.chushang.common.core.web.AjaxResult;
|
import com.chushang.common.core.web.AjaxResult;
|
||||||
import com.chushang.common.log.annotation.SysLog;
|
import com.chushang.common.log.annotation.SysLog;
|
||||||
|
|
@ -24,6 +22,7 @@ import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.text.NumberFormat;
|
import java.text.NumberFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
@ -41,6 +40,18 @@ public class WrkInfoController {
|
||||||
@Resource
|
@Resource
|
||||||
WrkInfoService wrkInfoService;
|
WrkInfoService wrkInfoService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出
|
||||||
|
* todo
|
||||||
|
*/
|
||||||
|
@SysLog(value = "导出列表", businessType = BusinessType.EXPORT)
|
||||||
|
@GetMapping("/exportDispatchPage")
|
||||||
|
@RequiresPermissions("wrk:dispatch:export")
|
||||||
|
public void exportDispatchPage(HttpServletResponse response, WrkInfoQuery query) {
|
||||||
|
// 派单领取列表, 就是 已经派出的工单以及领取的工单,
|
||||||
|
wrkInfoService.exportDispatchPage(response,query);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询派单/领取列表 --> 查询派单领取
|
* 查询派单/领取列表 --> 查询派单领取
|
||||||
|
|
@ -152,8 +163,9 @@ public class WrkInfoController {
|
||||||
@PostMapping("/dispatch/app")
|
@PostMapping("/dispatch/app")
|
||||||
@RequiresPermissions("wrk:dispatch")
|
@RequiresPermissions("wrk:dispatch")
|
||||||
@SysLog(value = "批量派单/领取", businessType = BusinessType.IMPORT)
|
@SysLog(value = "批量派单/领取", businessType = BusinessType.IMPORT)
|
||||||
public void dispatchApp(@RequestBody @Validated DispatchQuery query) {
|
public AjaxResult dispatchApp(@RequestBody @Validated DispatchQuery query) {
|
||||||
wrkInfoService.dispatch(query, 0);
|
wrkInfoService.dispatch(query, 0);
|
||||||
|
return AjaxResult.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -7,10 +7,7 @@ import com.chushang.inspection.work.po.WrkInfo;
|
||||||
import com.chushang.inspection.work.query.ReviewedQuery;
|
import com.chushang.inspection.work.query.ReviewedQuery;
|
||||||
import com.chushang.inspection.work.query.WrkAppQuery;
|
import com.chushang.inspection.work.query.WrkAppQuery;
|
||||||
import com.chushang.inspection.work.query.WrkInfoQuery;
|
import com.chushang.inspection.work.query.WrkInfoQuery;
|
||||||
import com.chushang.inspection.work.vo.WrkAuditVO;
|
import com.chushang.inspection.work.vo.*;
|
||||||
import com.chushang.inspection.work.vo.WrkDispatchVO;
|
|
||||||
import com.chushang.inspection.work.vo.WrkInfoDetailsVO;
|
|
||||||
import com.chushang.inspection.work.vo.WrkListAppVO;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
@ -32,4 +29,8 @@ public interface WrkInfoMapper extends BaseMapper<WrkInfo> {
|
||||||
List<WrkInfoDetailsVO> listInsTemplate(@Param("query") ReviewedQuery query);
|
List<WrkInfoDetailsVO> listInsTemplate(@Param("query") ReviewedQuery query);
|
||||||
|
|
||||||
WrkInfoDetailsVO getWrkInfoDetails(@Param("wrkId") Long wrkId);
|
WrkInfoDetailsVO getWrkInfoDetails(@Param("wrkId") Long wrkId);
|
||||||
|
|
||||||
|
@DataScope(deptAlias = "i")
|
||||||
|
List<WrkInfoExportVO> exportDispatchPage(@Param("query") WrkInfoQuery query,
|
||||||
|
Page<WrkInfoExportVO> page);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ import com.chushang.inspection.work.query.WrkAppQuery;
|
||||||
import com.chushang.inspection.work.query.WrkInfoQuery;
|
import com.chushang.inspection.work.query.WrkInfoQuery;
|
||||||
import com.chushang.inspection.work.vo.WrkInfoDetailsVO;
|
import com.chushang.inspection.work.vo.WrkInfoDetailsVO;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -37,4 +38,6 @@ public interface WrkInfoService extends IService<WrkInfo> {
|
||||||
void withdraw(List<Long> ids);
|
void withdraw(List<Long> ids);
|
||||||
|
|
||||||
void audit(AuditDTO audit);
|
void audit(AuditDTO audit);
|
||||||
|
|
||||||
|
void exportDispatchPage(HttpServletResponse response, WrkInfoQuery query);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@ import com.chushang.common.core.util.DateUtils;
|
||||||
import com.chushang.common.core.util.IPUtils;
|
import com.chushang.common.core.util.IPUtils;
|
||||||
import com.chushang.common.core.web.Result;
|
import com.chushang.common.core.web.Result;
|
||||||
import com.chushang.common.dict.utils.DictUtils;
|
import com.chushang.common.dict.utils.DictUtils;
|
||||||
|
import com.chushang.common.excel.utils.ExcelUtils;
|
||||||
import com.chushang.common.mybatis.enums.Operator;
|
import com.chushang.common.mybatis.enums.Operator;
|
||||||
import com.chushang.common.mybatis.page.CommonParam;
|
import com.chushang.common.mybatis.page.CommonParam;
|
||||||
import com.chushang.common.mybatis.utils.PageResult;
|
import com.chushang.common.mybatis.utils.PageResult;
|
||||||
|
|
@ -52,6 +53,7 @@ import com.chushang.inspection.work.query.WrkInfoQuery;
|
||||||
import com.chushang.inspection.work.service.*;
|
import com.chushang.inspection.work.service.*;
|
||||||
import com.chushang.inspection.work.vo.*;
|
import com.chushang.inspection.work.vo.*;
|
||||||
import com.chushang.security.utils.SecurityUtils;
|
import com.chushang.security.utils.SecurityUtils;
|
||||||
|
import com.chushang.system.entity.po.SysDictType;
|
||||||
import com.chushang.task.entity.dto.CreateTaskDTO;
|
import com.chushang.task.entity.dto.CreateTaskDTO;
|
||||||
import com.chushang.task.enums.ServiceEnum;
|
import com.chushang.task.enums.ServiceEnum;
|
||||||
import com.chushang.task.enums.TaskTypeEnum;
|
import com.chushang.task.enums.TaskTypeEnum;
|
||||||
|
|
@ -66,6 +68,7 @@ import com.chushang.inspection.work.mapper.WrkInfoMapper;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
@ -108,6 +111,15 @@ public class WrkInfoServiceImpl extends ServiceImpl<WrkInfoMapper, WrkInfo> impl
|
||||||
@Value("${push.icbc-js.enable:false}")
|
@Value("${push.icbc-js.enable:false}")
|
||||||
private boolean enable;
|
private boolean enable;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void exportDispatchPage(HttpServletResponse response, WrkInfoQuery query) {
|
||||||
|
CommonParam commonParam = CommonParam.buildPageRequest();
|
||||||
|
WrapperUtils.buildSql(query);
|
||||||
|
Page<WrkInfoExportVO> page = new Page<>(commonParam.getPage(), commonParam.getLimit());
|
||||||
|
List<WrkInfoExportVO> records = baseMapper.exportDispatchPage(query, page);
|
||||||
|
ExcelUtils.exportList(response, WrkInfoExportVO.class, records, "导出派单");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PageResult queryDispatchPage(WrkInfoQuery query) {
|
public PageResult queryDispatchPage(WrkInfoQuery query) {
|
||||||
|
|
@ -449,6 +461,8 @@ public class WrkInfoServiceImpl extends ServiceImpl<WrkInfoMapper, WrkInfo> impl
|
||||||
infoAuditService.save(infoAudit);
|
infoAuditService.save(infoAudit);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 计算经纬度 偏差
|
* 计算经纬度 偏差
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,14 @@
|
||||||
ORDER BY i.create_time desc
|
ORDER BY i.create_time desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="exportDispatchPage" resultType="com.chushang.inspection.work.vo.WrkInfoExportVO">
|
||||||
|
<include refid="wrkInfoDetailSql" />
|
||||||
|
<if test="1 == 1">
|
||||||
|
${query.sqlParam.get('sqlWhere')}
|
||||||
|
</if>
|
||||||
|
ORDER BY i.create_time desc
|
||||||
|
</select>
|
||||||
|
|
||||||
<select id="queryArchivePage" resultType="com.chushang.inspection.work.vo.WrkInfoDetailsVO">
|
<select id="queryArchivePage" resultType="com.chushang.inspection.work.vo.WrkInfoDetailsVO">
|
||||||
<include refid="wrkInfoDetailSql" />
|
<include refid="wrkInfoDetailSql" />
|
||||||
<if test="1 == 1">
|
<if test="1 == 1">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue