| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.gkhy.exam.common.api.CommonPage; |
| | | import com.gkhy.exam.common.api.CommonResult; |
| | | import com.gkhy.exam.common.constant.UserConstant; |
| | | import com.gkhy.exam.common.utils.PageUtils; |
| | | import com.gkhy.exam.common.utils.SecurityUtils; |
| | | import com.gkhy.exam.system.domain.AnnualVerificationPlan; |
| | | import com.gkhy.exam.system.domain.DocumentBorrowCopy; |
| | | import com.gkhy.exam.system.domain.DocumentBorrowCopyRecord; |
| | | import com.gkhy.exam.system.mapper.DocumentBorrowCopyMapper; |
| | | import com.gkhy.exam.system.mapper.DocumentBorrowCopyRecordMapper; |
| | | import com.gkhy.exam.system.service.DocumentBorrowCopyService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | private void batchSave(Long id, List<DocumentBorrowCopyRecord> documentBorrowCopyRecordList,List<Long> delIds) { |
| | | if (ObjectUtils.isNotEmpty(delIds)) { |
| | | int update = documentBorrowCopyRecordMapper.update(new DocumentBorrowCopyRecord(), |
| | | new LambdaUpdateWrapper<DocumentBorrowCopyRecord>().set(DocumentBorrowCopyRecord::getDelFlag, UserConstant.DEPT_DISABLE) |
| | | new LambdaUpdateWrapper<DocumentBorrowCopyRecord>().set(DocumentBorrowCopyRecord::getDelFlag, UserConstant.DISENABLE) |
| | | .set(DocumentBorrowCopyRecord::getUpdateTime, LocalDateTime.now()) |
| | | .set(DocumentBorrowCopyRecord::getUpdateBy, SecurityUtils.getUsername()).in(DocumentBorrowCopyRecord::getId, delIds) |
| | | ); |
| | |
| | | @Transactional |
| | | public CommonResult deletedDocumentBorrowCopy(Long id) { |
| | | int i = documentBorrowCopyMapper.update(new DocumentBorrowCopy(), |
| | | new LambdaUpdateWrapper<DocumentBorrowCopy>().set(DocumentBorrowCopy::getDelFlag, UserConstant.DEPT_DISABLE) |
| | | new LambdaUpdateWrapper<DocumentBorrowCopy>().set(DocumentBorrowCopy::getDelFlag, UserConstant.DISENABLE) |
| | | .set(DocumentBorrowCopy::getUpdateTime, LocalDateTime.now()) |
| | | .set(DocumentBorrowCopy::getUpdateBy, SecurityUtils.getUsername()).eq(DocumentBorrowCopy::getId, id) |
| | | ); |
| | | if (i > 0){ |
| | | documentBorrowCopyRecordMapper.update(new DocumentBorrowCopyRecord(), |
| | | new LambdaUpdateWrapper<DocumentBorrowCopyRecord>().set(DocumentBorrowCopyRecord::getDelFlag, UserConstant.DEPT_DISABLE) |
| | | new LambdaUpdateWrapper<DocumentBorrowCopyRecord>().set(DocumentBorrowCopyRecord::getDelFlag, UserConstant.DISENABLE) |
| | | .set(DocumentBorrowCopyRecord::getUpdateTime, LocalDateTime.now()).set(DocumentBorrowCopyRecord::getUpdateBy, SecurityUtils.getUsername()) |
| | | .eq(DocumentBorrowCopyRecord::getDocumentBorrowId, id)); |
| | | } |