| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.gk.hotwork.Domain.EmergencyPlanFile; |
| | | import com.gk.hotwork.Domain.SafetyInspectionItem; |
| | | import com.gk.hotwork.Domain.*; |
| | | import com.gk.hotwork.Domain.Exception.BusinessException; |
| | | import com.gk.hotwork.Domain.SafetyInspectionItemDeduction; |
| | | import com.gk.hotwork.Domain.UserInfo; |
| | | import com.gk.hotwork.Domain.Utils.StringUtils; |
| | | import com.gk.hotwork.Mapper.SafetyInspectionItemDeductionMapper; |
| | | import com.gk.hotwork.Mapper.SafetyInspectionItemMapper; |
| | | import com.gk.hotwork.Service.ElementManagementService; |
| | | import com.gk.hotwork.Service.SafetyInspectionItemService; |
| | | import org.apache.commons.collections4.CollectionUtils; |
| | | import org.checkerframework.checker.units.qual.C; |
| | |
| | | @Autowired |
| | | private SafetyInspectionItemDeductionMapper safetyInspectionItemDeductionMapper; |
| | | |
| | | @Autowired |
| | | private ElementManagementService elementManagementService; |
| | | |
| | | /** |
| | | * @Description: 分页 |
| | | */ |
| | | @Override |
| | | public IPage<SafetyInspectionItem> selectPage(Page<SafetyInspectionItem> page, Map<String, Object> filter, UserInfo user) { |
| | | IPage<SafetyInspectionItem> res = safetyInspectionItemMapper.selectPages(page,filter); |
| | | if (CollectionUtils.isNotEmpty(res.getRecords())){ |
| | | for (int i = 0 ; i < res.getRecords().size(); i++){ |
| | | List<SafetyInspectionItemDeduction> fileList = safetyInspectionItemDeductionMapper.getBySafetyInspectionItemId(res.getRecords().get(i).getId()); |
| | | res.getRecords().get(i).setDeductionList(fileList); |
| | | } |
| | | } |
| | | return res; |
| | | } |
| | | |
| | | @Override |
| | | public IPage<SafetyInspectionItem> selectCPage(Page<SafetyInspectionItem> page, Map<String, Object> filter, UserInfo user) { |
| | | IPage<SafetyInspectionItem> res = safetyInspectionItemMapper.selectCPages(page,filter); |
| | | if (CollectionUtils.isNotEmpty(res.getRecords())){ |
| | | for (int i = 0 ; i < res.getRecords().size(); i++){ |
| | | List<SafetyInspectionItemDeduction> fileList = safetyInspectionItemDeductionMapper.getBySafetyInspectionItemId(res.getRecords().get(i).getId()); |
| | |
| | | String username = user.getRealname(); |
| | | param.setUpdateTime(date); |
| | | param.setUpdateBy(username); |
| | | this.updateById(param); |
| | | safetyInspectionItemMapper.updateSafetyInspectionItem(param); |
| | | //更新扣分项表 |
| | | |
| | | List<SafetyInspectionItemDeduction> oldList = safetyInspectionItemDeductionMapper.getBySafetyInspectionItemId(param.getId()); |