| | |
| | | import com.moral.api.service.AllocationExtensionService; |
| | | import com.moral.api.service.ApproveTableService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.collections4.CollectionUtils; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | |
| | | @Autowired |
| | | private SysDictTypeMapper sysDictTypeMapper; |
| | | @Autowired |
| | | private SysDictDataMapper sysDictDataMapper; |
| | | @Autowired |
| | | private ResponsibilityUnitMapper responsibilityUnitMapper; |
| | | @Autowired |
| | | private SysDictDataMapper sysDictDataMapper; |
| | | @Autowired |
| | | private RedisTemplate redisTemplate; |
| | | @Autowired |
| | |
| | | |
| | | @Override |
| | | public Page<AllocationPageExt> extPage(AllocationPageCond allocationPageCond) { |
| | | List<Integer> unitList = unitResult(); |
| | | allocationPageCond.setUnitList(unitList); |
| | | return this.baseMapper.extPage(allocationPageCond.getPage().convertPage(), allocationPageCond); |
| | | } |
| | | |
| | |
| | | fileTableService.upDateResult(allocationExtensionAddCond.getFileList(),allocationExtension.getId(), FileTableEnum.ALLOCATION_EXTENSION.value); |
| | | return true; |
| | | } |
| | | |
| | | @Override |
| | | public List<Integer> unitResult() { |
| | | QxUser user = UserHelper.getCurrentUser(); |
| | | Integer unitId = Objects.nonNull(user.getUnitId())?user.getUnitId():0; |
| | | List<Integer> userList = responsibilityUnitMapper.selectCodeList("JBD",user.getUserId()); |
| | | if(CollectionUtils.isNotEmpty(userList)){ |
| | | return new ArrayList<>(); |
| | | } |
| | | userList = responsibilityUnitMapper.selectResultList(unitId); |
| | | if(CollectionUtils.isNotEmpty(userList)){ |
| | | return userList; |
| | | } |
| | | return Arrays.asList(0); |
| | | } |
| | | } |