cjl
2023-12-14 6992aaf0587c09f7c511c1afd12e1519d91363d3
screen-api/src/main/java/com/moral/api/service/impl/AllocationServiceImpl.java
@@ -19,6 +19,7 @@
import com.moral.api.pojo.bean.BaseInvalidEntity;
import com.moral.api.pojo.dto.allocation.AllocationUnitViewDto;
import com.moral.api.pojo.enums.*;
import com.moral.api.pojo.ext.allocation.AllocationExcelExt;
import com.moral.api.pojo.ext.allocation.AllocationExt;
import com.moral.api.pojo.ext.allocation.AllocationListExt;
import com.moral.api.pojo.ext.allocation.AllocationPageExt;
@@ -31,6 +32,7 @@
import com.moral.api.pojo.vo.app.AppAuthority;
import com.moral.api.pojo.vo.user.QxUser;
import com.moral.api.service.*;
import com.moral.api.utils.BeanConverts;
import com.moral.constant.Constants;
import com.moral.constant.RedisConstants;
import com.moral.util.DateUtils;
@@ -229,15 +231,16 @@
        ArrayList<Map<String, Object>> escalationTypeList = new ArrayList<>();
        ArrayList<AllocationUnitViewDto> allocationUnitViewDtos = new ArrayList<>();
        Object number1 = map.get("number");
        String number1 = map.get("number").toString();
        String startTime=null;
        String endTime=null;
        if (!ObjectUtils.isEmpty(map.get("startTime")) || !ObjectUtils.isEmpty(map.get("endTime"))){
             startTime = map.get("startTime").toString();
             endTime = map.get("endTime").toString();
//             endTime = map.get("endTime").toString();
             endTime = DateUtils.getDateOfDay(map.get("endTime").toString(), 1, DateUtils.yyyy_MM_dd_EN);
        }
        if (!ObjectUtils.isEmpty(number1)){
        if (!number1.equals("0")){
            String s = "-"+number1;
            //获取当前时间
            endTime = DateUtils.getCurDateTime();
@@ -994,4 +997,16 @@
          return   responsibilityUnit;
    }
    @Override
    public List<AllocationExcelExt> listExcel(List<Integer> id) {
        List<AllocationExcelExt> list = new ArrayList<>();
        for(Integer i : id){
            AllocationExt allocationExt = oneAllocation(i);
            AllocationExcelExt allocationExcelExt = BeanConverts.convert(allocationExt,AllocationExcelExt.class);
            allocationExcelExt.setFileBaseList(fileTableService.list(i,FileTableEnum.ALLOCATION_FOUNDATION.value,FileType.PICTURE.getValue()));
            allocationExcelExt.setFileChangeList(fileTableService.list(i,FileTableEnum.ALLOCATION_RECTIFICATION.value,FileType.PICTURE.getValue()));
            list.add(allocationExcelExt);
        }
        return list;
    }
}