From 6a7663dce66131bc904e215e00645ead6fcb1925 Mon Sep 17 00:00:00 2001 From: ant Date: Wed, 24 Jul 2024 18:46:54 +0800 Subject: [PATCH] =?UTF-8?q?1.=20=E8=B0=83=E6=95=B4bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/dict/annotation/DictFormat.java | 5 ++ .../dict/jackson/DictJsonSerializer.java | 9 ++-- .../common/excel/convert/DictConvert.java | 24 ++++++++++ .../common/excel/listener/DataListener.java | 3 ++ .../terminal/dto/StoreImportDTO.java | 28 ++++++----- .../work/dto/WrkInfoPhoneImportDTO.java | 3 ++ .../inspection/work/query/WrkInfoQuery.java | 5 ++ .../inspection/work/vo/WrkInfoExportVO.java | 6 +++ .../project/service/PollingTaskService.java | 6 +++ .../service/impl/PollingTaskServiceImpl.java | 17 ++----- .../terminal/service/TerminalService.java | 2 +- .../service/impl/StoreImportServiceImpl.java | 48 ++++++------------- .../service/impl/TerminalServiceImpl.java | 11 ++++- .../inspection/work/mapper/WrkInfoMapper.java | 3 +- .../service/impl/WrkIcbcJsServiceImpl.java | 9 +++- .../work/service/impl/WrkInfoServiceImpl.java | 11 +++-- .../main/resources/mapper/TerminalMapper.xml | 2 + .../main/resources/mapper/WrkInfoMapper.xml | 11 +++++ .../mapper/WrkInfoTerminalRecordMapper.xml | 2 + 19 files changed, 135 insertions(+), 70 deletions(-) create mode 100644 chushang-common/chushang-common-office/src/main/java/com/chushang/common/excel/convert/DictConvert.java diff --git a/chushang-common/chushang-common-dict/src/main/java/com/chushang/common/dict/annotation/DictFormat.java b/chushang-common/chushang-common-dict/src/main/java/com/chushang/common/dict/annotation/DictFormat.java index 037f7a6..b16d83a 100644 --- a/chushang-common/chushang-common-dict/src/main/java/com/chushang/common/dict/annotation/DictFormat.java +++ b/chushang-common/chushang-common-dict/src/main/java/com/chushang/common/dict/annotation/DictFormat.java @@ -24,4 +24,9 @@ public @interface DictFormat { * 是否重写覆盖本身key */ boolean rewrite() default false; + + /** + * 根据 label 获取value 值, 默认根据value 获取label 值 + */ + boolean labelGetValue() default false; } diff --git a/chushang-common/chushang-common-dict/src/main/java/com/chushang/common/dict/jackson/DictJsonSerializer.java b/chushang-common/chushang-common-dict/src/main/java/com/chushang/common/dict/jackson/DictJsonSerializer.java index f6eb892..c2757f3 100644 --- a/chushang-common/chushang-common-dict/src/main/java/com/chushang/common/dict/jackson/DictJsonSerializer.java +++ b/chushang-common/chushang-common-dict/src/main/java/com/chushang/common/dict/jackson/DictJsonSerializer.java @@ -22,6 +22,7 @@ public class DictJsonSerializer extends JsonSerializer implements Contex private String dictType; private boolean rewrite; + private boolean labelGetValue; @Override public JsonSerializer createContextual(SerializerProvider prov, BeanProperty property) throws JsonMappingException { @@ -29,6 +30,7 @@ public class DictJsonSerializer extends JsonSerializer implements Contex if (Objects.nonNull(anno) && StrUtil.isNotBlank(anno.dictType())) { this.dictType = anno.dictType(); this.rewrite = anno.rewrite(); + this.labelGetValue = anno.labelGetValue(); return this; } return prov.findValueSerializer(property.getType(), property); @@ -37,15 +39,16 @@ public class DictJsonSerializer extends JsonSerializer implements Contex public void serialize(Object value, JsonGenerator gen, SerializerProvider serializers) throws IOException { try { if (null != value){ - String dictLabel = DictUtils.getDictLabel(dictType, Convert.toStr(value)); + String dict = labelGetValue ? DictUtils.getDictValue(dictType, Convert.toStr(value)) : + DictUtils.getDictLabel(dictType, Convert.toStr(value)); if (rewrite) { // 重写了 原先的 code - gen.writeString(dictLabel); + gen.writeString(dict); }else { // value == code gen.writeObject(value); gen.writeFieldName(gen.getOutputContext().getCurrentName() + "Name"); - gen.writeString(dictLabel); + gen.writeString(dict); } }else { gen.writeObject(value); diff --git a/chushang-common/chushang-common-office/src/main/java/com/chushang/common/excel/convert/DictConvert.java b/chushang-common/chushang-common-office/src/main/java/com/chushang/common/excel/convert/DictConvert.java new file mode 100644 index 0000000..aaf3242 --- /dev/null +++ b/chushang-common/chushang-common-office/src/main/java/com/chushang/common/excel/convert/DictConvert.java @@ -0,0 +1,24 @@ +//package com.chushang.common.excel.convert; +// +//import com.alibaba.excel.converters.Converter; +//import com.alibaba.excel.converters.WriteConverterContext; +//import com.alibaba.excel.metadata.data.WriteCellData; +//import lombok.extern.slf4j.Slf4j; +// +//@Slf4j +//public class DictConvert implements Converter { +// /** +// *

转换单元格数据

+// * +// * @param value Java 数据 +// * @param contentProperty 内容属性 +// * @param globalConfiguration 全局配置 +// * @return excel中的数据 +// * @author 单傲 +// * @date 2023/4/19 18:11 +// */ +// public WriteCellData convertToExcelData(WriteConverterContext context) throws Exception { +// return convertToExcelData(context.getValue(), context.getContentProperty(), +// context.getWriteContext().currentWriteHolder().globalConfiguration()); +// } +//} diff --git a/chushang-common/chushang-common-office/src/main/java/com/chushang/common/excel/listener/DataListener.java b/chushang-common/chushang-common-office/src/main/java/com/chushang/common/excel/listener/DataListener.java index 00bf995..104da0d 100644 --- a/chushang-common/chushang-common-office/src/main/java/com/chushang/common/excel/listener/DataListener.java +++ b/chushang-common/chushang-common-office/src/main/java/com/chushang/common/excel/listener/DataListener.java @@ -27,6 +27,9 @@ public class DataListener extends AnalysisEventListener { dataList.add(data); } + /** + * 可以对每一行数据进行校验 + */ @Override public void doAfterAllAnalysed(AnalysisContext analysisContext) { diff --git a/chushang-modules/chushang-module-inspection/inspection-feign/src/main/java/com/chushang/inspection/terminal/dto/StoreImportDTO.java b/chushang-modules/chushang-module-inspection/inspection-feign/src/main/java/com/chushang/inspection/terminal/dto/StoreImportDTO.java index ba24a62..bc1c19e 100644 --- a/chushang-modules/chushang-module-inspection/inspection-feign/src/main/java/com/chushang/inspection/terminal/dto/StoreImportDTO.java +++ b/chushang-modules/chushang-module-inspection/inspection-feign/src/main/java/com/chushang/inspection/terminal/dto/StoreImportDTO.java @@ -72,12 +72,7 @@ public class StoreImportDTO implements Serializable { @ExcelProperty(value = "门店名称") @Size(max = 128, message = "门店名称不能大于128个字符") private String shopName; - /** - * 现有其他收单产品 - */ - @ExcelProperty(value = "现有其他收单产品") - @Size(max = 50, message = "现有其他收单产品不能大于50个字符") - private String products; + /** * 商户提示工具 */ @@ -87,15 +82,16 @@ public class StoreImportDTO implements Serializable { /** * 商户类型 */ - @DictFormat(dictType = "store_type", rewrite = true) + @DictFormat(dictType = "store_type", labelGetValue = true, rewrite = true) @ExcelProperty(value = "商户类型") private String storeType; /** * 巡检频次 */ - @DictFormat(dictType = "ins_fre", rewrite = true) - @Range(min = 1, max = 5, message = "巡检频次非法") + +// @Range(min = 1, max = 5, message = "巡检频次非法") @ExcelProperty(value = "巡检频次") + @DictFormat(dictType = "ins_fre", labelGetValue = true, rewrite = true) private String insFre; /** * 终端sn号 @@ -124,14 +120,14 @@ public class StoreImportDTO implements Serializable { /** * 终端来源 */ - @DictFormat(dictType = "terminal_source", rewrite = true) + @DictFormat(dictType = "terminal_source", labelGetValue = true, rewrite = true) @Range(min = 1, max = 3, message = "终端来源非法") @ExcelProperty(value = "终端来源") private String terminalSource; /** * 终端类型 */ - @DictFormat(dictType = "terminal_type", rewrite = true) + @DictFormat(dictType = "terminal_type", labelGetValue = true, rewrite = true) @Range(min = 1, max = 9, message = "终端类型非法") @ExcelProperty(value = "终端类型") private String terminalType; @@ -148,10 +144,18 @@ public class StoreImportDTO implements Serializable { @Past(message = "必须是过去的日期") @DateTimeFormat(DatePattern.CHINESE_DATE_PATTERN) private LocalDate registerTime; + + /** + * 现有其他收单产品 + */ + @ExcelProperty(value = "现有其他收单产品") + @Size(max = 50, message = "现有其他收单产品不能大于50个字符") + private String products; + /** * 操作员账号 */ - @ExcelProperty(value = "pos编号") + @ExcelProperty(value = "操作员编号") @Size(max = 50, message = "操作员编号不能大于50个字符") private String adminIds; /** diff --git a/chushang-modules/chushang-module-inspection/inspection-feign/src/main/java/com/chushang/inspection/work/dto/WrkInfoPhoneImportDTO.java b/chushang-modules/chushang-module-inspection/inspection-feign/src/main/java/com/chushang/inspection/work/dto/WrkInfoPhoneImportDTO.java index fbf98cc..aeb0990 100644 --- a/chushang-modules/chushang-module-inspection/inspection-feign/src/main/java/com/chushang/inspection/work/dto/WrkInfoPhoneImportDTO.java +++ b/chushang-modules/chushang-module-inspection/inspection-feign/src/main/java/com/chushang/inspection/work/dto/WrkInfoPhoneImportDTO.java @@ -3,6 +3,7 @@ package com.chushang.inspection.work.dto; import cn.hutool.core.date.DatePattern; import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.format.DateTimeFormat; +import com.chushang.common.dict.annotation.DictFormat; import lombok.Data; import java.time.LocalDateTime; @@ -27,6 +28,7 @@ public class WrkInfoPhoneImportDTO { @ExcelProperty("终端编号") private String terminalNo; @ExcelProperty("终端类型") + @DictFormat(dictType = "terminal_type", rewrite = true, labelGetValue = true) private String terminalType; @ExcelProperty("建档日期") @DateTimeFormat(DatePattern.CHINESE_DATE_PATTERN) @@ -35,6 +37,7 @@ public class WrkInfoPhoneImportDTO { @DateTimeFormat(DatePattern.CHINESE_DATE_PATTERN) private LocalDateTime disposeTime; @ExcelProperty("商户类型") + @DictFormat(dictType = "store_type", rewrite = true, labelGetValue = true) private String storeType; @ExcelProperty("巡检结果") private String wrkResult; diff --git a/chushang-modules/chushang-module-inspection/inspection-feign/src/main/java/com/chushang/inspection/work/query/WrkInfoQuery.java b/chushang-modules/chushang-module-inspection/inspection-feign/src/main/java/com/chushang/inspection/work/query/WrkInfoQuery.java index 6cedcf8..a9c39da 100644 --- a/chushang-modules/chushang-module-inspection/inspection-feign/src/main/java/com/chushang/inspection/work/query/WrkInfoQuery.java +++ b/chushang-modules/chushang-module-inspection/inspection-feign/src/main/java/com/chushang/inspection/work/query/WrkInfoQuery.java @@ -78,4 +78,9 @@ public class WrkInfoQuery extends CommonParam { */ @Condition(name = "lower_task_id", type = Condition.ConditionType.in, tableName = "i") private List lowerTaskIds; + + /** + * 根据id 下载 + */ + private List ids; } diff --git a/chushang-modules/chushang-module-inspection/inspection-feign/src/main/java/com/chushang/inspection/work/vo/WrkInfoExportVO.java b/chushang-modules/chushang-module-inspection/inspection-feign/src/main/java/com/chushang/inspection/work/vo/WrkInfoExportVO.java index afc966b..6b5583c 100644 --- a/chushang-modules/chushang-module-inspection/inspection-feign/src/main/java/com/chushang/inspection/work/vo/WrkInfoExportVO.java +++ b/chushang-modules/chushang-module-inspection/inspection-feign/src/main/java/com/chushang/inspection/work/vo/WrkInfoExportVO.java @@ -1,7 +1,11 @@ package com.chushang.inspection.work.vo; +import cn.hutool.core.date.DatePattern; import com.alibaba.excel.annotation.ExcelProperty; +import com.alibaba.fastjson.annotation.JSONField; +import com.chushang.common.dict.annotation.DictFormat; import com.chushang.inspection.terminal.vo.FiveStoreVO; +import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; import java.io.Serial; @@ -26,6 +30,7 @@ public class WrkInfoExportVO implements java.io.Serializable{ private String workNo; @ExcelProperty(value = "创建时间", index = 2) + @JsonFormat(pattern = DatePattern.NORM_DATETIME_PATTERN) private LocalDateTime createTime; @ExcelProperty(value = "legalName", index = 3) @@ -41,6 +46,7 @@ public class WrkInfoExportVO implements java.io.Serializable{ private String terminalNo; @ExcelProperty(value = "终端来源", index = 7) + @DictFormat(dictType = "terminal_source") private String terminalSource; @ExcelProperty(value = "终端地址", index = 8) diff --git a/chushang-modules/chushang-module-inspection/inspection-service/src/main/java/com/chushang/inspection/project/service/PollingTaskService.java b/chushang-modules/chushang-module-inspection/inspection-service/src/main/java/com/chushang/inspection/project/service/PollingTaskService.java index 149d956..cd7b6d4 100644 --- a/chushang-modules/chushang-module-inspection/inspection-service/src/main/java/com/chushang/inspection/project/service/PollingTaskService.java +++ b/chushang-modules/chushang-module-inspection/inspection-service/src/main/java/com/chushang/inspection/project/service/PollingTaskService.java @@ -1,5 +1,6 @@ package com.chushang.inspection.project.service; +import cn.hutool.core.util.ObjectUtil; import com.baomidou.mybatisplus.extension.service.IService; import com.chushang.common.mybatis.page.CommonParam; import com.chushang.inspection.project.dto.TaskDTO; @@ -38,4 +39,9 @@ public interface PollingTaskService extends IService{ PollingTask getTopTask(Long taskId); + default String getTaskNameById(Long taskId){ + PollingTask task = getById(taskId); + return ObjectUtil.isNotEmpty(task) ? task.getName() : ""; + } + } diff --git a/chushang-modules/chushang-module-inspection/inspection-service/src/main/java/com/chushang/inspection/project/service/impl/PollingTaskServiceImpl.java b/chushang-modules/chushang-module-inspection/inspection-service/src/main/java/com/chushang/inspection/project/service/impl/PollingTaskServiceImpl.java index 6093467..e15d4ac 100644 --- a/chushang-modules/chushang-module-inspection/inspection-service/src/main/java/com/chushang/inspection/project/service/impl/PollingTaskServiceImpl.java +++ b/chushang-modules/chushang-module-inspection/inspection-service/src/main/java/com/chushang/inspection/project/service/impl/PollingTaskServiceImpl.java @@ -13,6 +13,7 @@ import com.alibaba.nacos.shaded.com.google.common.collect.Maps; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.chushang.common.core.constant.SecurityConstants; +import com.chushang.common.core.util.DateUtils; import com.chushang.common.core.util.SpringUtils; import com.chushang.common.core.util.StringUtils; import com.chushang.common.core.util.TreeUtils; @@ -92,26 +93,18 @@ public class PollingTaskServiceImpl extends ServiceImpl findTopList(CommonParam commonParam) { LambdaQueryWrapper searchNumSql = WrapperUtils.builder(commonParam, commonParam); - searchNumSql.select(PollingTask::getSearchNum) + searchNumSql + .eq(PollingTask::getParentId, 0) .eq(PollingTask::getEnabled, 1) .and(w -> w.isNull(PollingTask::getEndTime) - .or().ge(PollingTask::getEndTime, LocalDateTime.now())); + .or().ge(PollingTask::getEndTime, DateUtils.format(LocalDateTime.now()))); List list = list(searchNumSql); - List searchNums; if (CollectionUtil.isNotEmpty(list)){ - searchNums = list.stream().map(PollingTask::getSearchNum).toList(); + return list.stream().map(this::convert).collect(Collectors.toList()); }else { return new ArrayList<>(); } - Set searchNumSet = searchNums.stream().map(s -> s.split("-")[0] + '-').collect(Collectors.toSet()); - LambdaQueryWrapper topSql = WrapperUtils.builder(commonParam, commonParam); - topSql.in(CollectionUtil.isNotEmpty(searchNumSet), PollingTask::getSearchNum, searchNumSet); - List topList = list(topSql); - if (CollectionUtil.isNotEmpty(topList)){ - return topList.stream().map(this::convert).collect(Collectors.toList()); - } - return new ArrayList<>(); } @Override diff --git a/chushang-modules/chushang-module-inspection/inspection-service/src/main/java/com/chushang/inspection/terminal/service/TerminalService.java b/chushang-modules/chushang-module-inspection/inspection-service/src/main/java/com/chushang/inspection/terminal/service/TerminalService.java index 9b94218..0c2d267 100644 --- a/chushang-modules/chushang-module-inspection/inspection-service/src/main/java/com/chushang/inspection/terminal/service/TerminalService.java +++ b/chushang-modules/chushang-module-inspection/inspection-service/src/main/java/com/chushang/inspection/terminal/service/TerminalService.java @@ -57,7 +57,7 @@ public interface TerminalService extends IService{ JSONObject save(Store store, WrkIcbcJsReceive dto); - int updateTerminalAndStore(TerminalQuery query); + long updateTerminalAndStore(TerminalQuery query); diff --git a/chushang-modules/chushang-module-inspection/inspection-service/src/main/java/com/chushang/inspection/terminal/service/impl/StoreImportServiceImpl.java b/chushang-modules/chushang-module-inspection/inspection-service/src/main/java/com/chushang/inspection/terminal/service/impl/StoreImportServiceImpl.java index 8efe2ca..f92792d 100644 --- a/chushang-modules/chushang-module-inspection/inspection-service/src/main/java/com/chushang/inspection/terminal/service/impl/StoreImportServiceImpl.java +++ b/chushang-modules/chushang-module-inspection/inspection-service/src/main/java/com/chushang/inspection/terminal/service/impl/StoreImportServiceImpl.java @@ -13,6 +13,7 @@ import com.chushang.common.core.constant.SecurityConstants; import com.chushang.common.core.util.StringUtils; import com.chushang.common.core.web.Result; import com.chushang.common.dict.feign.RemoteDictDataService; +import com.chushang.common.dict.utils.DictUtils; import com.chushang.common.mybatis.page.CommonParam; import com.chushang.common.mybatis.utils.PageResult; import com.chushang.common.mybatis.utils.WrapperUtils; @@ -52,10 +53,7 @@ import java.time.LocalDate; import java.time.LocalDateTime; import java.time.LocalTime; import java.time.format.DateTimeFormatter; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import java.util.*; /** * @auther: zhao @@ -95,49 +93,36 @@ public class StoreImportServiceImpl extends ServiceImpl data){ + public Store genStoreEntity(StoreImportDTO storeImportDTO) { // 通过任务名称查询任务 List list = pollingTaskService.list(new LambdaQueryWrapper().eq(PollingTask::getName, storeImportDTO.getTaskName())); - if (CollectionUtil.isEmpty(list)){ + if (CollectionUtil.isEmpty(list)) { throw new RuntimeException("任务名称不存在"); } PollingTask topTask = pollingTaskService.getTopTask(list.get(0).getId()); Store store = new Store(); store.setAccountManager(storeImportDTO.getAccountManager()); - store.setDelState(true); store.setAccountPhone(storeImportDTO.getAccountPhone()); store.setLegalName(storeImportDTO.getLegalName()); store.setSpecialNum(storeImportDTO.getSpecialNum()); store.setShopName(storeImportDTO.getShopName()); store.setProducts(storeImportDTO.getProducts()); store.setTipTool(storeImportDTO.getTipTool()); - LocalDateTime registerTime = LocalDateTime.now(); - - Integer insFre = 0; - try{ - insFre = Integer.valueOf(storeImportDTO.getInsFre()); - }catch (Exception e){ - insFre = -1; - } - - try{ - LocalDate registerDate = storeImportDTO.getRegisterTime(); - registerTime = LocalDateTime.of(registerDate, LocalTime.MIDNIGHT); - }catch (Exception e){ - registerTime = LocalDateTime.now(); - } - store.setInsFre(insFre); + LocalDate registerDate = storeImportDTO.getRegisterTime(); + LocalDateTime registerTime = LocalDateTime.of(registerDate, LocalTime.MIDNIGHT); + store.setInsFre(null != storeImportDTO.getInsFre() ? Integer.valueOf(storeImportDTO.getInsFre()) : null); store.setStoreNo(storeImportDTO.getStoreNo()); store.setStoreName(storeImportDTO.getStoreName()); store.setStoreAddress(storeImportDTO.getStoreAddress()); store.setStoreContact(storeImportDTO.getStoreContact()); store.setStorePhone(storeImportDTO.getStorePhone()); - store.setStoreType(1); + store.setStoreType(null != storeImportDTO.getStoreType() ? Integer.valueOf(storeImportDTO.getStoreType()) : null); store.setRegisterTime(registerTime); // registertime store.setTaskId(topTask.getId()); store.setDeptId(SecurityUtils.getDeptId()); store.setLowerTaskId(list.get(0).getId()); store.setStoreId(IdUtil.getSnowflake().nextId()); + store.setDelState(false); return store; } @@ -145,12 +130,6 @@ public class StoreImportServiceImpl extends ServiceImpl lists) { int i = 0; - Result> storeType = remoteDictDataService.getInfo("store_type", SecurityConstants.INNER); - Map data = new HashMap<>(); - //todo 将返回的map一一对应 - if(storeType.isSuccess()){ - data = storeType.getData(); - } // 商户类型枚举 for (StoreImportDTO storeImportDTO : lists) { i++; @@ -158,15 +137,17 @@ public class StoreImportServiceImpl extends ServiceImpl i @Override @Transactional(rollbackFor = Exception.class) - public int updateTerminalAndStore(TerminalQuery query) { + public long updateTerminalAndStore(TerminalQuery query) { + /** + * 当前终端 + */ + Terminal curTerminal = getById(query.getTerminalId()); + AssertUtil.invalidate(ObjectUtil.isEmpty(curTerminal), "未找寻到对应的终端信息"); Terminal terminal = BeanCopyUtils.copy(query, Terminal.class); updateById(terminal); Store store = BeanCopyUtils.copy(query, Store.class); + store.setStoreId(curTerminal.getStoreId()); storeService.updateById(store); - return 1; + return query.getTerminalId(); } } diff --git a/chushang-modules/chushang-module-inspection/inspection-service/src/main/java/com/chushang/inspection/work/mapper/WrkInfoMapper.java b/chushang-modules/chushang-module-inspection/inspection-service/src/main/java/com/chushang/inspection/work/mapper/WrkInfoMapper.java index d378aa4..ad6d6b6 100644 --- a/chushang-modules/chushang-module-inspection/inspection-service/src/main/java/com/chushang/inspection/work/mapper/WrkInfoMapper.java +++ b/chushang-modules/chushang-module-inspection/inspection-service/src/main/java/com/chushang/inspection/work/mapper/WrkInfoMapper.java @@ -31,6 +31,5 @@ public interface WrkInfoMapper extends BaseMapper { WrkInfoDetailsVO getWrkInfoDetails(@Param("wrkId") Long wrkId); @DataScope(deptAlias = "i") - List exportDispatchPage(@Param("query") WrkInfoQuery query, - Page page); + List exportDispatchPage(@Param("query") WrkInfoQuery query); } diff --git a/chushang-modules/chushang-module-inspection/inspection-service/src/main/java/com/chushang/inspection/work/service/impl/WrkIcbcJsServiceImpl.java b/chushang-modules/chushang-module-inspection/inspection-service/src/main/java/com/chushang/inspection/work/service/impl/WrkIcbcJsServiceImpl.java index 54517fa..c67e227 100644 --- a/chushang-modules/chushang-module-inspection/inspection-service/src/main/java/com/chushang/inspection/work/service/impl/WrkIcbcJsServiceImpl.java +++ b/chushang-modules/chushang-module-inspection/inspection-service/src/main/java/com/chushang/inspection/work/service/impl/WrkIcbcJsServiceImpl.java @@ -148,13 +148,20 @@ public class WrkIcbcJsServiceImpl extends ServiceImpl impl RemoteUserService userFeignService; @Resource GeneratedInsFactory generatedInsFactory; + @Resource + PollingTaskService pollingTaskService; @Value("${push.icbc-js.enable:false}") private boolean enable; @Override public void exportDispatchPage(HttpServletResponse response, WrkInfoQuery query) { - CommonParam commonParam = CommonParam.buildPageRequest(); WrapperUtils.buildSql(query); - Page page = new Page<>(commonParam.getPage(), commonParam.getLimit()); - List records = baseMapper.exportDispatchPage(query, page); + List records = baseMapper.exportDispatchPage(query); ExcelUtils.exportList(response, WrkInfoExportVO.class, records, "导出派单"); } @@ -686,6 +688,9 @@ public class WrkInfoServiceImpl extends ServiceImpl impl wrkInfo.setWorkSource(query.getWorkSource()); wrkInfo.setTaskId(dispatch.getTaskId()); wrkInfo.setLowerTaskId(dispatch.getLowerTaskId()); + wrkInfo.setTaskName(pollingTaskService.getTaskNameById(dispatch.getTaskId())); + wrkInfo.setLowerTaskName(pollingTaskService.getTaskNameById(dispatch.getLowerTaskId())); + // wrkInfo.setVersion(0L); // 处理时间 //wrkInfo.setDisposeTime(query.getEndTime()); diff --git a/chushang-modules/chushang-module-inspection/inspection-service/src/main/resources/mapper/TerminalMapper.xml b/chushang-modules/chushang-module-inspection/inspection-service/src/main/resources/mapper/TerminalMapper.xml index 2232588..d38954d 100644 --- a/chushang-modules/chushang-module-inspection/inspection-service/src/main/resources/mapper/TerminalMapper.xml +++ b/chushang-modules/chushang-module-inspection/inspection-service/src/main/resources/mapper/TerminalMapper.xml @@ -68,6 +68,7 @@ pt.id AS task_id, pt.`name` AS taskName, s.lower_task_id AS lowerTaskId, + lpt.`name` AS lowerTaskName, s.dept_id AS deptId, s.store_id AS storeId, s.store_no AS storeNo, @@ -114,6 +115,7 @@ INNER JOIN st_store s ON t.store_id = s.store_id INNER JOIN ta_polling_task pt ON t.task_id = pt.id INNER JOIN wrk_project p ON pt.project_id = p.project_id + LEFT JOIN ta_polling_task lpt ON t.lower_task_id = lpt.id where t.del_state = 0 + + + + + + + + + + +