diff --git a/mallinkAdmin/src/main/java/com/iformall/controller/WxCUserBasicInfoController.java b/mallinkAdmin/src/main/java/com/iformall/controller/WxCUserBasicInfoController.java
index 91632b901..805927250 100644
--- a/mallinkAdmin/src/main/java/com/iformall/controller/WxCUserBasicInfoController.java
+++ b/mallinkAdmin/src/main/java/com/iformall/controller/WxCUserBasicInfoController.java
@@ -419,11 +419,24 @@ public class WxCUserBasicInfoController extends BaseController {
@ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true),
@ApiImplicitParam(name = "startDate", value = "开始时间", dataType = "string", paramType = "query"),
@ApiImplicitParam(name = "endDate", value = "结束时间", dataType = "string", paramType = "query"),
- @ApiImplicitParam(name = "isPay", value = "是否缴费 1是", dataType = "int", paramType = "query"),
+ @ApiImplicitParam(name = "isPay", value = "是否缴费 1是", dataType = "int", paramType = "query")
})
public ResultData carPayList(@ModelAttribute WxCarPayRecord record, Integer pageNum, Integer pageSize){
record.setTenantId(super.getTenantId());
return new ResultData(wxCarPayRecordService.findCarPayListByPage(record,pageNum,pageSize));
}
+ @ApiOperation("停车会员记录导出")
+ @GetMapping("/exportCarPayData")
+ @ApiImplicitParams({
+ @ApiImplicitParam(name = "startDate", value = "开始时间", dataType = "string", paramType = "query"),
+ @ApiImplicitParam(name = "endDate", value = "结束时间", dataType = "string", paramType = "query"),
+ @ApiImplicitParam(name = "isPay", value = "是否缴费 1是", dataType = "int", paramType = "query")
+ })
+ public void exportCarPayData(@ModelAttribute WxCarPayRecord record,HttpServletRequest request, HttpServletResponse response) {
+ logger.debug("[" + getIpAddr() + "] WxCUserBasicInfoController::exportData");
+ record.setTenantId(getTenantId());
+ wxCUserBasicInfoService.exportCarPayData(record, request, response);
+
+ }
}
\ No newline at end of file
diff --git a/mallinkAdmin/src/main/java/com/iformall/controller/WxFlowAbleController.java b/mallinkAdmin/src/main/java/com/iformall/controller/WxFlowAbleController.java
index c61ae34de..84ae25d88 100644
--- a/mallinkAdmin/src/main/java/com/iformall/controller/WxFlowAbleController.java
+++ b/mallinkAdmin/src/main/java/com/iformall/controller/WxFlowAbleController.java
@@ -54,7 +54,20 @@ public class WxFlowAbleController extends BaseController {
})
public ResultData applyHistory(Long businessId) {
logger.debug("[" + getIpAddr() + "] FlowAbleController::applyHistory");
- return wxFlowService.applyHistory(businessId);
+ return wxFlowService.applyHistory(businessId,super.getTenantId());
+ }
+
+ /**
+ * 审批历史和代办
+ */
+ @ApiOperation("审批历史和代办")
+ @GetMapping(value = "/applyHistoryAndAssignee")
+ @ApiImplicitParams({
+ @ApiImplicitParam(name = "businessId", value = "业务id", dataType = "long", paramType = "query", required = true),
+ })
+ public ResultData applyHistoryAndAssignee(Long businessId) {
+ logger.debug("[" + getIpAddr() + "] FlowAbleController::applyHistoryAndAssignee");
+ return wxFlowService.getTaskStatusList(businessId,super.getTenantId());
}
/**
diff --git a/mallinkAdmin/src/main/resources/processes/ExpenseProcess.bpmn20.xml b/mallinkAdmin/src/main/resources/processes/ExpenseProcess.bpmn20.xml
deleted file mode 100644
index e1c14eb93..000000000
--- a/mallinkAdmin/src/main/resources/processes/ExpenseProcess.bpmn20.xml
+++ /dev/null
@@ -1,108 +0,0 @@
-
-
-
- 报销流程
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 500}]]>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/mallinkAdmin/src/main/resources/processes/contractflow.bpmn20.xml b/mallinkAdmin/src/main/resources/processes/contractflow.bpmn20.xml
index ab39f3fa5..35207bf97 100644
--- a/mallinkAdmin/src/main/resources/processes/contractflow.bpmn20.xml
+++ b/mallinkAdmin/src/main/resources/processes/contractflow.bpmn20.xml
@@ -3,14 +3,14 @@
合同审批流程
-
+
初审
-
-
-
-
+
+
+
+
复审
@@ -22,13 +22,13 @@
-
+
-
+
diff --git a/mallinkService/src/main/java/com/iformall/domain/po/WxFlowRecord.java b/mallinkService/src/main/java/com/iformall/domain/po/WxFlowRecord.java
index a960581d9..b0a9d23ad 100644
--- a/mallinkService/src/main/java/com/iformall/domain/po/WxFlowRecord.java
+++ b/mallinkService/src/main/java/com/iformall/domain/po/WxFlowRecord.java
@@ -2,8 +2,10 @@ package com.iformall.domain.po;
import javax.persistence.Id;
import javax.persistence.Table;
+import javax.persistence.Transient;
import java.io.Serializable;
import java.util.Date;
+import java.util.List;
@Table(name = "wx_flow_record")
public class WxFlowRecord implements Serializable {
@@ -22,11 +24,56 @@ public class WxFlowRecord implements Serializable {
private Date createDate;
private Date updateDate;
private String tenantId;
+ private String taskKey; // key
+ private String taskName;// 名称
+
+ // 是否是当前代办节点
+ @Transient
+ private Integer isRunningTask;
+ // 候选人列表
+ @Transient
+ private List assigneeUserList;
public WxFlowRecord(){}
public WxFlowRecord(Long businessId){
this.businessId = businessId;
}
+ public WxFlowRecord(Long businessId,String tenantId){
+ this.businessId = businessId;
+ this.tenantId = tenantId;
+ }
+
+ public String getTaskKey() {
+ return taskKey;
+ }
+
+ public void setTaskKey(String taskKey) {
+ this.taskKey = taskKey;
+ }
+
+ public String getTaskName() {
+ return taskName;
+ }
+
+ public void setTaskName(String taskName) {
+ this.taskName = taskName;
+ }
+
+ public Integer getIsRunningTask() {
+ return isRunningTask;
+ }
+
+ public void setIsRunningTask(Integer isRunningTask) {
+ this.isRunningTask = isRunningTask;
+ }
+
+ public List getAssigneeUserList() {
+ return assigneeUserList;
+ }
+
+ public void setAssigneeUserList(List assigneeUserList) {
+ this.assigneeUserList = assigneeUserList;
+ }
public String getTenantId() {
return tenantId;
diff --git a/mallinkService/src/main/java/com/iformall/mapper/WxCarPayRecordMapper.java b/mallinkService/src/main/java/com/iformall/mapper/WxCarPayRecordMapper.java
index 14e07267b..134e159cf 100644
--- a/mallinkService/src/main/java/com/iformall/mapper/WxCarPayRecordMapper.java
+++ b/mallinkService/src/main/java/com/iformall/mapper/WxCarPayRecordMapper.java
@@ -8,7 +8,8 @@ import java.util.List;
* @author luozukai
*/
public interface WxCarPayRecordMapper extends CommonMapper {
-
List findCarPayListByPage(WxCarPayRecord record);
+ List findCarPayList(WxCarPayRecord record);
+
}
diff --git a/mallinkService/src/main/java/com/iformall/service/WxCUserBasicInfoService.java b/mallinkService/src/main/java/com/iformall/service/WxCUserBasicInfoService.java
index ef273319f..a615ac711 100644
--- a/mallinkService/src/main/java/com/iformall/service/WxCUserBasicInfoService.java
+++ b/mallinkService/src/main/java/com/iformall/service/WxCUserBasicInfoService.java
@@ -3,6 +3,7 @@ package com.iformall.service;
import com.github.pagehelper.PageInfo;
import com.iformall.domain.dto.WxCUserBasicInfoDto;
import com.iformall.domain.po.WxCUserBasicInfo;
+import com.iformall.domain.po.WxCarPayRecord;
import com.iformall.domain.po.WxTags;
import com.iformall.domain.vo.CUserBaseInfoT;
@@ -108,4 +109,11 @@ public interface WxCUserBasicInfoService {
long findCount(WxCUserBasicInfoDto dto);
+ /**
+ * 停车会员记录导出
+ * @param record
+ * @param request
+ * @param response
+ */
+ void exportCarPayData(WxCarPayRecord record, HttpServletRequest request, HttpServletResponse response);
}
diff --git a/mallinkService/src/main/java/com/iformall/service/WxFlowRecordService.java b/mallinkService/src/main/java/com/iformall/service/WxFlowRecordService.java
index 8a3eb444e..23c7b0171 100644
--- a/mallinkService/src/main/java/com/iformall/service/WxFlowRecordService.java
+++ b/mallinkService/src/main/java/com/iformall/service/WxFlowRecordService.java
@@ -1,9 +1,6 @@
package com.iformall.service;
-import com.iformall.common.IdWorker;
import com.iformall.domain.po.WxFlowRecord;
-import com.iformall.domain.po.WxMsgCallback;
-
import java.util.List;
/**
diff --git a/mallinkService/src/main/java/com/iformall/service/WxFlowService.java b/mallinkService/src/main/java/com/iformall/service/WxFlowService.java
index cbc00ddee..d7d4979a5 100644
--- a/mallinkService/src/main/java/com/iformall/service/WxFlowService.java
+++ b/mallinkService/src/main/java/com/iformall/service/WxFlowService.java
@@ -10,6 +10,7 @@ import java.util.Map;
* 流程审批服务
*/
public interface WxFlowService {
+ ResultData getTaskStatusList(Long businessId,String tenantId);
/**
* 启动流程
@@ -32,7 +33,7 @@ public interface WxFlowService {
* @param businessId
* @return
*/
- ResultData applyHistory(Long businessId);
+ ResultData applyHistory(Long businessId,String tenantId);
/**
* 审批
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 cdb29aafd..eae1e9631 100644
--- a/mallinkService/src/main/java/com/iformall/service/impl/WxCUserBasicInfoServiceImpl.java
+++ b/mallinkService/src/main/java/com/iformall/service/impl/WxCUserBasicInfoServiceImpl.java
@@ -7,16 +7,14 @@ import com.iformall.common.IdWorker;
import com.iformall.domain.dto.WxCUserBasicInfoDto;
import com.iformall.domain.po.WxCUser;
import com.iformall.domain.po.WxCUserBasicInfo;
+import com.iformall.domain.po.WxCarPayRecord;
import com.iformall.domain.po.WxTags;
import com.iformall.domain.vo.CUserBaseInfoT;
import com.iformall.domain.vo.CUserBaseVo;
import com.iformall.domain.vo.CUserTagVo;
import com.iformall.domain.vo.WxCUserBasicInfoVo;
import com.iformall.enums.EnumScoreType;
-import com.iformall.mapper.WxCUserBasicInfoMapper;
-import com.iformall.mapper.WxCUserMapper;
-import com.iformall.mapper.WxCUserTagsMapper;
-import com.iformall.mapper.WxTagsMapper;
+import com.iformall.mapper.*;
import com.iformall.service.WxCUserBasicInfoService;
import com.iformall.service.WxCUserTagsService;
import com.iformall.service.WxScoreRulesService;
@@ -69,6 +67,9 @@ public class WxCUserBasicInfoServiceImpl implements WxCUserBasicInfoService {
@Autowired
StringRedisTemplate stringRedisTemplate;
+ @Autowired
+ WxCarPayRecordMapper wxCarPayRecordMapper;
+
@Override
public PageInfo listAsPage(WxCUserBasicInfo record, Integer pageIndex, Integer pageSize) {
return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxCUserBasicInfoMapper.findList(record));
@@ -629,5 +630,71 @@ public class WxCUserBasicInfoServiceImpl implements WxCUserBasicInfoService {
return wxCUserBasicInfoMapper.findCount(dto);
}
+ @Override
+ public void exportCarPayData(WxCarPayRecord record, HttpServletRequest request, HttpServletResponse response) {
+ List carPayList = wxCarPayRecordMapper.findCarPayList(record);
+
+ SXSSFWorkbook workbook;
+ String filepath = Constant.fileDirectory;
+ File savefile = new File(filepath);
+ if (!savefile.exists()) {
+ savefile.mkdirs();
+ }
+ String filename = UUID.randomUUID() + ".xlsx";
+ filepath = filepath + filename;
+ WxTags wxTagsQ = new WxTags();
+ List tagList = wxTagsMapper.findList(wxTagsQ);
+ List tagIdList = new ArrayList();
+
+ try {
+ File file = new File(filepath);
+ workbook = new SXSSFWorkbook(100);
+ SXSSFSheet sheetTwo = workbook.createSheet((1==record.getIsPay())?"线上缴费车辆列表":"进出车辆列表");
+ Row rowtwo = sheetTwo.createRow(0);
+ Cell cell1 = rowtwo.createCell(0);
+ Cell cell2 = rowtwo.createCell(1);
+ Cell cell3 = rowtwo.createCell(2);
+ Cell cell4 = rowtwo.createCell(3);
+ Cell cell5 = rowtwo.createCell(4);
+ Cell cell6 = rowtwo.createCell(5);
+
+ cell1.setCellValue("车牌");
+ cell2.setCellValue("车主电话");
+ cell3.setCellValue("进场时间");
+ cell4.setCellValue("出场时间");
+ cell5.setCellValue("停车时长(分钟)");
+ cell6.setCellValue("缴费金额");
+
+ for (int i = 0; i < carPayList.size(); i++) {
+ rowtwo = sheetTwo.createRow(i + 1);
+ cell1 = rowtwo.createCell(0);
+ cell2 = rowtwo.createCell(1);
+ cell3 = rowtwo.createCell(2);
+ cell4 = rowtwo.createCell(3);
+ cell5 = rowtwo.createCell(4);
+ cell6 = rowtwo.createCell(5);
+
+ WxCarPayRecord entity = carPayList.get(i);
+
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm");
+ cell1.setCellValue(entity.getPlateNumber());
+ cell2.setCellValue(entity.getPhone());
+ cell3.setCellValue(sdf.format(entity.getEntranceTime()));
+ cell4.setCellValue(sdf.format(entity.getExitTime()));
+ //todo 加个逗留时长
+ //cell5.setCellValue(entity.get());
+ cell6.setCellValue(entity.getFee());
+
+ }
+ FileOutputStream fileOut = new FileOutputStream(file);
+ workbook.write(fileOut);
+ fileOut.close();
+ workbook.close();
+ downFile(filepath, filename,(1==record.getIsPay())?"线上缴费车辆数据":"进出车辆数据"+".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 44581b1c8..a80d574c4 100644
--- a/mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java
+++ b/mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java
@@ -18,6 +18,8 @@ import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.collections.map.HashedMap;
import org.flowable.bpmn.model.BpmnModel;
import org.flowable.engine.*;
+import org.flowable.engine.impl.RepositoryServiceImpl;
+import org.flowable.engine.impl.persistence.entity.ProcessDefinitionEntity;
import org.flowable.engine.runtime.Execution;
import org.flowable.engine.runtime.ProcessInstance;
import org.flowable.identitylink.api.IdentityLink;
@@ -91,6 +93,7 @@ public class WxFlowServiceImpl implements WxFlowService {
map.put("startTime",new Date().getTime());
map.put("businessId",businessId);
map.put("flowType",flowType);
+ map.put("taskAssignee",taskAssignee);
ProcessInstance processInstance = runtimeService.startProcessInstanceByKey(getFlowKeyByType(flowType), map);
logger.debug("流程启动,流程id:{}",processInstance.getId());
@@ -110,6 +113,7 @@ public class WxFlowServiceImpl implements WxFlowService {
wxFlowRecord.setUserId(userId);
wxFlowRecord.setUserName(userName);
wxFlowRecord.setStatus(EnumFlowRecordStatus.NEW.getCode());
+ wxFlowRecord.setTaskName("发起");
wxFlowRecordService.saveOrUpdate(wxFlowRecord);
// 给审批人发送代办通知短信
@@ -153,8 +157,8 @@ public class WxFlowServiceImpl implements WxFlowService {
}
@Override
- public ResultData applyHistory(Long businessId) {
- List result = wxFlowRecordService.findList(new WxFlowRecord(businessId));
+ public ResultData applyHistory(Long businessId,String tenantId) {
+ List result = wxFlowRecordService.findList(new WxFlowRecord(businessId,tenantId));
if(CollectionUtils.isNotEmpty(result)){
String processInstanceId = result.get(0).getProcessInstanceId();
List mallUserInfoList = getUserByProcessInstanceId(processInstanceId);
@@ -167,7 +171,7 @@ public class WxFlowServiceImpl implements WxFlowService {
}
WxFlowRecord wxFlowRecord = new WxFlowRecord();
- wxFlowRecord.setUserName(assignee);
+ wxFlowRecord.setUserName(assignee.trim());
wxFlowRecord.setStatus(EnumFlowRecordStatus.ASSIGNEE.getCode());
result.add(0,wxFlowRecord);
}
@@ -175,16 +179,67 @@ public class WxFlowServiceImpl implements WxFlowService {
return new ResultData(result);
}
+ @Override
+ public ResultData getTaskStatusList(Long businessId, String tenantId) {
+ List resultList = wxFlowRecordService.findList(new WxFlowRecord(businessId,tenantId));
+ String processInstanceId = resultList.get(0).getProcessInstanceId();
+ ProcessInstance pi = runtimeService.createProcessInstanceQuery().processInstanceId(processInstanceId).singleResult();
+ Task task = taskService.createTaskQuery().processInstanceId(pi.getId()).singleResult();
+ Map mapInfo = taskService.getVariables(task.getId());
+ List