From 6ffbbb0a762ace07b410b67a961e87a3040655b3 Mon Sep 17 00:00:00 2001 From: luozukai Date: Fri, 18 Jan 2019 10:56:42 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=AE=A1=E6=89=B9=E6=B5=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iformall/service/impl/WxCUserBasicInfoServiceImpl.java | 6 ++++-- .../java/com/iformall/service/impl/WxFlowServiceImpl.java | 6 +++++- .../src/main/resources/mapper/WxFlowRecordMapper.xml | 3 --- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxCUserBasicInfoServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxCUserBasicInfoServiceImpl.java index 8c56b67e4..61db1cb94 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxCUserBasicInfoServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxCUserBasicInfoServiceImpl.java @@ -646,7 +646,8 @@ public class WxCUserBasicInfoServiceImpl implements WxCUserBasicInfoService { try { File file = new File(filepath); workbook = new SXSSFWorkbook(100); - SXSSFSheet sheetTwo = workbook.createSheet((record.getIsPay()!=null && 1==record.getIsPay())?"线上缴费车辆列表":"进出车辆列表"); + String sheetName = (record.getIsPay()!=null && 1==record.getIsPay())?"线上缴费车辆列表":"进出车辆列表"; + SXSSFSheet sheetTwo = workbook.createSheet(sheetName); Row rowtwo = sheetTwo.createRow(0); Cell cell1 = rowtwo.createCell(0); Cell cell2 = rowtwo.createCell(1); @@ -686,7 +687,8 @@ public class WxCUserBasicInfoServiceImpl implements WxCUserBasicInfoService { workbook.write(fileOut); fileOut.close(); workbook.close(); - downFile(filepath, filename,(record.getIsPay()!=null && 1==record.getIsPay())?"线上缴费车辆数据":"进出车辆数据"+".xlsx",response, request); + String name = (record.getIsPay()!=null && 1==record.getIsPay())?"线上缴费车辆数据":"进出车辆数据"; + downFile(filepath, filename,name+".xlsx",response, request); FileUtils.forceDelete(file); } catch (Exception e) { e.printStackTrace(); diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java index 3c6a24e36..b6e2841a7 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java @@ -180,6 +180,9 @@ public class WxFlowServiceImpl implements WxFlowService { @Override public ResultData getTaskStatusList(Long businessId, String tenantId) { List resultList = wxFlowRecordService.findList(new WxFlowRecord(businessId,tenantId)); + if(CollectionUtils.isEmpty(resultList)){ + return new ResultData(); + } String processInstanceId = resultList.get(0).getProcessInstanceId(); ProcessInstance pi = runtimeService.createProcessInstanceQuery().processInstanceId(processInstanceId).singleResult(); Task task = taskService.createTaskQuery().processInstanceId(pi.getId()).singleResult(); @@ -201,7 +204,8 @@ public class WxFlowServiceImpl implements WxFlowService { wxFlowRecord.setStatus(EnumFlowRecordStatus.ASSIGNEE.getCode()); resultList.add(0,wxFlowRecord); - if(i != taskAssigneeList.size()-1){ //不是最后一个节点,设置下一个待审批节点代办人 + //不是最后一个节点,设置下一个待审批节点代办人 + if(i != taskAssigneeList.size()-1){ assignee = taskAssigneeList.get(i+1); assigneeArray = assignee.get("assignee").split(","); userName = ""; diff --git a/mallinkService/src/main/resources/mapper/WxFlowRecordMapper.xml b/mallinkService/src/main/resources/mapper/WxFlowRecordMapper.xml index 87e47cb52..66c8a6ccc 100644 --- a/mallinkService/src/main/resources/mapper/WxFlowRecordMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxFlowRecordMapper.xml @@ -28,9 +28,6 @@ and `id` = #{id} - - and `tenant_id` like concat('%', #{tenantId},'%') - and `business_id` = #{businessId}