cjl
2023-09-28 e94e5dbbfc544c558a09fb388e7f4d4341fe8ec4
screen-api/src/main/java/com/moral/api/service/impl/AllocationExtensionServiceImpl.java
@@ -16,6 +16,7 @@
import com.moral.api.service.AllocationExtensionService;
import com.moral.api.service.AllocationService;
import com.moral.api.service.FileTableService;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -68,7 +69,18 @@
    public Page<AllocationExtensionPageExt> extPage(AllocationExtensionPageCond allocationExtensionPageCond) {
        List<Integer> unitList = allocationService.unitResult();
        allocationExtensionPageCond.setUnitList(unitList);
        return this.baseMapper.extPage(allocationExtensionPageCond.getPage().convertPage(), allocationExtensionPageCond);
        Integer codeId =  allocationService.unitAreaCode();
        Page<AllocationExtensionPageExt> page =  this.baseMapper.extPage(allocationExtensionPageCond.getPage().convertPage(), allocationExtensionPageCond);
        if(CollectionUtils.isNotEmpty(page.getRecords())){
            page.getRecords().forEach(it->{
                if((CollectionUtils.isEmpty(unitList)&&codeId.equals(1))||codeId.equals(2)){
                    it.setIsApprove(1);
                }else {
                    it.setIsApprove(0);
                }
            });
        }
        return page;
    }
    @Override