|
|
@@ -30,7 +30,11 @@ import lombok.AllArgsConstructor;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
+import java.text.SimpleDateFormat;
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
import java.util.Objects;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
@@ -159,6 +163,28 @@ public class WfSubscriptionServiceImpl extends MPJBaseServiceImpl<WfSubscription
|
|
|
|
|
|
@Override
|
|
|
public List<WfSubscriptionExcelVo> getList(WfSubscriptionPageDto dto) {
|
|
|
- return wfSubscriptionMapper.getList(dto);
|
|
|
+ List<WfSubscriptionList> wfSubscriptionList = wfSubscriptionListMapper.selectList(
|
|
|
+ new QueryWrapper<WfSubscriptionList>().lambda().orderByAsc(WfSubscriptionList::getId)
|
|
|
+ );
|
|
|
+ Map<Long, String> flowMap = new HashMap<>();
|
|
|
+ for (WfSubscriptionList subscriptionList : wfSubscriptionList) {
|
|
|
+ if(flowMap.containsKey(subscriptionList.getParentId())){
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ flowMap.put(subscriptionList.getParentId(), subscriptionList.getNameOfThePurchasedItem());
|
|
|
+ }
|
|
|
+ List<WfSubscriptionPageVo> list = wfSubscriptionMapper.getList(dto);
|
|
|
+ List<WfSubscriptionExcelVo> result = new ArrayList<>();
|
|
|
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
+ for (WfSubscriptionPageVo record : list) {
|
|
|
+ WfSubscriptionExcelVo excelVo = BeanUtil.toBean(record, WfSubscriptionExcelVo.class);
|
|
|
+ if(record.getShenQingRiQi4752() != null){
|
|
|
+ excelVo.setApplyDate(sdf.format(record.getShenQingRiQi4752()));
|
|
|
+ }
|
|
|
+
|
|
|
+ excelVo.setFlowName(flowMap.get(record.getId()));
|
|
|
+ result.add(excelVo);
|
|
|
+ }
|
|
|
+ return result;
|
|
|
}
|
|
|
}
|