| | |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.req.ExamineMngQueryCriteria; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.resp.ExamineMngDto; |
| | | import com.gkhy.safePlatform.targetDuty.service.ExamineMngService; |
| | | import com.gkhy.safePlatform.targetDuty.service.baseService.ExamineMngBaseService; |
| | | import org.springframework.security.core.Authentication; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | @Resource |
| | | private ExamineMngService examineMngService; |
| | | |
| | | @Resource |
| | | private ExamineMngBaseService examineMngBaseService; |
| | | |
| | | |
| | | /** |
| | | * 分页查询所有数据 |
| | | * |
| | |
| | | */ |
| | | @PostMapping(value = "/page/list") |
| | | public ResultVO selectAll(@RequestBody PageQuery<ExamineMngQueryCriteria> pageQuery){ |
| | | PageUtils.checkCheck(pageQuery); |
| | | |
| | | return this.examineMngService.queryAll(pageQuery); |
| | | } |
| | | |
| | |
| | | examineMng.setExamineDepartmentId(currentUser.getDepId()); |
| | | examineMng.setExaminePersonId(currentUser.getUid()); |
| | | if (examineMng.getId() == null) { |
| | | return new ResultVO<>(ResultCodes.OK,examineMngService.save(examineMng)); |
| | | return new ResultVO<>(ResultCodes.OK,examineMngBaseService.save(examineMng)); |
| | | } else { |
| | | examineMngService.update(examineMng,new UpdateWrapper<ExamineMng>().eq("id",examineMng.getId())); |
| | | examineMngBaseService.update(examineMng,new UpdateWrapper<ExamineMng>().eq("id",examineMng.getId())); |
| | | return new ResultVO<>(ResultCodes.OK); |
| | | } |
| | | } |
| | |
| | | */ |
| | | @RequestMapping(value = "/delete",method = RequestMethod.POST) |
| | | public ResultVO delete(@RequestBody Long[] ids) { |
| | | if(ids == null){ |
| | | return new ResultVO<>(ResultCodes.CLIENT_PARAM_ILLEGAL); |
| | | } |
| | | List<Long> idList = Arrays.asList(ids); |
| | | |
| | | List<ExamineMng> delList = new ArrayList<>(); |
| | | idList.forEach(f->{ |
| | | ExamineMng info = new ExamineMng(); |
| | | info.setDelFlag(1); |
| | | info.setId(f); |
| | | delList.add(info); |
| | | }); |
| | | this.examineMngService.updateBatchById(delList); |
| | | this.examineMngService.delete(ids); |
| | | return new ResultVO<>(ResultCodes.OK); |
| | | } |
| | | |
| | |
| | | */ |
| | | @PostMapping(value = "/addOrUpdate") |
| | | public ResultVO update(Authentication authentication, @RequestBody ExamineTemplateSaveOrUpdate examineTemplateSaveOrUpdate) { |
| | | if(!StringUtils.hasText(examineTemplateSaveOrUpdate.getTitle())){ |
| | | return new ResultVO<>(ResultCodes.CLIENT_PARAM_ILLEGAL,"缺少title"); |
| | | } |
| | | // 获取当前用户 |
| | | ContextCacheUser currentUser = (ContextCacheUser) authentication.getPrincipal(); |
| | | |
| | | //设置设定人ID和设定人部门ID |
| | | examineTemplateSaveOrUpdate.setSetPersonDepartmentId(currentUser.getDepId()); |
| | | examineTemplateSaveOrUpdate.setSetPersonId(currentUser.getUid()); |
| | | examineTemplateService.addOrUpdate(examineTemplateSaveOrUpdate); |
| | | examineTemplateService.addOrUpdate(examineTemplateSaveOrUpdate,authentication); |
| | | return new ResultVO<>(ResultCodes.OK); |
| | | } |
| | | |
| | |
| | | */ |
| | | @RequestMapping(value = "/delete",method = RequestMethod.POST) |
| | | public ResultVO delete(@RequestBody Long[] ids) { |
| | | if(ids == null){ |
| | | return new ResultVO<>(ResultCodes.CLIENT_PARAM_ILLEGAL); |
| | | } |
| | | List<Long> idList = Arrays.asList(ids); |
| | | |
| | | List<ExamineTemplate> delList = new ArrayList<>(); |
| | | idList.forEach(f->{ |
| | | ExamineTemplate info = new ExamineTemplate(); |
| | | info.setDelFlag(1); |
| | | info.setId(f); |
| | | delList.add(info); |
| | | }); |
| | | this.examineTemplateService.updateBatchById(delList); |
| | | this.examineTemplateService.delete(ids); |
| | | return new ResultVO<>(ResultCodes.OK); |
| | | } |
| | | |
| | |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.resp.RewardPunishmentDetailDto; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.resp.RewardPunishmentDetailExcel; |
| | | import com.gkhy.safePlatform.targetDuty.service.RewardPunishmentDetailService; |
| | | import com.gkhy.safePlatform.targetDuty.service.baseService.RewardPunishmentDetailBaseService; |
| | | import com.gkhy.safePlatform.targetDuty.utils.DateUtils; |
| | | import com.gkhy.safePlatform.targetDuty.utils.poihelper.ExcelUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | @Resource |
| | | private RewardPunishmentDetailService rewardPunishmentDetailService; |
| | | |
| | | @Resource |
| | | private RewardPunishmentDetailBaseService rewardPunishmentDetailBaseService; |
| | | @Autowired |
| | | public HttpServletRequest request; |
| | | |
| | | @Autowired |
| | | public HttpServletResponse response; |
| | | |
| | | /** |
| | | * 分页查询所有数据 |
| | |
| | | */ |
| | | @PostMapping(value = "/page/list") |
| | | public ResultVO selectAll(@RequestBody PageQuery<RewardPunishmentDetailQueryCriteria> pageQuery){ |
| | | PageUtils.checkCheck(pageQuery); |
| | | |
| | | return this.rewardPunishmentDetailService.queryAll(pageQuery); |
| | | } |
| | | |
| | |
| | | // }); |
| | | if (rewardPunishmentDetail.getId() == null) { |
| | | rewardPunishmentDetail.setCreateTime(new Date()); |
| | | return new ResultVO<>(ResultCodes.OK,rewardPunishmentDetailService.save(rewardPunishmentDetail)); |
| | | return new ResultVO<>(ResultCodes.OK,rewardPunishmentDetailBaseService.save(rewardPunishmentDetail)); |
| | | } else { |
| | | rewardPunishmentDetailService.updateById(rewardPunishmentDetail); |
| | | rewardPunishmentDetailBaseService.updateById(rewardPunishmentDetail); |
| | | return new ResultVO<>(ResultCodes.OK); |
| | | } |
| | | } |
| | |
| | | */ |
| | | @RequestMapping(value = "/delete",method = RequestMethod.POST) |
| | | public ResultVO delete(@RequestBody Long[] ids) { |
| | | if(ids == null){ |
| | | return new ResultVO<>(ResultCodes.CLIENT_PARAM_ILLEGAL); |
| | | } |
| | | List<Long> idList = Arrays.asList(ids); |
| | | |
| | | List<RewardPunishmentDetail> delList = new ArrayList<>(); |
| | | idList.forEach(f->{ |
| | | RewardPunishmentDetail info = new RewardPunishmentDetail(); |
| | | info.setDelFlag(1); |
| | | info.setId(f); |
| | | delList.add(info); |
| | | }); |
| | | this.rewardPunishmentDetailService.updateBatchById(delList); |
| | | this.rewardPunishmentDetailService.delete(ids); |
| | | return new ResultVO<>(ResultCodes.OK); |
| | | } |
| | | |
| | |
| | | */ |
| | | @GetMapping(value = "/exportData") |
| | | public void exportData(RewardPunishmentDetailQueryCriteria queryCriteria) throws IOException { |
| | | Map<String,String> map = new LinkedHashMap<>(); |
| | | map.put("1","奖惩日期"); |
| | | map.put("2","奖惩类型"); |
| | | map.put("3","被奖惩者"); |
| | | map.put("4","奖惩内容"); |
| | | map.put("5","奖惩依据"); |
| | | |
| | | String key = DateUtils.date2String(new Date(), DateUtils.PATTERN_ALLTIME_NOSIGN) ; |
| | | String fileName = URLEncoder.encode("奖惩记录"+key+".xls", "UTF-8"); |
| | | response.setContentType("application/vnd.ms-excel"); |
| | | response.setHeader("Content-Disposition", "attachment;filename=" + fileName + ".xlsx"); |
| | | response.setHeader("Access-Control-Expose-Headers", "Content-Disposition"); |
| | | |
| | | |
| | | List<RewardPunishmentDetailExcel> respList = BeanCopyUtils.copyBeanList(rewardPunishmentDetailService.queryAllRelation(queryCriteria), RewardPunishmentDetailExcel.class); |
| | | |
| | | ExcelUtil.exportExcel(map,respList , response.getOutputStream(),DateUtils.PATTERN_STANDARD); |
| | | response.getOutputStream().close(); |
| | | rewardPunishmentDetailService.exportData(queryCriteria); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.gkhy.safePlatform.commons.enums.ResultCodes; |
| | | import com.gkhy.safePlatform.commons.query.PageQuery; |
| | | import com.gkhy.safePlatform.commons.utils.BeanCopyUtils; |
| | | import com.gkhy.safePlatform.commons.utils.PageUtils; |
| | | import com.gkhy.safePlatform.commons.vo.ResultVO; |
| | | import com.gkhy.safePlatform.targetDuty.entity.RewardPunishmentStandard; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.req.RewardPunishmentStandardImportExcel; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.req.RewardPunishmentStandardQueryCriteria; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.resp.RewardPunishmentStandardExcel; |
| | | import com.gkhy.safePlatform.targetDuty.service.RewardPunishmentStandardService; |
| | | import com.gkhy.safePlatform.targetDuty.utils.DateUtils; |
| | | import com.gkhy.safePlatform.targetDuty.utils.poihelper.ExcelLogs; |
| | | import com.gkhy.safePlatform.targetDuty.utils.poihelper.ExcelUtil; |
| | | import org.apache.commons.collections.CollectionUtils; |
| | | import com.gkhy.safePlatform.targetDuty.service.baseService.RewardPunishmentStandardBaseService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.util.StringUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.io.Serializable; |
| | | import java.net.URLEncoder; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * (RewardPunishmentStandard)表控制层 |
| | |
| | | */ |
| | | @Resource |
| | | private RewardPunishmentStandardService rewardPunishmentStandardService; |
| | | |
| | | @Resource |
| | | private RewardPunishmentStandardBaseService rewardPunishmentStandardBaseService; |
| | | @Autowired |
| | | public HttpServletRequest request; |
| | | |
| | |
| | | */ |
| | | @PostMapping(value = "/page/list") |
| | | public ResultVO selectAll(@RequestBody PageQuery<RewardPunishmentStandardQueryCriteria> pageQuery){ |
| | | PageUtils.checkCheck(pageQuery); |
| | | return this.rewardPunishmentStandardService.queryAll(pageQuery); |
| | | } |
| | | |
| | |
| | | */ |
| | | @GetMapping(value = "/selectOne/{id}") |
| | | public ResultVO selectOne(@PathVariable Serializable id) { |
| | | return new ResultVO<>(ResultCodes.OK,this.rewardPunishmentStandardService.getById(id)); |
| | | return new ResultVO<>(ResultCodes.OK,this.rewardPunishmentStandardBaseService.getById(id)); |
| | | } |
| | | |
| | | /** |
| | |
| | | return new ResultVO<>(ResultCodes.CLIENT_PARAM_ILLEGAL,"缺少qName"); |
| | | } |
| | | if (rewardPunishmentStandard.getId() == null) { |
| | | return new ResultVO<>(ResultCodes.OK,rewardPunishmentStandardService.save(rewardPunishmentStandard)); |
| | | return new ResultVO<>(ResultCodes.OK,rewardPunishmentStandardBaseService.save(rewardPunishmentStandard)); |
| | | } else { |
| | | rewardPunishmentStandardService.update(rewardPunishmentStandard,new UpdateWrapper<RewardPunishmentStandard>().eq("id",rewardPunishmentStandard.getId())); |
| | | rewardPunishmentStandardBaseService.update(rewardPunishmentStandard,new UpdateWrapper<RewardPunishmentStandard>().eq("id",rewardPunishmentStandard.getId())); |
| | | return new ResultVO<>(ResultCodes.OK); |
| | | } |
| | | } |
| | |
| | | */ |
| | | @RequestMapping(value = "/delete",method = RequestMethod.POST) |
| | | public ResultVO delete(@RequestBody Long[] ids) { |
| | | if(ids == null){ |
| | | return new ResultVO<>(ResultCodes.CLIENT_PARAM_ILLEGAL); |
| | | } |
| | | List<Long> idList = Arrays.asList(ids); |
| | | |
| | | List<RewardPunishmentStandard> delList = new ArrayList<>(); |
| | | idList.forEach(f->{ |
| | | RewardPunishmentStandard info = new RewardPunishmentStandard(); |
| | | info.setDelFlag(1); |
| | | info.setId(f); |
| | | delList.add(info); |
| | | }); |
| | | this.rewardPunishmentStandardService.updateBatchById(delList); |
| | | this.rewardPunishmentStandardService.delete(ids); |
| | | return new ResultVO<>(ResultCodes.OK); |
| | | } |
| | | |
| | |
| | | */ |
| | | @GetMapping(value = "/exportTemplate") |
| | | public void exportTemplate() throws IOException { |
| | | Map<String,String> map = new LinkedHashMap<>(); |
| | | map.put("1","奖惩名称"); |
| | | map.put("2","奖惩类型 1:奖励 2:惩罚"); |
| | | map.put("3","奖惩内容"); |
| | | map.put("4","依据"); |
| | | map.put("5","备注"); |
| | | |
| | | String fileName = URLEncoder.encode("奖惩标准设定数据导入模板.xls", "UTF-8"); |
| | | response.setContentType("application/vnd.ms-excel"); |
| | | response.setHeader("Content-Disposition", "attachment;filename=" + fileName + ".xlsx"); |
| | | response.setHeader("Access-Control-Expose-Headers", "Content-Disposition"); |
| | | |
| | | ExcelUtil.exportExcel(map,new ArrayList<>() , response.getOutputStream()); |
| | | response.getOutputStream().close(); |
| | | rewardPunishmentStandardService.exportTemplate(); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | @GetMapping(value = "/exportData") |
| | | public void exportData(RewardPunishmentStandardQueryCriteria queryCriteria) throws IOException { |
| | | Map<String,String> map = new LinkedHashMap<>(); |
| | | map.put("1","奖惩名称"); |
| | | map.put("2","奖惩类型"); |
| | | map.put("3","奖惩内容"); |
| | | map.put("4","依据"); |
| | | map.put("5","备注"); |
| | | rewardPunishmentStandardService.exportData(queryCriteria); |
| | | |
| | | String key = DateUtils.date2String(new Date(), DateUtils.PATTERN_ALLTIME_NOSIGN) ; |
| | | String fileName = URLEncoder.encode("奖惩标准设定"+key+".xls", "UTF-8"); |
| | | response.setContentType("application/vnd.ms-excel"); |
| | | response.setHeader("Content-Disposition", "attachment;filename=" + fileName + ".xlsx"); |
| | | response.setHeader("Access-Control-Expose-Headers", "Content-Disposition"); |
| | | |
| | | |
| | | List<RewardPunishmentStandardExcel> respList = BeanCopyUtils.copyBeanList(rewardPunishmentStandardService.queryAll(queryCriteria), RewardPunishmentStandardExcel.class); |
| | | |
| | | ExcelUtil.exportExcel(map,respList , response.getOutputStream(),DateUtils.PATTERN_STANDARD); |
| | | response.getOutputStream().close(); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | @RequestMapping(value = "/importData") |
| | | public ResultVO importData(MultipartFile file) throws IOException { |
| | | String contentType = file.getContentType(); |
| | | if(!"application/vnd.ms-excel".equals(contentType) |
| | | && !"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet".equals(contentType)) { |
| | | return new ResultVO<>(ResultCodes.CLIENT_PARAM_ILLEGAL, "上传的excel格式错误"); |
| | | } |
| | | |
| | | Collection<RewardPunishmentStandardImportExcel> importExcel = ExcelUtil.importExcel(RewardPunishmentStandardImportExcel.class, file.getInputStream(), "yyyy-MM-dd HH:mm:ss", new ExcelLogs() , 0); |
| | | |
| | | if (CollectionUtils.isEmpty(importExcel)) { |
| | | return new ResultVO<>(ResultCodes.OK); |
| | | } |
| | | |
| | | List<RewardPunishmentStandard> respList = BeanCopyUtils.copyBeanList((List<RewardPunishmentStandardImportExcel>)importExcel, RewardPunishmentStandard.class); |
| | | |
| | | rewardPunishmentStandardService.saveBatch(respList); |
| | | rewardPunishmentStandardService.importData(file); |
| | | return new ResultVO<>(ResultCodes.OK); |
| | | } |
| | | |
| | |
| | | */ |
| | | @PostMapping(value = "/addOrUpdate") |
| | | public ResultVO update(@RequestBody TargetDivideDetailSaveOrUpdate infoDto) { |
| | | if(infoDto.getTargetId() == null){ |
| | | return new ResultVO<>(ResultCodes.CLIENT_PARAM_ILLEGAL,"缺少targetId"); |
| | | } |
| | | targetDivideDetailService.addOrUpdate(infoDto); |
| | | return new ResultVO<>(ResultCodes.OK); |
| | | } |
| | |
| | | import com.gkhy.safePlatform.targetDuty.entity.TargetMng; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.resp.TargetDutySummaryExcel; |
| | | import com.gkhy.safePlatform.targetDuty.service.TargetDutySummaryService; |
| | | import com.gkhy.safePlatform.targetDuty.service.baseService.TargetDutySummaryBaseService; |
| | | import com.gkhy.safePlatform.targetDuty.utils.DateUtils; |
| | | import com.gkhy.safePlatform.targetDuty.utils.poihelper.ExcelUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | @Resource |
| | | private TargetDutySummaryService targetDutySummaryService; |
| | | |
| | | @Resource |
| | | private TargetDutySummaryBaseService targetDutySummaryBaseService; |
| | | |
| | | @Autowired |
| | | public HttpServletRequest request; |
| | | |
| | |
| | | */ |
| | | @GetMapping(value = "/selectOne/{id}") |
| | | public ResultVO selectOne(@PathVariable Serializable id) { |
| | | return new ResultVO<>(ResultCodes.OK,this.targetDutySummaryService.getById(id)); |
| | | return new ResultVO<>(ResultCodes.OK,this.targetDutySummaryBaseService.getById(id)); |
| | | } |
| | | |
| | | /** |
| | |
| | | @PostMapping(value = "/addOrUpdate") |
| | | public ResultVO update(@RequestBody TargetDutySummary targetDutySummary) { |
| | | if (targetDutySummary.getId() == null) { |
| | | return new ResultVO<>(ResultCodes.OK,targetDutySummaryService.save(targetDutySummary)); |
| | | return new ResultVO<>(ResultCodes.OK,targetDutySummaryBaseService.save(targetDutySummary)); |
| | | } else { |
| | | targetDutySummaryService.update(targetDutySummary,new UpdateWrapper<TargetDutySummary>().eq("id",targetDutySummary.getId())); |
| | | targetDutySummaryBaseService.update(targetDutySummary,new UpdateWrapper<TargetDutySummary>().eq("id",targetDutySummary.getId())); |
| | | return new ResultVO<>(ResultCodes.OK); |
| | | } |
| | | } |
| | |
| | | */ |
| | | @RequestMapping(value = "/delete",method = RequestMethod.POST) |
| | | public ResultVO delete(@RequestBody Long[] ids) { |
| | | if(ids == null){ |
| | | return new ResultVO<>(ResultCodes.CLIENT_PARAM_ILLEGAL); |
| | | } |
| | | List<Long> idList = Arrays.asList(ids); |
| | | |
| | | List<TargetDutySummary> delList = new ArrayList<>(); |
| | | idList.forEach(f->{ |
| | | TargetDutySummary info = new TargetDutySummary(); |
| | | info.setDelFlag(1); |
| | | info.setId(f); |
| | | delList.add(info); |
| | | }); |
| | | this.targetDutySummaryService.updateBatchById(delList); |
| | | this.targetDutySummaryService.delete(ids); |
| | | return new ResultVO<>(ResultCodes.OK); |
| | | } |
| | | |
| | |
| | | */ |
| | | @GetMapping(value = "/exportData") |
| | | public void exportData(TargetDutySummaryQueryCriteria queryCriteria) throws IOException { |
| | | Map<String,String> map = new LinkedHashMap<>(); |
| | | map.put("1","责任部门"); |
| | | map.put("2","安全目标指标"); |
| | | map.put("3","考核指标"); |
| | | map.put("4","1月"); |
| | | map.put("5","2月"); |
| | | map.put("6","3月"); |
| | | map.put("7","4月"); |
| | | map.put("8","5月"); |
| | | map.put("9","6月"); |
| | | map.put("10","7月"); |
| | | map.put("11","8月"); |
| | | map.put("12","9月"); |
| | | map.put("13","10月"); |
| | | map.put("14","11月"); |
| | | map.put("15","12月"); |
| | | map.put("16","考核结果"); |
| | | |
| | | String key = DateUtils.date2String(new Date(), DateUtils.PATTERN_ALLTIME_NOSIGN) ; |
| | | String fileName = URLEncoder.encode("目标汇总"+key+".xls", "UTF-8"); |
| | | response.setContentType("application/vnd.ms-excel"); |
| | | response.setHeader("Content-Disposition", "attachment;filename=" + fileName + ".xlsx"); |
| | | response.setHeader("Access-Control-Expose-Headers", "Content-Disposition"); |
| | | |
| | | |
| | | List<TargetDutySummaryExcel> respList = BeanCopyUtils.copyBeanList(targetDutySummaryService.queryAll(queryCriteria), TargetDutySummaryExcel.class); |
| | | |
| | | ExcelUtil.exportExcel(map,respList , response.getOutputStream(),DateUtils.PATTERN_STANDARD); |
| | | response.getOutputStream().close(); |
| | | targetDutySummaryService.exportData(queryCriteria); |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | |
| | | */ |
| | | @PostMapping(value = "/page/list") |
| | | public ResultVO selectAll(@RequestBody PageQuery<TargetDutyWorkApproveQueryCriteria> pageQuery){ |
| | | PageUtils.checkCheck(pageQuery); |
| | | return this.targetDutyWorkApproveService.queryAll(pageQuery); |
| | | } |
| | | |
| | |
| | | */ |
| | | @RequestMapping(value = "/delete",method = RequestMethod.POST) |
| | | public ResultVO delete(@RequestBody Long[] ids) { |
| | | if(ids == null){ |
| | | return new ResultVO<>(ResultCodes.CLIENT_PARAM_ILLEGAL); |
| | | } |
| | | List<Long> idList = Arrays.asList(ids); |
| | | |
| | | List<TargetDutyWorkApprove> delList = new ArrayList<>(); |
| | | idList.forEach(f->{ |
| | | TargetDutyWorkApprove info = new TargetDutyWorkApprove(); |
| | | info.setDelFlag(1); |
| | | info.setId(f); |
| | | delList.add(info); |
| | | }); |
| | | this.targetDutyWorkApproveService.updateBatchById(delList); |
| | | this.targetDutyWorkApproveService.delete(ids); |
| | | return new ResultVO<>(ResultCodes.OK); |
| | | } |
| | | |
| | |
| | | import com.gkhy.safePlatform.targetDuty.entity.TargetDutyfileInfo; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.req.TargetDivideDetailSaveOrUpdate; |
| | | import com.gkhy.safePlatform.targetDuty.service.TargetDutyfileInfoService; |
| | | import com.gkhy.safePlatform.targetDuty.service.baseService.TargetDutyfileInfoBaseService; |
| | | import com.google.common.collect.Lists; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import com.gkhy.safePlatform.commons.query.PageQuery; |
| | |
| | | */ |
| | | @Resource |
| | | private TargetDutyfileInfoService targetDutyfileInfoService; |
| | | @Resource |
| | | private TargetDutyfileInfoBaseService targetDutyfileInfoBaseService; |
| | | |
| | | /** |
| | | * 分页查询所有数据 |
| | |
| | | */ |
| | | @GetMapping(value = "/selectOne/{id}") |
| | | public ResultVO selectOne(@PathVariable Serializable id) { |
| | | return new ResultVO<>(ResultCodes.OK,this.targetDutyfileInfoService.getById(id)); |
| | | return new ResultVO<>(ResultCodes.OK,this.targetDutyfileInfoBaseService.getById(id)); |
| | | } |
| | | |
| | | /** |
| | |
| | | @PostMapping(value = "/addOrUpdate") |
| | | public ResultVO update(@RequestBody TargetDutyfileInfo targetDutyfileInfo) { |
| | | if (targetDutyfileInfo.getId() == null) { |
| | | return new ResultVO<>(ResultCodes.OK,targetDutyfileInfoService.save(targetDutyfileInfo)); |
| | | return new ResultVO<>(ResultCodes.OK,targetDutyfileInfoBaseService.save(targetDutyfileInfo)); |
| | | } else { |
| | | targetDutyfileInfoService.update(targetDutyfileInfo,new UpdateWrapper<TargetDutyfileInfo>().eq("id",targetDutyfileInfo.getId())); |
| | | targetDutyfileInfoBaseService.update(targetDutyfileInfo,new UpdateWrapper<TargetDutyfileInfo>().eq("id",targetDutyfileInfo.getId())); |
| | | return new ResultVO<>(ResultCodes.OK); |
| | | } |
| | | } |
| | |
| | | */ |
| | | @RequestMapping(value = "/delete",method = RequestMethod.POST) |
| | | public ResultVO delete(@RequestBody Long[] ids) { |
| | | if(ids == null){ |
| | | return new ResultVO<>(ResultCodes.CLIENT_PARAM_ILLEGAL); |
| | | } |
| | | List<Long> idList = Arrays.asList(ids); |
| | | |
| | | List<TargetDutyfileInfo> delList = new ArrayList<>(); |
| | | idList.forEach(f->{ |
| | | TargetDutyfileInfo info = new TargetDutyfileInfo(); |
| | | info.setDelFlag(1); |
| | | info.setId(f); |
| | | delList.add(info); |
| | | }); |
| | | this.targetDutyfileInfoService.updateBatchById(delList); |
| | | this.targetDutyfileInfoService.delete(ids); |
| | | return new ResultVO<>(ResultCodes.OK); |
| | | } |
| | | |
| | |
| | | import com.gkhy.safePlatform.targetDuty.service.CommonService; |
| | | import com.gkhy.safePlatform.targetDuty.service.TargetExamineService; |
| | | import com.gkhy.safePlatform.targetDuty.service.TargetMngService; |
| | | import com.gkhy.safePlatform.targetDuty.service.baseService.TargetExamineBaseService; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | @Resource |
| | | private TargetExamineService targetExamineService; |
| | | @Resource |
| | | private TargetMngService targetMngService; |
| | | |
| | | @Resource |
| | | private CommonService commonService; |
| | | |
| | | private TargetExamineBaseService targetExamineBaseService; |
| | | // /** |
| | | // * 通过主键查询单条数据 |
| | | // * |
| | |
| | | */ |
| | | @GetMapping(value = "/selectOne/{id}") |
| | | public ResultVO selectOne(@PathVariable Serializable id) { |
| | | return new ResultVO<>(ResultCodes.OK,this.targetExamineService.getById(id)); |
| | | return new ResultVO<>(ResultCodes.OK,this.targetExamineBaseService.getById(id)); |
| | | } |
| | | |
| | | |
| | |
| | | public ResultVO update(@RequestBody TargetExamine infoDto) { |
| | | infoDto.setExamineDate(new Timestamp(new Date().getTime())); |
| | | if (infoDto.getId() == null) { |
| | | return new ResultVO<>(ResultCodes.OK,targetExamineService.save(infoDto)); |
| | | return new ResultVO<>(ResultCodes.OK,targetExamineBaseService.save(infoDto)); |
| | | } else { |
| | | targetExamineService.update(infoDto,new UpdateWrapper<TargetExamine>().eq("id",infoDto.getId())); |
| | | targetExamineBaseService.update(infoDto,new UpdateWrapper<TargetExamine>().eq("id",infoDto.getId())); |
| | | return new ResultVO<>(ResultCodes.OK); |
| | | } |
| | | } |
| | |
| | | */ |
| | | @RequestMapping(value = "/delete",method = RequestMethod.POST) |
| | | public ResultVO delete(@RequestBody Long[] ids) { |
| | | if(ids == null){ |
| | | return new ResultVO<>(ResultCodes.CLIENT_PARAM_ILLEGAL); |
| | | } |
| | | List<Long> idList = Arrays.asList(ids); |
| | | |
| | | List<TargetExamine> delList = new ArrayList<>(); |
| | | idList.forEach(f->{ |
| | | TargetExamine info = new TargetExamine(); |
| | | info.setDelFlag(1); |
| | | info.setId(f); |
| | | delList.add(info); |
| | | }); |
| | | this.targetExamineService.updateBatchById(delList); |
| | | this.targetExamineService.delete(ids); |
| | | return new ResultVO<>(ResultCodes.OK); |
| | | } |
| | | |
| | |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.resp.TargetMngExcel; |
| | | import com.gkhy.safePlatform.targetDuty.service.TargetDivideDetailService; |
| | | import com.gkhy.safePlatform.targetDuty.service.TargetMngService; |
| | | import com.gkhy.safePlatform.targetDuty.service.baseService.TargetMngBaseService; |
| | | import com.gkhy.safePlatform.targetDuty.utils.DateUtils; |
| | | import com.gkhy.safePlatform.targetDuty.utils.poihelper.ExcelLogs; |
| | | import com.gkhy.safePlatform.targetDuty.utils.poihelper.ExcelUtil; |
| | |
| | | @Resource |
| | | private TargetMngService targetMngService; |
| | | @Resource |
| | | private TargetDivideDetailService targetDivideDetailService; |
| | | private TargetMngBaseService targetMngBaseService; |
| | | |
| | | @Autowired |
| | | public HttpServletRequest request; |
| | | |
| | |
| | | */ |
| | | @PostMapping(value = "/page/list") |
| | | public ResultVO selectAll(@RequestBody PageQuery<TargetMngQueryCriteria> pageQuery){ |
| | | if(pageQuery.getSearchParams().getTargetType() == null){ |
| | | return new ResultVO<>(ResultCodes.CLIENT_PARAM_ILLEGAL,"缺少targetType"); |
| | | } |
| | | PageUtils.checkCheck(pageQuery); |
| | | |
| | | return this.targetMngService.queryAll(pageQuery); |
| | | } |
| | | |
| | |
| | | return new ResultVO<>(ResultCodes.CLIENT_PARAM_ILLEGAL,"缺少必填字段"); |
| | | } |
| | | if (targetMng.getId() == null) { |
| | | return new ResultVO<>(ResultCodes.OK,targetMngService.save(targetMng)); |
| | | return new ResultVO<>(ResultCodes.OK,targetMngBaseService.save(targetMng)); |
| | | } else { |
| | | targetMngService.update(targetMng,new UpdateWrapper<TargetMng>().eq("id",targetMng.getId())); |
| | | targetMngBaseService.update(targetMng,new UpdateWrapper<TargetMng>().eq("id",targetMng.getId())); |
| | | return new ResultVO<>(ResultCodes.OK); |
| | | } |
| | | } |
| | |
| | | */ |
| | | @RequestMapping(value = "/delete",method = RequestMethod.POST) |
| | | public ResultVO delete(@RequestBody Long[] ids) { |
| | | if(ids == null){ |
| | | return new ResultVO<>(ResultCodes.CLIENT_PARAM_ILLEGAL); |
| | | } |
| | | List<Long> idList = Arrays.asList(ids); |
| | | //删除关联表数据 |
| | | UpdateWrapper<TargetDivideDetail> updateWrapper = new UpdateWrapper<>(); |
| | | updateWrapper.in("target_id",idList); |
| | | TargetDivideDetail detail = new TargetDivideDetail(); |
| | | detail.setDelFlag(1); |
| | | this.targetDivideDetailService.update(detail,updateWrapper); |
| | | |
| | | List<TargetMng> delList = new ArrayList<>(); |
| | | idList.forEach(f->{ |
| | | TargetMng info = new TargetMng(); |
| | | info.setDelFlag(1); |
| | | info.setId(f); |
| | | delList.add(info); |
| | | }); |
| | | this.targetMngService.updateBatchById(delList); |
| | | this.targetMngService.delete(ids); |
| | | return new ResultVO<>(ResultCodes.OK); |
| | | } |
| | | |
| | |
| | | */ |
| | | @GetMapping(value = "/exportTemplate") |
| | | public void exportTemplate() throws IOException { |
| | | Map<String,String> map = new LinkedHashMap<>(); |
| | | map.put("1","安全目标指标"); |
| | | map.put("2","目标指标编号"); |
| | | map.put("3","指标类型 1:年指标 2:月指标 3:半年 4:季度"); |
| | | map.put("4","年度"); |
| | | map.put("5","指标值"); |
| | | map.put("6","指标级别 1:公司级 2:部门分厂级 3:工段班组级"); |
| | | map.put("7","完成期限(yyyy-MM-dd HH:mm:ss)"); |
| | | map.put("8","备注信息"); |
| | | |
| | | String fileName = URLEncoder.encode("目标设置数据导入模板.xls", "UTF-8"); |
| | | response.setContentType("application/vnd.ms-excel"); |
| | | response.setHeader("Content-Disposition", "attachment;filename=" + fileName + ".xlsx"); |
| | | response.setHeader("Access-Control-Expose-Headers", "Content-Disposition"); |
| | | |
| | | ExcelUtil.exportExcel(map,new ArrayList<>() , response.getOutputStream()); |
| | | response.getOutputStream().close(); |
| | | targetMngService.exportTemplate(); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | @GetMapping(value = "/exportData") |
| | | public void exportData(TargetMngQueryCriteria queryCriteria) throws IOException { |
| | | Map<String,String> map = new LinkedHashMap<>(); |
| | | map.put("1","安全目标指标"); |
| | | map.put("2","目标指标编号"); |
| | | map.put("3","年度"); |
| | | map.put("4","指标值"); |
| | | map.put("5","指标级别"); |
| | | map.put("6","指标类型"); |
| | | map.put("7","完成期限"); |
| | | map.put("8","状态"); |
| | | map.put("9","备注信息"); |
| | | |
| | | String key = DateUtils.date2String(new Date(), DateUtils.PATTERN_ALLTIME_NOSIGN) ; |
| | | String fileName = URLEncoder.encode("目标设置"+key+".xls", "UTF-8"); |
| | | response.setContentType("application/vnd.ms-excel"); |
| | | response.setHeader("Content-Disposition", "attachment;filename=" + fileName + ".xlsx"); |
| | | response.setHeader("Access-Control-Expose-Headers", "Content-Disposition"); |
| | | |
| | | |
| | | List<TargetMngExcel> respList = BeanCopyUtils.copyBeanList(targetMngService.queryAll(queryCriteria), TargetMngExcel.class); |
| | | |
| | | ExcelUtil.exportExcel(map,respList , response.getOutputStream(),DateUtils.PATTERN_STANDARD); |
| | | response.getOutputStream().close(); |
| | | targetMngService.exportData(queryCriteria); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | @RequestMapping(value = "/importData") |
| | | public ResultVO importData(MultipartFile file) throws IOException { |
| | | String contentType = file.getContentType(); |
| | | if(!"application/vnd.ms-excel".equals(contentType) |
| | | && !"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet".equals(contentType)) { |
| | | return new ResultVO<>(ResultCodes.CLIENT_PARAM_ILLEGAL, "上传的excel格式错误"); |
| | | } |
| | | |
| | | Collection<TargetMngImportExcel> importExcel = ExcelUtil.importExcel(TargetMngImportExcel.class, file.getInputStream(), "yyyy-MM-dd HH:mm:ss", new ExcelLogs() , 0); |
| | | |
| | | if (CollectionUtils.isEmpty(importExcel)) { |
| | | return new ResultVO<>(ResultCodes.OK); |
| | | } |
| | | |
| | | List<TargetMng> respList = BeanCopyUtils.copyBeanList((List<TargetMngImportExcel>)importExcel, TargetMng.class); |
| | | |
| | | targetMngService.saveBatch(respList); |
| | | targetMngService.importData(file); |
| | | return new ResultVO<>(ResultCodes.OK); |
| | | } |
| | | |
| | |
| | | package com.gkhy.safePlatform.targetDuty.controller; |
| | | |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.gkhy.safePlatform.targetDuty.entity.TargetType; |
| | | import com.gkhy.safePlatform.targetDuty.service.TargetTypeService; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import com.gkhy.safePlatform.commons.query.PageQuery; |
| | | import com.gkhy.safePlatform.commons.utils.PageUtils; |
| | | import com.gkhy.safePlatform.commons.vo.ResultVO; |
| | | import com.gkhy.safePlatform.commons.enums.ResultCodes; |
| | | import com.gkhy.safePlatform.commons.query.PageQuery; |
| | | import com.gkhy.safePlatform.commons.vo.ResultVO; |
| | | import com.gkhy.safePlatform.targetDuty.entity.TargetType; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.req.TargetTypeQueryCriteria; |
| | | import com.gkhy.safePlatform.targetDuty.service.TargetTypeService; |
| | | import com.gkhy.safePlatform.targetDuty.service.baseService.TargetTypeBaseService; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.stream.Collectors; |
| | | import javax.annotation.Resource; |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 目标分类(TargetType)表控制层 |
| | |
| | | @Resource |
| | | private TargetTypeService targetTypeService; |
| | | |
| | | @Resource |
| | | private TargetTypeBaseService targetTypeBaseService; |
| | | |
| | | /** |
| | | * 分页查询所有数据 |
| | | * |
| | |
| | | */ |
| | | @PostMapping(value = "/page/list") |
| | | public ResultVO selectAll(@RequestBody PageQuery<TargetTypeQueryCriteria> pageQuery){ |
| | | PageUtils.checkCheck(pageQuery); |
| | | |
| | | return this.targetTypeService.queryAll(pageQuery); |
| | | } |
| | | |
| | |
| | | */ |
| | | @GetMapping(value = "/selectOne/{id}") |
| | | public ResultVO selectOne(@PathVariable Serializable id) { |
| | | return new ResultVO<>(ResultCodes.OK,this.targetTypeService.getById(id)); |
| | | return new ResultVO<>(ResultCodes.OK,this.targetTypeBaseService.getById(id)); |
| | | } |
| | | |
| | | /** |
| | |
| | | @PostMapping(value = "/addOrUpdate") |
| | | public ResultVO update(@RequestBody TargetType targetType) { |
| | | if (targetType.getId() == null) { |
| | | return new ResultVO<>(ResultCodes.OK,targetTypeService.save(targetType)); |
| | | return new ResultVO<>(ResultCodes.OK,targetTypeBaseService.save(targetType)); |
| | | } else { |
| | | targetTypeService.update(targetType,new UpdateWrapper<TargetType>().eq("id",targetType.getId())); |
| | | targetTypeBaseService.update(targetType,new UpdateWrapper<TargetType>().eq("id",targetType.getId())); |
| | | return new ResultVO<>(ResultCodes.OK); |
| | | } |
| | | } |
| | |
| | | */ |
| | | @RequestMapping(value = "/delete",method = RequestMethod.POST) |
| | | public ResultVO delete(@RequestBody Long[] ids) { |
| | | if(ids == null){ |
| | | return new ResultVO<>(ResultCodes.CLIENT_PARAM_ILLEGAL); |
| | | } |
| | | List<Long> idList = Arrays.asList(ids); |
| | | |
| | | List<TargetType> delList = new ArrayList<>(); |
| | | idList.forEach(f->{ |
| | | TargetType info = new TargetType(); |
| | | info.setDelFlag(1); |
| | | info.setId(f); |
| | | delList.add(info); |
| | | }); |
| | | this.targetTypeService.updateBatchById(delList); |
| | | this.targetTypeService.delete(ids); |
| | | return new ResultVO<>(ResultCodes.OK); |
| | | } |
| | | } |
| | |
| | | |
| | | package com.gkhy.safePlatform.targetDuty.excepiton; |
| | | |
| | | import com.gkhy.safePlatform.commons.enums.ResultCodes; |
| | | import com.gkhy.safePlatform.targetDuty.enums.TargetDutyResultCodes; |
| | | |
| | | public class TargetDutyException extends RuntimeException { |
| | |
| | | this.message = message; |
| | | } |
| | | |
| | | public TargetDutyException(ResultCodes clientParamIllegal) { |
| | | super(clientParamIllegal.getDesc()); |
| | | this.code = clientParamIllegal.getCode(); |
| | | this.message = clientParamIllegal.getDesc(); |
| | | } |
| | | |
| | | public String getCode() { |
| | | return this.code; |
| | | } |
| | |
| | | @Scheduled(cron = "0 0/30 * * * ?") |
| | | public void keepAlive(){ |
| | | // |
| | | targetTypeService.getById(-1L); |
| | | // targetTypeService.getById(-1L); |
| | | |
| | | } |
| | | |
| | |
| | | * @author xurui |
| | | * @since 2022-07-21 11:01:38 |
| | | */ |
| | | public interface ExamineItemService extends IService<ExamineItem> { |
| | | public interface ExamineItemService { |
| | | ResultVO queryAll(PageQuery<ExamineItemQueryCriteria> pageQuery); |
| | | |
| | | List<ExamineItem> queryAll(ExamineItemQueryCriteria criteria); |
| | |
| | | * @author xurui |
| | | * @since 2022-07-21 13:43:08 |
| | | */ |
| | | public interface ExamineMngService extends IService<ExamineMng> { |
| | | public interface ExamineMngService { |
| | | ResultVO queryAll(PageQuery<ExamineMngQueryCriteria> pageQuery); |
| | | |
| | | List<ExamineMng> queryAll(ExamineMngQueryCriteria criteria); |
| | | |
| | | ExamineMngDto selectOne(Serializable id); |
| | | |
| | | void delete(Long[] ids); |
| | | } |
| | |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.req.ExamineTemplateQueryCriteria; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.req.ExamineTemplateSaveOrUpdate; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.resp.ExamineTemplateDto; |
| | | import org.springframework.security.core.Authentication; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | |
| | | * @author xurui |
| | | * @since 2022-07-21 10:58:10 |
| | | */ |
| | | public interface ExamineTemplateService extends IService<ExamineTemplate> { |
| | | public interface ExamineTemplateService { |
| | | ResultVO queryAll(PageQuery<ExamineTemplateQueryCriteria> pageQuery); |
| | | |
| | | List<ExamineTemplate> queryAll(ExamineTemplateQueryCriteria criteria); |
| | | |
| | | ExamineTemplateDto selectOne(Serializable id); |
| | | |
| | | void addOrUpdate(ExamineTemplateSaveOrUpdate examineTemplateSaveOrUpdate); |
| | | void addOrUpdate(ExamineTemplateSaveOrUpdate examineTemplateSaveOrUpdate, Authentication authentication); |
| | | |
| | | void delete(Long[] ids); |
| | | } |
| | |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.req.RewardPunishmentDetailQueryCriteria; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.resp.RewardPunishmentDetailDto; |
| | | |
| | | import java.io.IOException; |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | |
| | |
| | | * @author xurui |
| | | * @since 2022-07-21 10:15:45 |
| | | */ |
| | | public interface RewardPunishmentDetailService extends IService<RewardPunishmentDetail> { |
| | | public interface RewardPunishmentDetailService { |
| | | ResultVO queryAll(PageQuery<RewardPunishmentDetailQueryCriteria> pageQuery); |
| | | |
| | | List<RewardPunishmentDetail> queryAll(RewardPunishmentDetailQueryCriteria criteria); |
| | |
| | | List<RewardPunishmentDetail> queryAllRelation(RewardPunishmentDetailQueryCriteria criteria); |
| | | |
| | | RewardPunishmentDetailDto selectOne(Serializable id); |
| | | |
| | | void delete(Long[] ids); |
| | | |
| | | void exportData(RewardPunishmentDetailQueryCriteria queryCriteria) throws IOException; |
| | | } |
| | |
| | | import com.gkhy.safePlatform.commons.vo.ResultVO; |
| | | import com.gkhy.safePlatform.commons.query.PageQuery; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.req.RewardPunishmentStandardQueryCriteria; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.io.IOException; |
| | | import java.util.List; |
| | | |
| | | |
| | |
| | | * @author xurui |
| | | * @since 2022-07-21 10:20:10 |
| | | */ |
| | | public interface RewardPunishmentStandardService extends IService<RewardPunishmentStandard> { |
| | | public interface RewardPunishmentStandardService { |
| | | ResultVO queryAll(PageQuery<RewardPunishmentStandardQueryCriteria> pageQuery); |
| | | |
| | | List<RewardPunishmentStandard> queryAll(RewardPunishmentStandardQueryCriteria criteria); |
| | | |
| | | void importData(MultipartFile file) throws IOException; |
| | | |
| | | void delete(Long[] ids); |
| | | |
| | | void exportTemplate() throws IOException; |
| | | |
| | | void exportData(RewardPunishmentStandardQueryCriteria queryCriteria) throws IOException; |
| | | } |
| | |
| | | * @author xurui |
| | | * @since 2022-07-20 13:32:39 |
| | | */ |
| | | public interface TargetDivideDetailService extends IService<TargetDivideDetail> { |
| | | public interface TargetDivideDetailService { |
| | | ResultVO queryAll(PageQuery<TargetDivideDetailQueryCriteria> pageQuery); |
| | | |
| | | List<TargetDivideDetail> queryAll(TargetDivideDetailQueryCriteria criteria); |
| | |
| | | import com.gkhy.safePlatform.commons.query.PageQuery; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.req.TargetDutySummaryQueryCriteria; |
| | | |
| | | import java.io.IOException; |
| | | import java.util.List; |
| | | |
| | | |
| | |
| | | * @author xurui |
| | | * @since 2022-07-21 15:35:14 |
| | | */ |
| | | public interface TargetDutySummaryService extends IService<TargetDutySummary> { |
| | | public interface TargetDutySummaryService { |
| | | ResultVO queryAll(PageQuery<TargetDutySummaryQueryCriteria> pageQuery); |
| | | |
| | | List<TargetDutySummary> queryAll(TargetDutySummaryQueryCriteria criteria); |
| | | |
| | | void delete(Long[] ids); |
| | | |
| | | void exportData(TargetDutySummaryQueryCriteria queryCriteria) throws IOException; |
| | | } |
| | |
| | | * @author xurui |
| | | * @since 2022-08-11 10:13:37 |
| | | */ |
| | | public interface TargetDutyWorkApproveService extends IService<TargetDutyWorkApprove> { |
| | | public interface TargetDutyWorkApproveService { |
| | | ResultVO queryAll(PageQuery<TargetDutyWorkApproveQueryCriteria> pageQuery); |
| | | |
| | | List<TargetDutyWorkApprove> queryAll(TargetDutyWorkApproveQueryCriteria criteria); |
| | |
| | | ResultVO listCheckData(PageQuery<TargetDutyWorkApproveQueryCriteria> pageQuery); |
| | | |
| | | TargetDutyWorkApproveDto selectOne(Serializable id); |
| | | |
| | | void delete(Long[] ids); |
| | | } |
| | |
| | | * @author xurui |
| | | * @since 2022-07-21 10:07:54 |
| | | */ |
| | | public interface TargetDutyfileInfoService extends IService<TargetDutyfileInfo> { |
| | | public interface TargetDutyfileInfoService { |
| | | ResultVO queryAll(PageQuery<TargetDutyfileInfoQueryCriteria> pageQuery); |
| | | |
| | | List<TargetDutyfileInfo> queryAll(TargetDutyfileInfoQueryCriteria criteria); |
| | | |
| | | void delete(Long[] ids); |
| | | } |
| | |
| | | * @author xurui |
| | | * @since 2022-07-22 09:30:01 |
| | | */ |
| | | public interface TargetExamineService extends IService<TargetExamine> { |
| | | public interface TargetExamineService { |
| | | List<TargetExamine> queryAll(TargetExamineQueryCriteria criteria); |
| | | |
| | | void delete(Long[] ids); |
| | | |
| | | // void addOrUpdate(TargetExamineSaveOrUpdate infoDto); |
| | | } |
| | |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.req.TargetCheckAndSubmitQueryCriteria; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.req.TargetMngQueryCriteria; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.resp.TargetMngDto; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.io.IOException; |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | |
| | |
| | | * @author xurui |
| | | * @since 2022-07-20 11:49:22 |
| | | */ |
| | | public interface TargetMngService extends IService<TargetMng> { |
| | | public interface TargetMngService { |
| | | ResultVO<List<TargetMngDto>> queryAll(PageQuery<TargetMngQueryCriteria> pageQuery); |
| | | |
| | | List<TargetMng> queryAll(TargetMngQueryCriteria criteria); |
| | |
| | | ResultVO queryAll(Long uid, PageQuery<TargetCheckAndSubmitQueryCriteria> pageQuery); |
| | | |
| | | Object statistics(TargetMngQueryCriteria criteria); |
| | | |
| | | void delete(Long[] ids); |
| | | |
| | | void importData(MultipartFile file) throws IOException; |
| | | |
| | | void exportTemplate() throws IOException; |
| | | |
| | | void exportData(TargetMngQueryCriteria queryCriteria) throws IOException; |
| | | } |
| | |
| | | * @author xurui |
| | | * @since 2022-08-17 10:20:01 |
| | | */ |
| | | public interface TargetTypeService extends IService<TargetType> { |
| | | public interface TargetTypeService { |
| | | ResultVO queryAll(PageQuery<TargetTypeQueryCriteria> pageQuery); |
| | | |
| | | List<TargetType> queryAll(TargetTypeQueryCriteria criteria); |
| | | |
| | | void delete(Long[] ids); |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.safePlatform.targetDuty.service.baseService; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.gkhy.safePlatform.commons.query.PageQuery; |
| | | import com.gkhy.safePlatform.commons.vo.ResultVO; |
| | | import com.gkhy.safePlatform.targetDuty.entity.ExamineItem; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.req.ExamineItemQueryCriteria; |
| | | |
| | | import java.util.List; |
| | | |
| | | |
| | | /** |
| | | * 绩效考核项目(ExamineItem)表服务接口 |
| | | * |
| | | * @author xurui |
| | | * @since 2022-07-21 11:01:38 |
| | | */ |
| | | public interface ExamineItemBaseService extends IService<ExamineItem> { |
| | | List<ExamineItem> queryAll(ExamineItemQueryCriteria criteria); |
| | | |
| | | IPage<ExamineItem> selectPage(IPage<ExamineItem> page, QueryWrapper predicate); |
| | | |
| | | List<ExamineItem> selectList(QueryWrapper<ExamineItem> queryWrapper); |
| | | |
| | | List<ExamineItem> selectBatchIds(List<Long> idList); |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.safePlatform.targetDuty.service.baseService; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.gkhy.safePlatform.commons.query.PageQuery; |
| | | import com.gkhy.safePlatform.commons.vo.ResultVO; |
| | | import com.gkhy.safePlatform.targetDuty.entity.ExamineMng; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.req.ExamineMngQueryCriteria; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.resp.ExamineMngDto; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | |
| | | |
| | | /** |
| | | * 安全考核管理(ExamineMng)表服务接口 |
| | | * |
| | | * @author xurui |
| | | * @since 2022-07-21 13:43:08 |
| | | */ |
| | | public interface ExamineMngBaseService extends IService<ExamineMng> { |
| | | List<ExamineMng> queryAll(ExamineMngQueryCriteria criteria); |
| | | |
| | | IPage<ExamineMng> selectPage(IPage<ExamineMng> page, QueryWrapper predicate); |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.safePlatform.targetDuty.service.baseService; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.gkhy.safePlatform.commons.query.PageQuery; |
| | | import com.gkhy.safePlatform.commons.vo.ResultVO; |
| | | import com.gkhy.safePlatform.targetDuty.entity.ExamineTemplate; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.req.ExamineTemplateQueryCriteria; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.req.ExamineTemplateSaveOrUpdate; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.resp.ExamineTemplateDto; |
| | | import org.springframework.security.core.Authentication; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | |
| | | |
| | | /** |
| | | * 绩效考核标准(ExamineTemplate)表服务接口 |
| | | * |
| | | * @author xurui |
| | | * @since 2022-07-21 10:58:10 |
| | | */ |
| | | public interface ExamineTemplateBaseService extends IService<ExamineTemplate> { |
| | | List<ExamineTemplate> queryAll(ExamineTemplateQueryCriteria criteria); |
| | | |
| | | IPage<ExamineTemplate> selectPage(IPage<ExamineTemplate> page, QueryWrapper predicate); |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.safePlatform.targetDuty.service.baseService; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.gkhy.safePlatform.commons.query.PageQuery; |
| | | import com.gkhy.safePlatform.commons.vo.ResultVO; |
| | | import com.gkhy.safePlatform.targetDuty.entity.RewardPunishmentDetail; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.req.RewardPunishmentDetailQueryCriteria; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.resp.RewardPunishmentDetailDto; |
| | | |
| | | import java.io.IOException; |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | |
| | | |
| | | /** |
| | | * 奖惩记录(RewardPunishmentDetail)表服务接口 |
| | | * |
| | | * @author xurui |
| | | * @since 2022-07-21 10:15:45 |
| | | */ |
| | | public interface RewardPunishmentDetailBaseService extends IService<RewardPunishmentDetail> { |
| | | List<RewardPunishmentDetail> queryAll(RewardPunishmentDetailQueryCriteria criteria); |
| | | |
| | | IPage<RewardPunishmentDetailDto> queryAll(IPage<RewardPunishmentDetailDto> page, String personId); |
| | | |
| | | List<RewardPunishmentDetail> queryAll(String personId); |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.safePlatform.targetDuty.service.baseService; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.gkhy.safePlatform.commons.query.PageQuery; |
| | | import com.gkhy.safePlatform.commons.vo.ResultVO; |
| | | import com.gkhy.safePlatform.targetDuty.entity.RewardPunishmentStandard; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.req.RewardPunishmentStandardQueryCriteria; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.io.IOException; |
| | | import java.util.List; |
| | | |
| | | |
| | | /** |
| | | * (RewardPunishmentStandard)表服务接口 |
| | | * |
| | | * @author xurui |
| | | * @since 2022-07-21 10:20:10 |
| | | */ |
| | | public interface RewardPunishmentStandardBaseService extends IService<RewardPunishmentStandard> { |
| | | List<RewardPunishmentStandard> queryAll(RewardPunishmentStandardQueryCriteria criteria); |
| | | |
| | | IPage<RewardPunishmentStandard> selectPage(IPage<RewardPunishmentStandard> page, QueryWrapper predicate); |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.safePlatform.targetDuty.service.baseService; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.gkhy.safePlatform.commons.query.PageQuery; |
| | | import com.gkhy.safePlatform.commons.vo.ResultVO; |
| | | import com.gkhy.safePlatform.targetDuty.entity.TargetDivideDetail; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.req.TargetDivideDetailQueryCriteria; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.req.TargetDivideDetailSaveOrUpdate; |
| | | |
| | | import java.util.List; |
| | | import java.util.Set; |
| | | |
| | | |
| | | /** |
| | | * 目标指标分解详情(TargetDivideDetail)表服务接口 |
| | | * |
| | | * @author xurui |
| | | * @since 2022-07-20 13:32:39 |
| | | */ |
| | | public interface TargetDivideDetailBaseService extends IService<TargetDivideDetail> { |
| | | List<TargetDivideDetail> queryAll(TargetDivideDetailQueryCriteria criteria); |
| | | |
| | | IPage<TargetDivideDetail> selectPage(IPage<TargetDivideDetail> page, QueryWrapper predicate); |
| | | |
| | | List<TargetDivideDetail> selectBatchIds(Set<Long> keySet); |
| | | |
| | | List<TargetDivideDetail> selectList(QueryWrapper<TargetDivideDetail> queryWrapper); |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.safePlatform.targetDuty.service.baseService; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.gkhy.safePlatform.commons.query.PageQuery; |
| | | import com.gkhy.safePlatform.commons.vo.ResultVO; |
| | | import com.gkhy.safePlatform.targetDuty.entity.TargetDutySummary; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.req.TargetDutySummaryQueryCriteria; |
| | | |
| | | import java.io.IOException; |
| | | import java.util.List; |
| | | |
| | | |
| | | /** |
| | | * (TargetDutySummary)表服务接口 |
| | | * |
| | | * @author xurui |
| | | * @since 2022-07-21 15:35:14 |
| | | */ |
| | | public interface TargetDutySummaryBaseService extends IService<TargetDutySummary> { |
| | | List<TargetDutySummary> queryAll(TargetDutySummaryQueryCriteria criteria); |
| | | |
| | | IPage<TargetDutySummary> selectPage(IPage<TargetDutySummary> page, QueryWrapper predicate); |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.safePlatform.targetDuty.service.baseService; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.gkhy.safePlatform.commons.co.ContextCacheUser; |
| | | import com.gkhy.safePlatform.commons.query.PageQuery; |
| | | import com.gkhy.safePlatform.commons.vo.ResultVO; |
| | | import com.gkhy.safePlatform.targetDuty.entity.TargetDutyWorkApprove; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.req.TargetDutyWorkApproveQueryCriteria; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.resp.ListCheckDataDto; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.resp.TargetDutyWorkApproveDto; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | |
| | | |
| | | /** |
| | | * 目标责任管理工作流审批表(TargetDutyWorkApprove)表服务接口 |
| | | * |
| | | * @author xurui |
| | | * @since 2022-08-11 10:13:37 |
| | | */ |
| | | public interface TargetDutyWorkApproveBaseService extends IService<TargetDutyWorkApprove> { |
| | | List<TargetDutyWorkApprove> queryAll(TargetDutyWorkApproveQueryCriteria criteria); |
| | | |
| | | IPage<TargetDutyWorkApprove> selectPage(IPage<TargetDutyWorkApprove> page, QueryWrapper queryWrapper); |
| | | |
| | | IPage<ListCheckDataDto> listCheckData(IPage<ListCheckDataDto> page, Long relateId); |
| | | |
| | | List<TargetDutyWorkApprove> selectList(QueryWrapper<TargetDutyWorkApprove> orderByDesc); |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.safePlatform.targetDuty.service.baseService; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.gkhy.safePlatform.commons.query.PageQuery; |
| | | import com.gkhy.safePlatform.commons.vo.ResultVO; |
| | | import com.gkhy.safePlatform.targetDuty.entity.TargetDutyfileInfo; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.req.TargetDutyfileInfoQueryCriteria; |
| | | |
| | | import java.util.List; |
| | | |
| | | |
| | | /** |
| | | * 目标责任书(TargetDutyfileInfo)表服务接口 |
| | | * |
| | | * @author xurui |
| | | * @since 2022-07-21 10:07:54 |
| | | */ |
| | | public interface TargetDutyfileInfoBaseService extends IService<TargetDutyfileInfo> { |
| | | List<TargetDutyfileInfo> queryAll(TargetDutyfileInfoQueryCriteria criteria); |
| | | |
| | | IPage<TargetDutyfileInfo> selectPage(IPage<TargetDutyfileInfo> page, QueryWrapper predicate); |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.safePlatform.targetDuty.service.baseService; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.gkhy.safePlatform.targetDuty.entity.TargetExamine; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.req.TargetExamineQueryCriteria; |
| | | |
| | | import java.util.List; |
| | | |
| | | |
| | | /** |
| | | * (TargetExamine)表服务接口 |
| | | * |
| | | * @author xurui |
| | | * @since 2022-07-22 09:30:01 |
| | | */ |
| | | public interface TargetExamineBaseService extends IService<TargetExamine> { |
| | | List<TargetExamine> queryAll(TargetExamineQueryCriteria criteria); |
| | | |
| | | List<TargetExamine> selectList(QueryWrapper<TargetExamine> eq); |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.safePlatform.targetDuty.service.baseService; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.gkhy.safePlatform.commons.query.PageQuery; |
| | | import com.gkhy.safePlatform.commons.vo.ResultVO; |
| | | import com.gkhy.safePlatform.targetDuty.entity.TargetMng; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.req.TargetCheckAndSubmitQueryCriteria; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.req.TargetMngQueryCriteria; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.resp.TargetMngDto; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.io.IOException; |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | |
| | | |
| | | /** |
| | | * 目标指标(TargetMng)表服务接口 |
| | | * |
| | | * @author xurui |
| | | * @since 2022-07-20 11:49:22 |
| | | */ |
| | | public interface TargetMngBaseService extends IService<TargetMng> { |
| | | List<TargetMng> queryAll(TargetMngQueryCriteria criteria); |
| | | |
| | | IPage<TargetMng> selectPage(IPage<TargetMng> page, QueryWrapper predicate); |
| | | |
| | | List<TargetMng> selectList(QueryWrapper<TargetMng> eq); |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.safePlatform.targetDuty.service.baseService; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.gkhy.safePlatform.commons.query.PageQuery; |
| | | import com.gkhy.safePlatform.commons.vo.ResultVO; |
| | | import com.gkhy.safePlatform.targetDuty.entity.TargetType; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.req.TargetTypeQueryCriteria; |
| | | |
| | | import java.util.List; |
| | | import java.util.Set; |
| | | |
| | | |
| | | /** |
| | | * 目标分类(TargetType)表服务接口 |
| | | * |
| | | * @author xurui |
| | | * @since 2022-08-17 10:20:01 |
| | | */ |
| | | public interface TargetTypeBaseService extends IService<TargetType> { |
| | | List<TargetType> queryAll(TargetTypeQueryCriteria criteria); |
| | | |
| | | IPage<TargetType> selectPage(IPage<TargetType> page, QueryWrapper predicate); |
| | | |
| | | List<TargetType> selectBatchIds(Set<Long> collectTypeSet); |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.safePlatform.targetDuty.service.baseService.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.gkhy.safePlatform.targetDuty.entity.ExamineItem; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.req.ExamineItemQueryCriteria; |
| | | import com.gkhy.safePlatform.targetDuty.repository.ExamineItemRepository; |
| | | import com.gkhy.safePlatform.targetDuty.service.baseService.ExamineItemBaseService; |
| | | import com.gkhy.safePlatform.targetDuty.utils.QueryHelpPlus; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 绩效考核项目(ExamineItem)表服务实现类 |
| | | * |
| | | * @author xurui |
| | | * @since 2022-07-21 11:01:38 |
| | | */ |
| | | @Service("examineItemBaseService") |
| | | public class ExamineItemBaseServiceImpl extends ServiceImpl<ExamineItemRepository, ExamineItem> implements ExamineItemBaseService { |
| | | |
| | | @Autowired |
| | | private ExamineItemRepository examineItemRepository; |
| | | |
| | | |
| | | @Override |
| | | public List<ExamineItem> queryAll(ExamineItemQueryCriteria criteria) { |
| | | return baseMapper.selectList(QueryHelpPlus.getPredicate(ExamineItem.class, criteria)); |
| | | } |
| | | |
| | | @Override |
| | | public IPage<ExamineItem> selectPage(IPage<ExamineItem> page, QueryWrapper predicate) { |
| | | return baseMapper.selectPage(page,predicate); |
| | | } |
| | | |
| | | @Override |
| | | public List<ExamineItem> selectList(QueryWrapper<ExamineItem> queryWrapper) { |
| | | return baseMapper.selectList(queryWrapper); |
| | | } |
| | | |
| | | @Override |
| | | public List<ExamineItem> selectBatchIds(List<Long> idList) { |
| | | return baseMapper.selectBatchIds(idList); |
| | | } |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.safePlatform.targetDuty.service.baseService.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.gkhy.safePlatform.targetDuty.entity.ExamineMng; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.req.ExamineMngQueryCriteria; |
| | | import com.gkhy.safePlatform.targetDuty.repository.ExamineMngRepository; |
| | | import com.gkhy.safePlatform.targetDuty.service.baseService.ExamineMngBaseService; |
| | | import com.gkhy.safePlatform.targetDuty.utils.QueryHelpPlus; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 安全考核管理(ExamineMng)表服务实现类 |
| | | * |
| | | * @author xurui |
| | | * @since 2022-07-21 13:43:08 |
| | | */ |
| | | @Service("examineMngBaseService") |
| | | public class ExamineMngBaseServiceImpl extends ServiceImpl<ExamineMngRepository, ExamineMng> implements ExamineMngBaseService { |
| | | |
| | | @Override |
| | | public List<ExamineMng> queryAll(ExamineMngQueryCriteria criteria) { |
| | | return baseMapper.selectList(QueryHelpPlus.getPredicate(ExamineMng.class, criteria)); |
| | | } |
| | | |
| | | @Override |
| | | public IPage<ExamineMng> selectPage(IPage<ExamineMng> page, QueryWrapper predicate) { |
| | | return baseMapper.selectPage(page,predicate); |
| | | |
| | | } |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.safePlatform.targetDuty.service.baseService.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.gkhy.safePlatform.targetDuty.entity.ExamineTemplate; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.req.ExamineTemplateQueryCriteria; |
| | | import com.gkhy.safePlatform.targetDuty.repository.ExamineTemplateRepository; |
| | | import com.gkhy.safePlatform.targetDuty.service.baseService.ExamineTemplateBaseService; |
| | | import com.gkhy.safePlatform.targetDuty.utils.QueryHelpPlus; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 绩效考核标准(ExamineTemplate)表服务实现类 |
| | | * |
| | | * @author xurui |
| | | * @since 2022-07-21 10:58:10 |
| | | */ |
| | | @Service("examineTemplateBaseService") |
| | | public class ExamineTemplateBaseServiceImpl extends ServiceImpl<ExamineTemplateRepository, ExamineTemplate> implements ExamineTemplateBaseService { |
| | | |
| | | |
| | | @Override |
| | | public List<ExamineTemplate> queryAll(ExamineTemplateQueryCriteria criteria) { |
| | | return baseMapper.selectList(QueryHelpPlus.getPredicate(ExamineTemplate.class, criteria)); |
| | | } |
| | | |
| | | @Override |
| | | public IPage<ExamineTemplate> selectPage(IPage<ExamineTemplate> page, QueryWrapper predicate) { |
| | | return baseMapper.selectPage(page,predicate); |
| | | |
| | | } |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.safePlatform.targetDuty.service.baseService.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.gkhy.safePlatform.targetDuty.entity.RewardPunishmentDetail; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.req.RewardPunishmentDetailQueryCriteria; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.resp.RewardPunishmentDetailDto; |
| | | import com.gkhy.safePlatform.targetDuty.repository.RewardPunishmentDetailRepository; |
| | | import com.gkhy.safePlatform.targetDuty.service.baseService.RewardPunishmentDetailBaseService; |
| | | import com.gkhy.safePlatform.targetDuty.utils.QueryHelpPlus; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * 奖惩记录(RewardPunishmentDetail)表服务实现类 |
| | | * |
| | | * @author xurui |
| | | * @since 2022-07-21 10:15:45 |
| | | */ |
| | | @Service("rewardPunishmentDetailBaseService") |
| | | public class RewardPunishmentDetailBaseServiceImpl extends ServiceImpl<RewardPunishmentDetailRepository, RewardPunishmentDetail> implements RewardPunishmentDetailBaseService { |
| | | |
| | | |
| | | @Override |
| | | public List<RewardPunishmentDetail> queryAll(RewardPunishmentDetailQueryCriteria criteria) { |
| | | return baseMapper.selectList(QueryHelpPlus.getPredicate(RewardPunishmentDetail.class, criteria)); |
| | | } |
| | | |
| | | @Override |
| | | public IPage<RewardPunishmentDetailDto> queryAll(IPage<RewardPunishmentDetailDto> page, String personId) { |
| | | return baseMapper.queryAll(page,personId); |
| | | } |
| | | |
| | | @Override |
| | | public List<RewardPunishmentDetail> queryAll(String personId) { |
| | | return baseMapper.queryAll(personId); |
| | | } |
| | | |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.safePlatform.targetDuty.service.baseService.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.gkhy.safePlatform.targetDuty.entity.RewardPunishmentStandard; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.req.RewardPunishmentStandardQueryCriteria; |
| | | import com.gkhy.safePlatform.targetDuty.repository.RewardPunishmentStandardRepository; |
| | | import com.gkhy.safePlatform.targetDuty.service.baseService.RewardPunishmentStandardBaseService; |
| | | import com.gkhy.safePlatform.targetDuty.utils.QueryHelpPlus; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * (RewardPunishmentStandard)表服务实现类 |
| | | * |
| | | * @author xurui |
| | | * @since 2022-07-21 10:20:10 |
| | | */ |
| | | @Service("rewardPunishmentStandardBaseService") |
| | | public class RewardPunishmentStandardBaseServiceImpl extends ServiceImpl<RewardPunishmentStandardRepository, RewardPunishmentStandard> implements RewardPunishmentStandardBaseService { |
| | | |
| | | |
| | | @Override |
| | | public List<RewardPunishmentStandard> queryAll(RewardPunishmentStandardQueryCriteria criteria) { |
| | | return baseMapper.selectList(QueryHelpPlus.getPredicate(RewardPunishmentStandard.class, criteria)); |
| | | } |
| | | |
| | | @Override |
| | | public IPage<RewardPunishmentStandard> selectPage(IPage<RewardPunishmentStandard> page, QueryWrapper predicate) { |
| | | return baseMapper.selectPage(page,predicate); |
| | | |
| | | } |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.safePlatform.targetDuty.service.baseService.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.gkhy.safePlatform.targetDuty.entity.TargetDivideDetail; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.req.TargetDivideDetailQueryCriteria; |
| | | import com.gkhy.safePlatform.targetDuty.repository.TargetDivideDetailRepository; |
| | | import com.gkhy.safePlatform.targetDuty.service.baseService.TargetDivideDetailBaseService; |
| | | import com.gkhy.safePlatform.targetDuty.utils.QueryHelpPlus; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | import java.util.Set; |
| | | |
| | | /** |
| | | * 目标指标分解详情(TargetDivideDetail)表服务实现类 |
| | | * |
| | | * @author xurui |
| | | * @since 2022-07-20 13:32:39 |
| | | */ |
| | | @Service("targetDivideDetailBaseService") |
| | | public class TargetDivideDetailBaseServiceImpl extends ServiceImpl<TargetDivideDetailRepository, TargetDivideDetail> implements TargetDivideDetailBaseService { |
| | | |
| | | @Override |
| | | public List<TargetDivideDetail> queryAll(TargetDivideDetailQueryCriteria criteria) { |
| | | return baseMapper.selectList(QueryHelpPlus.getPredicate(TargetDivideDetail.class, criteria)); |
| | | } |
| | | |
| | | @Override |
| | | public IPage<TargetDivideDetail> selectPage(IPage<TargetDivideDetail> page, QueryWrapper predicate) { |
| | | return baseMapper.selectPage(page,predicate); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public List<TargetDivideDetail> selectBatchIds(Set<Long> keySet) { |
| | | return baseMapper.selectBatchIds(keySet); |
| | | } |
| | | |
| | | @Override |
| | | public List<TargetDivideDetail> selectList(QueryWrapper<TargetDivideDetail> queryWrapper) { |
| | | return baseMapper.selectList(queryWrapper); |
| | | } |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.safePlatform.targetDuty.service.baseService.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.gkhy.safePlatform.targetDuty.entity.TargetDutySummary; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.req.TargetDutySummaryQueryCriteria; |
| | | import com.gkhy.safePlatform.targetDuty.repository.TargetDutySummaryRepository; |
| | | import com.gkhy.safePlatform.targetDuty.service.baseService.TargetDutySummaryBaseService; |
| | | import com.gkhy.safePlatform.targetDuty.utils.QueryHelpPlus; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * (TargetDutySummary)表服务实现类 |
| | | * |
| | | * @author xurui |
| | | * @since 2022-07-21 15:35:14 |
| | | */ |
| | | @Service("targetDutySummaryBaseService") |
| | | public class TargetDutySummaryBaseServiceImpl extends ServiceImpl<TargetDutySummaryRepository, TargetDutySummary> implements TargetDutySummaryBaseService { |
| | | |
| | | |
| | | @Override |
| | | public List<TargetDutySummary> queryAll(TargetDutySummaryQueryCriteria criteria) { |
| | | return baseMapper.selectList(QueryHelpPlus.getPredicate(TargetDutySummary.class, criteria)); |
| | | } |
| | | |
| | | @Override |
| | | public IPage<TargetDutySummary> selectPage(IPage<TargetDutySummary> page, QueryWrapper predicate) { |
| | | return baseMapper.selectPage(page,predicate); |
| | | |
| | | } |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.safePlatform.targetDuty.service.baseService.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.gkhy.safePlatform.targetDuty.entity.TargetDutyWorkApprove; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.req.TargetDutyWorkApproveQueryCriteria; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.resp.ListCheckDataDto; |
| | | import com.gkhy.safePlatform.targetDuty.repository.TargetDutyWorkApproveRepository; |
| | | import com.gkhy.safePlatform.targetDuty.service.baseService.TargetDutyWorkApproveBaseService; |
| | | import com.gkhy.safePlatform.targetDuty.utils.QueryHelpPlus; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 目标责任管理工作流审批表(TargetDutyWorkApprove)表服务实现类 |
| | | * |
| | | * @author xurui |
| | | * @since 2022-08-11 10:13:37 |
| | | */ |
| | | @Service("targetDutyWorkApproveBaseService") |
| | | public class TargetDutyWorkApproveBaseServiceImpl extends ServiceImpl<TargetDutyWorkApproveRepository, TargetDutyWorkApprove> implements TargetDutyWorkApproveBaseService { |
| | | |
| | | @Override |
| | | public List<TargetDutyWorkApprove> queryAll(TargetDutyWorkApproveQueryCriteria criteria) { |
| | | return baseMapper.selectList(QueryHelpPlus.getPredicate(TargetDutyWorkApprove.class, criteria)); |
| | | } |
| | | |
| | | @Override |
| | | public IPage<TargetDutyWorkApprove> selectPage(IPage<TargetDutyWorkApprove> page, QueryWrapper queryWrapper) { |
| | | return baseMapper.selectPage(page,queryWrapper); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public IPage<ListCheckDataDto> listCheckData(IPage<ListCheckDataDto> page, Long relateId) { |
| | | return baseMapper.listCheckData(page, relateId); |
| | | } |
| | | |
| | | @Override |
| | | public List<TargetDutyWorkApprove> selectList(QueryWrapper<TargetDutyWorkApprove> queryWrapper) { |
| | | return baseMapper.selectList(queryWrapper); |
| | | } |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.safePlatform.targetDuty.service.baseService.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.gkhy.safePlatform.targetDuty.entity.TargetDutyfileInfo; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.req.TargetDutyfileInfoQueryCriteria; |
| | | import com.gkhy.safePlatform.targetDuty.repository.TargetDutyfileInfoRepository; |
| | | import com.gkhy.safePlatform.targetDuty.service.baseService.TargetDutyfileInfoBaseService; |
| | | import com.gkhy.safePlatform.targetDuty.utils.QueryHelpPlus; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 目标责任书(TargetDutyfileInfo)表服务实现类 |
| | | * |
| | | * @author xurui |
| | | * @since 2022-07-21 10:07:54 |
| | | */ |
| | | @Service("targetDutyfileInfoBaseService") |
| | | public class TargetDutyfileInfoBaseServiceImpl extends ServiceImpl<TargetDutyfileInfoRepository, TargetDutyfileInfo> implements TargetDutyfileInfoBaseService { |
| | | |
| | | @Override |
| | | public List<TargetDutyfileInfo> queryAll(TargetDutyfileInfoQueryCriteria criteria) { |
| | | return baseMapper.selectList(QueryHelpPlus.getPredicate(TargetDutyfileInfo.class, criteria)); |
| | | } |
| | | |
| | | @Override |
| | | public IPage<TargetDutyfileInfo> selectPage(IPage<TargetDutyfileInfo> page, QueryWrapper predicate) { |
| | | return baseMapper.selectPage(page,predicate); |
| | | |
| | | } |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.safePlatform.targetDuty.service.baseService.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.gkhy.safePlatform.targetDuty.entity.TargetExamine; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.req.TargetExamineQueryCriteria; |
| | | import com.gkhy.safePlatform.targetDuty.repository.TargetExamineRepository; |
| | | import com.gkhy.safePlatform.targetDuty.service.baseService.TargetExamineBaseService; |
| | | import com.gkhy.safePlatform.targetDuty.utils.QueryHelpPlus; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * (TargetExamine)表服务实现类 |
| | | * |
| | | * @author xurui |
| | | * @since 2022-07-22 09:30:01 |
| | | */ |
| | | @Service("targetExamineBaseService") |
| | | public class TargetExamineBaseServiceImpl extends ServiceImpl<TargetExamineRepository, TargetExamine> implements TargetExamineBaseService { |
| | | |
| | | |
| | | @Override |
| | | public List<TargetExamine> queryAll(TargetExamineQueryCriteria criteria) { |
| | | return baseMapper.selectList(QueryHelpPlus.getPredicate(TargetExamine.class, criteria)); |
| | | } |
| | | |
| | | @Override |
| | | public List<TargetExamine> selectList(QueryWrapper<TargetExamine> eq) { |
| | | return baseMapper.selectList(eq); |
| | | } |
| | | |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.safePlatform.targetDuty.service.baseService.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.gkhy.safePlatform.targetDuty.entity.TargetMng; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.req.TargetMngQueryCriteria; |
| | | import com.gkhy.safePlatform.targetDuty.repository.TargetMngRepository; |
| | | import com.gkhy.safePlatform.targetDuty.service.baseService.TargetMngBaseService; |
| | | import com.gkhy.safePlatform.targetDuty.utils.QueryHelpPlus; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 目标指标(TargetMng)表服务实现类 |
| | | * |
| | | * @author xurui |
| | | * @since 2022-07-20 11:49:22 |
| | | */ |
| | | @Service("targetMngBaseService") |
| | | public class TargetMngBaseServiceImpl extends ServiceImpl<TargetMngRepository, TargetMng> implements TargetMngBaseService { |
| | | |
| | | @Override |
| | | public List<TargetMng> queryAll(TargetMngQueryCriteria criteria) { |
| | | return baseMapper.selectList(QueryHelpPlus.getPredicate(TargetMng.class, criteria)); |
| | | } |
| | | |
| | | @Override |
| | | public IPage<TargetMng> selectPage(IPage<TargetMng> page, QueryWrapper predicate) { |
| | | return baseMapper.selectPage(page, predicate); |
| | | } |
| | | |
| | | @Override |
| | | public List<TargetMng> selectList(QueryWrapper<TargetMng> eq) { |
| | | return baseMapper.selectList(eq); |
| | | } |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.safePlatform.targetDuty.service.baseService.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.gkhy.safePlatform.targetDuty.entity.TargetType; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.req.TargetTypeQueryCriteria; |
| | | import com.gkhy.safePlatform.targetDuty.repository.TargetTypeRepository; |
| | | import com.gkhy.safePlatform.targetDuty.service.baseService.TargetTypeBaseService; |
| | | import com.gkhy.safePlatform.targetDuty.utils.QueryHelpPlus; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | import java.util.Set; |
| | | |
| | | /** |
| | | * 目标分类(TargetType)表服务实现类 |
| | | * |
| | | * @author xurui |
| | | * @since 2022-08-17 10:20:01 |
| | | */ |
| | | @Service("targetTypeBaseService") |
| | | public class TargetTypeBaseServiceImpl extends ServiceImpl<TargetTypeRepository, TargetType> implements TargetTypeBaseService { |
| | | |
| | | |
| | | @Override |
| | | public List<TargetType> queryAll(TargetTypeQueryCriteria criteria) { |
| | | return baseMapper.selectList(QueryHelpPlus.getPredicate(TargetType.class, criteria)); |
| | | } |
| | | |
| | | @Override |
| | | public IPage<TargetType> selectPage(IPage<TargetType> page, QueryWrapper predicate) { |
| | | return baseMapper.selectPage(page,predicate); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public List<TargetType> selectBatchIds(Set<Long> collectTypeSet) { |
| | | return baseMapper.selectBatchIds(collectTypeSet); |
| | | } |
| | | } |
| | |
| | | import com.gkhy.safePlatform.targetDuty.repository.ExamineItemRepository; |
| | | import com.gkhy.safePlatform.targetDuty.entity.ExamineItem; |
| | | import com.gkhy.safePlatform.targetDuty.service.ExamineItemService; |
| | | import com.gkhy.safePlatform.targetDuty.service.baseService.ExamineItemBaseService; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.gkhy.safePlatform.commons.enums.ResultCodes; |
| | |
| | | * @since 2022-07-21 11:01:38 |
| | | */ |
| | | @Service("examineItemService") |
| | | public class ExamineItemServiceImpl extends ServiceImpl<ExamineItemRepository, ExamineItem> implements ExamineItemService { |
| | | public class ExamineItemServiceImpl implements ExamineItemService { |
| | | |
| | | @Autowired |
| | | private ExamineItemRepository examineItemRepository; |
| | | private ExamineItemBaseService examineItemBaseService; |
| | | |
| | | |
| | | |
| | |
| | | Long pageSize = pageQuery.getPageSize(); |
| | | IPage<ExamineItem> page = new Page<>(pageIndex, pageSize); |
| | | |
| | | page = baseMapper.selectPage(page, |
| | | page = examineItemBaseService.selectPage(page, |
| | | QueryHelpPlus.getPredicate(ExamineItem.class, pageQuery.getSearchParams())); |
| | | List<ExamineItemDto> respList = BeanCopyUtils.copyBeanList(page.getRecords(), ExamineItemDto.class); |
| | | |
| | |
| | | |
| | | @Override |
| | | public List<ExamineItem> queryAll(ExamineItemQueryCriteria criteria) { |
| | | return baseMapper.selectList(QueryHelpPlus.getPredicate(ExamineItem.class, criteria)); |
| | | return examineItemBaseService.queryAll(criteria); |
| | | } |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | 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.gkhy.safePlatform.targetDuty.entity.ExamineItem; |
| | | import com.gkhy.safePlatform.targetDuty.entity.ExamineTemplate; |
| | | import com.gkhy.safePlatform.targetDuty.entity.TargetMng; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.resp.CurrentExamineDto; |
| | | import com.gkhy.safePlatform.targetDuty.repository.ExamineItemRepository; |
| | | import com.gkhy.safePlatform.targetDuty.repository.ExamineMngRepository; |
| | | import com.gkhy.safePlatform.targetDuty.entity.ExamineMng; |
| | | import com.gkhy.safePlatform.targetDuty.repository.ExamineTemplateRepository; |
| | | import com.gkhy.safePlatform.targetDuty.service.CommonService; |
| | | import com.gkhy.safePlatform.targetDuty.service.ExamineMngService; |
| | | import com.gkhy.safePlatform.targetDuty.service.ExamineTemplateService; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.gkhy.safePlatform.commons.enums.ResultCodes; |
| | | import com.gkhy.safePlatform.commons.query.PageQuery; |
| | | import com.gkhy.safePlatform.commons.utils.BeanCopyUtils; |
| | | import com.gkhy.safePlatform.commons.utils.PageUtils; |
| | | import com.gkhy.safePlatform.commons.vo.ResultVO; |
| | | import com.gkhy.safePlatform.commons.vo.SearchResultVO; |
| | | import com.gkhy.safePlatform.targetDuty.entity.ExamineItem; |
| | | import com.gkhy.safePlatform.targetDuty.entity.ExamineMng; |
| | | import com.gkhy.safePlatform.targetDuty.entity.ExamineTemplate; |
| | | import com.gkhy.safePlatform.targetDuty.excepiton.TargetDutyException; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.req.ExamineMngQueryCriteria; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.resp.CurrentExamineDto; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.resp.ExamineMngDto; |
| | | import com.gkhy.safePlatform.targetDuty.service.CommonService; |
| | | import com.gkhy.safePlatform.targetDuty.service.ExamineMngService; |
| | | import com.gkhy.safePlatform.targetDuty.service.baseService.ExamineItemBaseService; |
| | | import com.gkhy.safePlatform.targetDuty.service.baseService.ExamineMngBaseService; |
| | | import com.gkhy.safePlatform.targetDuty.service.baseService.ExamineTemplateBaseService; |
| | | import com.gkhy.safePlatform.targetDuty.utils.QueryHelpPlus; |
| | | import com.gkhy.safePlatform.commons.utils.BeanCopyUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.StringUtils; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.Serializable; |
| | | import java.util.HashSet; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Set; |
| | | import java.util.*; |
| | | import java.util.function.Function; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | * @since 2022-07-21 13:43:08 |
| | | */ |
| | | @Service("examineMngService") |
| | | public class ExamineMngServiceImpl extends ServiceImpl<ExamineMngRepository, ExamineMng> implements ExamineMngService { |
| | | public class ExamineMngServiceImpl implements ExamineMngService { |
| | | |
| | | @Autowired |
| | | private ExamineMngRepository examineMngRepository; |
| | | private ExamineMngBaseService examineMngBaseService; |
| | | @Autowired |
| | | private ExamineItemRepository examineItemRepository; |
| | | private ExamineItemBaseService examineItemBaseService; |
| | | @Resource |
| | | private ExamineTemplateRepository examineTemplateRepository; |
| | | private ExamineTemplateBaseService examineTemplateBaseService; |
| | | |
| | | @Resource |
| | | private CommonService commonService; |
| | | |
| | | |
| | | |
| | | |
| | | @Override |
| | | public ResultVO queryAll(PageQuery<ExamineMngQueryCriteria> pageQuery) { |
| | | PageUtils.checkCheck(pageQuery); |
| | | Long pageIndex = pageQuery.getPageIndex(); |
| | | Long pageSize = pageQuery.getPageSize(); |
| | | IPage<ExamineMng> page = new Page<>(pageIndex, pageSize); |
| | | |
| | | page = baseMapper.selectPage(page, |
| | | page = examineMngBaseService.selectPage(page, |
| | | QueryHelpPlus.getPredicate(ExamineMng.class, pageQuery.getSearchParams())); |
| | | List<ExamineMngDto> respList = BeanCopyUtils.copyBeanList(page.getRecords(), ExamineMngDto.class); |
| | | |
| | |
| | | List<Long> idList = list.stream().map(CurrentExamineDto::getId).collect(Collectors.toList()); |
| | | |
| | | if(!idList.isEmpty()){ |
| | | List<ExamineItem> itemList = examineItemRepository.selectBatchIds(idList); |
| | | List<ExamineItem> itemList = examineItemBaseService.selectBatchIds(idList); |
| | | Map<Long,ExamineItem> itemMap = itemList.stream().collect( |
| | | Collectors.toMap(ExamineItem::getId, Function.identity(),(k1, k2)->k1)); |
| | | |
| | |
| | | |
| | | @Override |
| | | public List<ExamineMng> queryAll(ExamineMngQueryCriteria criteria) { |
| | | return baseMapper.selectList(QueryHelpPlus.getPredicate(ExamineMng.class, criteria)); |
| | | return examineMngBaseService.queryAll(criteria); |
| | | } |
| | | |
| | | @Override |
| | | public ExamineMngDto selectOne(Serializable id) { |
| | | ExamineMng examineMng = this.getById(id); |
| | | ExamineMng examineMng = examineMngBaseService.getById(id); |
| | | if(examineMng == null){ |
| | | return null; |
| | | } |
| | |
| | | //获取打分明细 |
| | | List<CurrentExamineDto> list = JSONObject.parseArray( examineMng.getNumberDetailJson(), CurrentExamineDto.class); |
| | | List<Long> idList = list.stream().map(CurrentExamineDto::getId).collect(Collectors.toList()); |
| | | if (!idList.isEmpty()){ |
| | | List<ExamineItem> itemList = examineItemRepository.selectBatchIds(idList); |
| | | Map<Long,ExamineItem> itemMap = itemList.stream().collect( |
| | | Collectors.toMap(ExamineItem::getId, Function.identity(),(k1, k2)->k1)); |
| | | |
| | | if(itemMap != null){ |
| | | list.forEach(f->{ |
| | | ExamineItem item = itemMap.get(f.getId()); |
| | | if(item != null){ |
| | | f.setItemDetail(item.getItemDetail()); |
| | | f.setContent(item.getContent()); |
| | | f.setJudgeStandard(item.getJudgeStandard()); |
| | | } |
| | | }); |
| | | } |
| | | List<ExamineItem> itemList = examineItemBaseService.selectBatchIds(idList); |
| | | Map<Long,ExamineItem> itemMap = itemList.stream().collect( |
| | | Collectors.toMap(ExamineItem::getId, Function.identity(),(k1, k2)->k1)); |
| | | |
| | | if(itemMap != null){ |
| | | list.forEach(f->{ |
| | | ExamineItem item = itemMap.get(f.getId()); |
| | | if(item != null){ |
| | | f.setItemDetail(item.getItemDetail()); |
| | | f.setContent(item.getContent()); |
| | | f.setJudgeStandard(item.getJudgeStandard()); |
| | | } |
| | | }); |
| | | } |
| | | dto.setCurrentExamineDtoList(list); |
| | | |
| | | //获取合格分数 |
| | | ExamineTemplate examineTemplate = examineTemplateRepository.selectOne(new QueryWrapper<ExamineTemplate>().eq("id",examineMng.getExamineTemplateId())); |
| | | ExamineTemplate examineTemplate = examineTemplateBaseService.getOne(new QueryWrapper<ExamineTemplate>().eq("id",examineMng.getExamineTemplateId())); |
| | | if(examineTemplate != null){ |
| | | dto.setAcceptanceNumber(examineTemplate.getAcceptanceNumber()); |
| | | dto.setExamineTemplateName(examineTemplate.getTitle()); |
| | |
| | | |
| | | return dto; |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void delete(Long[] ids) { |
| | | if(ids == null){ |
| | | throw new TargetDutyException(ResultCodes.CLIENT_PARAM_ILLEGAL); |
| | | } |
| | | List<Long> idList = Arrays.asList(ids); |
| | | |
| | | List<ExamineMng> delList = new ArrayList<>(); |
| | | idList.forEach(f->{ |
| | | ExamineMng info = new ExamineMng(); |
| | | info.setDelFlag(1); |
| | | info.setId(f); |
| | | delList.add(info); |
| | | }); |
| | | examineMngBaseService.updateBatchById(delList); |
| | | } |
| | | } |
| | |
| | | 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.gkhy.safePlatform.commons.co.ContextCacheUser; |
| | | import com.gkhy.safePlatform.targetDuty.entity.ExamineItem; |
| | | import com.gkhy.safePlatform.targetDuty.entity.TargetDivideDetail; |
| | | import com.gkhy.safePlatform.targetDuty.entity.TargetMng; |
| | |
| | | import com.gkhy.safePlatform.targetDuty.service.CommonService; |
| | | import com.gkhy.safePlatform.targetDuty.service.ExamineItemService; |
| | | import com.gkhy.safePlatform.targetDuty.service.ExamineTemplateService; |
| | | import com.gkhy.safePlatform.targetDuty.service.baseService.ExamineItemBaseService; |
| | | import com.gkhy.safePlatform.targetDuty.service.baseService.ExamineTemplateBaseService; |
| | | import org.springframework.security.core.Authentication; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.gkhy.safePlatform.commons.enums.ResultCodes; |
| | |
| | | * @since 2022-07-21 10:58:10 |
| | | */ |
| | | @Service("examineTemplateService") |
| | | public class ExamineTemplateServiceImpl extends ServiceImpl<ExamineTemplateRepository, ExamineTemplate> implements ExamineTemplateService { |
| | | public class ExamineTemplateServiceImpl implements ExamineTemplateService { |
| | | |
| | | @Autowired |
| | | private ExamineTemplateRepository examineTemplateRepository; |
| | | private ExamineTemplateBaseService examineTemplateBaseService; |
| | | |
| | | @Autowired |
| | | private ExamineItemRepository examineItemRepository; |
| | | |
| | | @Autowired |
| | | private ExamineItemService examineItemService; |
| | | private ExamineItemBaseService examineItemBaseService; |
| | | |
| | | @Resource |
| | | private CommonService commonService; |
| | |
| | | Long pageSize = pageQuery.getPageSize(); |
| | | IPage<ExamineTemplate> page = new Page<>(pageIndex, pageSize); |
| | | |
| | | page = baseMapper.selectPage(page, |
| | | page = examineTemplateBaseService.selectPage(page, |
| | | QueryHelpPlus.getPredicate(ExamineTemplate.class, pageQuery.getSearchParams())); |
| | | List<ExamineTemplateDto> respList = BeanCopyUtils.copyBeanList(page.getRecords(), ExamineTemplateDto.class); |
| | | |
| | |
| | | |
| | | //获取考核项目明细 |
| | | respList.forEach(f->{ |
| | | List<ExamineItem> list = examineItemRepository.selectList(new QueryWrapper<ExamineItem>().eq("examine_template_id",f.getId())); |
| | | List<ExamineItem> list = examineItemBaseService.selectList(new QueryWrapper<ExamineItem>().eq("examine_template_id",f.getId())); |
| | | f.setExamineItemList(list); |
| | | }); |
| | | |
| | |
| | | |
| | | @Override |
| | | public List<ExamineTemplate> queryAll(ExamineTemplateQueryCriteria criteria) { |
| | | return baseMapper.selectList(QueryHelpPlus.getPredicate(ExamineTemplate.class, criteria)); |
| | | return examineTemplateBaseService.queryAll(criteria); |
| | | } |
| | | |
| | | @Override |
| | | public ExamineTemplateDto selectOne(Serializable id) { |
| | | ExamineTemplate template = this.getById(id); |
| | | ExamineTemplate template = examineTemplateBaseService.getById(id); |
| | | if(template == null){ |
| | | return null; |
| | | } |
| | | |
| | | ExamineTemplateDto dto = BeanCopyUtils.copyBean(template, ExamineTemplateDto.class); |
| | | |
| | | List<ExamineItem> list = examineItemRepository.selectList(new QueryWrapper<ExamineItem>().eq("examine_template_id",template.getId())); |
| | | List<ExamineItem> list = examineItemBaseService.selectList(new QueryWrapper<ExamineItem>().eq("examine_template_id",template.getId())); |
| | | dto.setExamineItemList(list); |
| | | return dto; |
| | | } |
| | | |
| | | @Override |
| | | public void addOrUpdate(ExamineTemplateSaveOrUpdate infoDto) { |
| | | public void addOrUpdate(ExamineTemplateSaveOrUpdate infoDto, Authentication authentication) { |
| | | if(!StringUtils.hasText(infoDto.getTitle())){ |
| | | throw new TargetDutyException("缺少title"); |
| | | } |
| | | // 获取当前用户 |
| | | ContextCacheUser currentUser = (ContextCacheUser) authentication.getPrincipal(); |
| | | |
| | | //设置设定人ID和设定人部门ID |
| | | infoDto.setSetPersonDepartmentId(currentUser.getDepId()); |
| | | infoDto.setSetPersonId(currentUser.getUid()); |
| | | |
| | | if(StringUtils.hasText(infoDto.getDelExamineItems())){ |
| | | List<Long> idList = Arrays.stream(infoDto.getDelExamineItems().split(",")).map(s-> Long.parseLong(s.trim())) |
| | | .collect(Collectors.toList()); |
| | |
| | | info.setId(f); |
| | | delList.add(info); |
| | | }); |
| | | examineItemService.updateBatchById(delList); |
| | | examineItemBaseService.updateBatchById(delList); |
| | | } |
| | | |
| | | ExamineTemplate examineTemplate = BeanCopyUtils.copyBean(infoDto, ExamineTemplate.class); |
| | | examineTemplate.setSetTimem(new Timestamp(new java.util.Date().getTime())); |
| | | if (infoDto.getId() == null) { |
| | | this.save(examineTemplate); |
| | | examineTemplateBaseService.save(examineTemplate); |
| | | } else { |
| | | this.update(examineTemplate,new UpdateWrapper<ExamineTemplate>().eq("id",examineTemplate.getId())); |
| | | examineTemplateBaseService.update(examineTemplate,new UpdateWrapper<ExamineTemplate>().eq("id",examineTemplate.getId())); |
| | | } |
| | | |
| | | List<ExamineItem> list = infoDto.getExamineItemList(); |
| | | list.forEach(f->{f.setExamineTemplateId(infoDto.getId());}); |
| | | examineItemService.saveOrUpdateBatch(list); |
| | | examineItemBaseService.saveOrUpdateBatch(list); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public void delete(Long[] ids) { |
| | | if(ids == null){ |
| | | throw new TargetDutyException(ResultCodes.CLIENT_PARAM_ILLEGAL); |
| | | } |
| | | List<Long> idList = Arrays.asList(ids); |
| | | |
| | | List<ExamineTemplate> delList = new ArrayList<>(); |
| | | idList.forEach(f->{ |
| | | ExamineTemplate info = new ExamineTemplate(); |
| | | info.setDelFlag(1); |
| | | info.setId(f); |
| | | delList.add(info); |
| | | }); |
| | | examineTemplateBaseService.updateBatchById(delList); |
| | | } |
| | | } |
| | |
| | | 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.gkhy.safePlatform.commons.utils.PageUtils; |
| | | import com.gkhy.safePlatform.targetDuty.entity.ExamineMng; |
| | | import com.gkhy.safePlatform.targetDuty.entity.ExamineTemplate; |
| | | import com.gkhy.safePlatform.targetDuty.entity.RewardPunishmentStandard; |
| | | import com.gkhy.safePlatform.targetDuty.excepiton.TargetDutyException; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.resp.ExamineMngDto; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.resp.RewardPunishmentDetailExcel; |
| | | import com.gkhy.safePlatform.targetDuty.repository.RewardPunishmentDetailRepository; |
| | | import com.gkhy.safePlatform.targetDuty.entity.RewardPunishmentDetail; |
| | | import com.gkhy.safePlatform.targetDuty.repository.RewardPunishmentStandardRepository; |
| | | import com.gkhy.safePlatform.targetDuty.service.RewardPunishmentDetailService; |
| | | import com.gkhy.safePlatform.targetDuty.service.baseService.RewardPunishmentDetailBaseService; |
| | | import com.gkhy.safePlatform.targetDuty.service.baseService.RewardPunishmentStandardBaseService; |
| | | import com.gkhy.safePlatform.targetDuty.utils.DateUtils; |
| | | import com.gkhy.safePlatform.targetDuty.utils.poihelper.ExcelUtil; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.gkhy.safePlatform.commons.enums.ResultCodes; |
| | |
| | | import com.gkhy.safePlatform.targetDuty.utils.QueryHelpPlus; |
| | | import com.gkhy.safePlatform.commons.utils.BeanCopyUtils; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | import java.net.URLEncoder; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * 奖惩记录(RewardPunishmentDetail)表服务实现类 |
| | |
| | | * @since 2022-07-21 10:15:45 |
| | | */ |
| | | @Service("rewardPunishmentDetailService") |
| | | public class RewardPunishmentDetailServiceImpl extends ServiceImpl<RewardPunishmentDetailRepository, RewardPunishmentDetail> implements RewardPunishmentDetailService { |
| | | public class RewardPunishmentDetailServiceImpl implements RewardPunishmentDetailService { |
| | | |
| | | @Autowired |
| | | private RewardPunishmentDetailRepository rewardPunishmentDetailRepository; |
| | | private RewardPunishmentDetailBaseService rewardPunishmentDetailBaseService; |
| | | |
| | | @Autowired |
| | | private RewardPunishmentStandardRepository rewardPunishmentStandardRepository; |
| | | |
| | | private RewardPunishmentStandardBaseService rewardPunishmentStandardBaseService; |
| | | |
| | | @Autowired |
| | | public HttpServletResponse response; |
| | | |
| | | @Override |
| | | public ResultVO queryAll(PageQuery<RewardPunishmentDetailQueryCriteria> pageQuery) { |
| | | PageUtils.checkCheck(pageQuery); |
| | | Long pageIndex = pageQuery.getPageIndex(); |
| | | Long pageSize = pageQuery.getPageSize(); |
| | | IPage<RewardPunishmentDetailDto> page = new Page<>(pageIndex, pageSize); |
| | | |
| | | page = baseMapper.queryAll(page, |
| | | page = rewardPunishmentDetailBaseService.queryAll(page, |
| | | pageQuery.getSearchParams().getPersonId()); |
| | | // List<RewardPunishmentDetailDto> respList = BeanCopyUtils.copyBeanList(page.getRecords(), RewardPunishmentDetailDto.class); |
| | | |
| | |
| | | |
| | | @Override |
| | | public List<RewardPunishmentDetail> queryAll(RewardPunishmentDetailQueryCriteria criteria) { |
| | | return baseMapper.selectList(QueryHelpPlus.getPredicate(RewardPunishmentDetail.class, criteria)); |
| | | return rewardPunishmentDetailBaseService.queryAll( criteria); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public List<RewardPunishmentDetail> queryAllRelation(RewardPunishmentDetailQueryCriteria criteria) { |
| | | return baseMapper.queryAll(criteria.getPersonId()); |
| | | return rewardPunishmentDetailBaseService.queryAll(criteria.getPersonId()); |
| | | } |
| | | |
| | | @Override |
| | | public RewardPunishmentDetailDto selectOne(Serializable id) { |
| | | RewardPunishmentDetail info = this.getById(id); |
| | | RewardPunishmentDetail info = rewardPunishmentDetailBaseService.getById(id); |
| | | if(info == null){ |
| | | return null; |
| | | } |
| | | |
| | | RewardPunishmentDetailDto dto = BeanCopyUtils.copyBean(info, RewardPunishmentDetailDto.class); |
| | | |
| | | RewardPunishmentStandard standard = rewardPunishmentStandardRepository.selectOne(new QueryWrapper<RewardPunishmentStandard>().eq("id",dto.getRewardPunishmentStandardId())); |
| | | RewardPunishmentStandard standard = rewardPunishmentStandardBaseService.getOne(new QueryWrapper<RewardPunishmentStandard>().eq("id",dto.getRewardPunishmentStandardId())); |
| | | dto.setRewardPunishmentStandardName(standard.getqName()); |
| | | return dto; |
| | | } |
| | | |
| | | @Override |
| | | public void delete(Long[] ids) { |
| | | if(ids == null){ |
| | | throw new TargetDutyException(ResultCodes.CLIENT_PARAM_ILLEGAL); |
| | | } |
| | | List<Long> idList = Arrays.asList(ids); |
| | | |
| | | List<RewardPunishmentDetail> delList = new ArrayList<>(); |
| | | idList.forEach(f->{ |
| | | RewardPunishmentDetail info = new RewardPunishmentDetail(); |
| | | info.setDelFlag(1); |
| | | info.setId(f); |
| | | delList.add(info); |
| | | }); |
| | | rewardPunishmentDetailBaseService.updateBatchById(delList); |
| | | } |
| | | |
| | | @Override |
| | | public void exportData(RewardPunishmentDetailQueryCriteria queryCriteria) throws IOException { |
| | | |
| | | Map<String,String> map = new LinkedHashMap<>(); |
| | | map.put("1","奖惩日期"); |
| | | map.put("2","奖惩类型"); |
| | | map.put("3","被奖惩者"); |
| | | map.put("4","奖惩内容"); |
| | | map.put("5","奖惩依据"); |
| | | |
| | | String key = DateUtils.date2String(new Date(), DateUtils.PATTERN_ALLTIME_NOSIGN) ; |
| | | String fileName = URLEncoder.encode("奖惩记录"+key+".xls", "UTF-8"); |
| | | response.setContentType("application/vnd.ms-excel"); |
| | | response.setHeader("Content-Disposition", "attachment;filename=" + fileName + ".xlsx"); |
| | | response.setHeader("Access-Control-Expose-Headers", "Content-Disposition"); |
| | | |
| | | |
| | | List<RewardPunishmentDetailExcel> respList = BeanCopyUtils.copyBeanList(this.queryAllRelation(queryCriteria), RewardPunishmentDetailExcel.class); |
| | | |
| | | ExcelUtil.exportExcel(map,respList , response.getOutputStream(),DateUtils.PATTERN_STANDARD); |
| | | response.getOutputStream().close(); |
| | | } |
| | | } |
| | |
| | | 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.gkhy.safePlatform.commons.utils.PageUtils; |
| | | import com.gkhy.safePlatform.targetDuty.excepiton.TargetDutyException; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.req.RewardPunishmentStandardImportExcel; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.resp.RewardPunishmentStandardExcel; |
| | | import com.gkhy.safePlatform.targetDuty.repository.RewardPunishmentStandardRepository; |
| | | import com.gkhy.safePlatform.targetDuty.entity.RewardPunishmentStandard; |
| | | import com.gkhy.safePlatform.targetDuty.service.RewardPunishmentStandardService; |
| | | import com.gkhy.safePlatform.targetDuty.service.baseService.RewardPunishmentStandardBaseService; |
| | | import com.gkhy.safePlatform.targetDuty.utils.DateUtils; |
| | | import com.gkhy.safePlatform.targetDuty.utils.poihelper.ExcelLogs; |
| | | import com.gkhy.safePlatform.targetDuty.utils.poihelper.ExcelUtil; |
| | | import org.apache.commons.collections.CollectionUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.gkhy.safePlatform.commons.enums.ResultCodes; |
| | |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.resp.RewardPunishmentStandardDto; |
| | | import com.gkhy.safePlatform.targetDuty.utils.QueryHelpPlus; |
| | | import com.gkhy.safePlatform.commons.utils.BeanCopyUtils; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.util.List; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.net.URLEncoder; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * (RewardPunishmentStandard)表服务实现类 |
| | |
| | | * @since 2022-07-21 10:20:10 |
| | | */ |
| | | @Service("rewardPunishmentStandardService") |
| | | public class RewardPunishmentStandardServiceImpl extends ServiceImpl<RewardPunishmentStandardRepository, RewardPunishmentStandard> implements RewardPunishmentStandardService { |
| | | public class RewardPunishmentStandardServiceImpl implements RewardPunishmentStandardService { |
| | | |
| | | @Autowired |
| | | private RewardPunishmentStandardRepository rewardPunishmentStandardRepository; |
| | | |
| | | private RewardPunishmentStandardBaseService rewardPunishmentStandardBaseService; |
| | | |
| | | @Autowired |
| | | public HttpServletResponse response; |
| | | |
| | | |
| | | @Override |
| | | public ResultVO queryAll(PageQuery<RewardPunishmentStandardQueryCriteria> pageQuery) { |
| | | PageUtils.checkCheck(pageQuery); |
| | | Long pageIndex = pageQuery.getPageIndex(); |
| | | Long pageSize = pageQuery.getPageSize(); |
| | | IPage<RewardPunishmentStandard> page = new Page<>(pageIndex, pageSize); |
| | | |
| | | page = baseMapper.selectPage(page, |
| | | page = rewardPunishmentStandardBaseService.selectPage(page, |
| | | QueryHelpPlus.getPredicate(RewardPunishmentStandard.class, pageQuery.getSearchParams())); |
| | | List<RewardPunishmentStandardDto> respList = BeanCopyUtils.copyBeanList(page.getRecords(), RewardPunishmentStandardDto.class); |
| | | |
| | |
| | | |
| | | @Override |
| | | public List<RewardPunishmentStandard> queryAll(RewardPunishmentStandardQueryCriteria criteria) { |
| | | return baseMapper.selectList(QueryHelpPlus.getPredicate(RewardPunishmentStandard.class, criteria)); |
| | | return rewardPunishmentStandardBaseService.queryAll(criteria); |
| | | } |
| | | |
| | | @Override |
| | | public void importData(MultipartFile file) throws IOException { |
| | | String contentType = file.getContentType(); |
| | | if(!"application/vnd.ms-excel".equals(contentType) |
| | | && !"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet".equals(contentType)) { |
| | | throw new TargetDutyException("上传的excel格式错误"); |
| | | } |
| | | |
| | | Collection<RewardPunishmentStandardImportExcel> importExcel = ExcelUtil.importExcel(RewardPunishmentStandardImportExcel.class, file.getInputStream(), "yyyy-MM-dd HH:mm:ss", new ExcelLogs() , 0); |
| | | |
| | | if (CollectionUtils.isEmpty(importExcel)) { |
| | | return ; |
| | | } |
| | | |
| | | List<RewardPunishmentStandard> respList = BeanCopyUtils.copyBeanList((List<RewardPunishmentStandardImportExcel>)importExcel, RewardPunishmentStandard.class); |
| | | |
| | | rewardPunishmentStandardBaseService.saveBatch(respList); |
| | | } |
| | | |
| | | @Override |
| | | public void delete(Long[] ids) { |
| | | if(ids == null){ |
| | | throw new TargetDutyException(ResultCodes.CLIENT_PARAM_ILLEGAL); |
| | | } |
| | | List<Long> idList = Arrays.asList(ids); |
| | | |
| | | List<RewardPunishmentStandard> delList = new ArrayList<>(); |
| | | idList.forEach(f->{ |
| | | RewardPunishmentStandard info = new RewardPunishmentStandard(); |
| | | info.setDelFlag(1); |
| | | info.setId(f); |
| | | delList.add(info); |
| | | }); |
| | | rewardPunishmentStandardBaseService.updateBatchById(delList); |
| | | } |
| | | |
| | | @Override |
| | | public void exportTemplate() throws IOException { |
| | | Map<String,String> map = new LinkedHashMap<>(); |
| | | map.put("1","奖惩名称"); |
| | | map.put("2","奖惩类型 1:奖励 2:惩罚"); |
| | | map.put("3","奖惩内容"); |
| | | map.put("4","依据"); |
| | | map.put("5","备注"); |
| | | |
| | | String fileName = URLEncoder.encode("奖惩标准设定数据导入模板.xls", "UTF-8"); |
| | | response.setContentType("application/vnd.ms-excel"); |
| | | response.setHeader("Content-Disposition", "attachment;filename=" + fileName + ".xlsx"); |
| | | response.setHeader("Access-Control-Expose-Headers", "Content-Disposition"); |
| | | |
| | | ExcelUtil.exportExcel(map,new ArrayList<>() , response.getOutputStream()); |
| | | response.getOutputStream().close(); |
| | | } |
| | | |
| | | @Override |
| | | public void exportData(RewardPunishmentStandardQueryCriteria queryCriteria) throws IOException { |
| | | Map<String,String> map = new LinkedHashMap<>(); |
| | | map.put("1","奖惩名称"); |
| | | map.put("2","奖惩类型"); |
| | | map.put("3","奖惩内容"); |
| | | map.put("4","依据"); |
| | | map.put("5","备注"); |
| | | |
| | | String key = DateUtils.date2String(new Date(), DateUtils.PATTERN_ALLTIME_NOSIGN) ; |
| | | String fileName = URLEncoder.encode("奖惩标准设定"+key+".xls", "UTF-8"); |
| | | response.setContentType("application/vnd.ms-excel"); |
| | | response.setHeader("Content-Disposition", "attachment;filename=" + fileName + ".xlsx"); |
| | | response.setHeader("Access-Control-Expose-Headers", "Content-Disposition"); |
| | | |
| | | |
| | | List<RewardPunishmentStandardExcel> respList = BeanCopyUtils.copyBeanList(this.queryAll(queryCriteria), RewardPunishmentStandardExcel.class); |
| | | |
| | | ExcelUtil.exportExcel(map,respList , response.getOutputStream(),DateUtils.PATTERN_STANDARD); |
| | | response.getOutputStream().close(); |
| | | } |
| | | } |
| | |
| | | import com.gkhy.safePlatform.targetDuty.entity.TargetDivideDetail; |
| | | import com.gkhy.safePlatform.targetDuty.repository.TargetMngRepository; |
| | | import com.gkhy.safePlatform.targetDuty.service.TargetDivideDetailService; |
| | | import com.gkhy.safePlatform.targetDuty.service.baseService.TargetDivideDetailBaseService; |
| | | import com.gkhy.safePlatform.targetDuty.service.baseService.TargetMngBaseService; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.gkhy.safePlatform.commons.enums.ResultCodes; |
| | |
| | | * @since 2022-07-20 13:32:39 |
| | | */ |
| | | @Service("targetDivideDetailService") |
| | | public class TargetDivideDetailServiceImpl extends ServiceImpl<TargetDivideDetailRepository, TargetDivideDetail> implements TargetDivideDetailService { |
| | | public class TargetDivideDetailServiceImpl implements TargetDivideDetailService { |
| | | |
| | | @Autowired |
| | | private TargetDivideDetailRepository targetDivideDetailRepository; |
| | | private TargetDivideDetailBaseService targetDivideDetailBaseService; |
| | | |
| | | @Autowired |
| | | private TargetMngRepository targetMngRepository; |
| | | private TargetMngBaseService targetMngBaseService; |
| | | |
| | | |
| | | |
| | |
| | | Long pageSize = pageQuery.getPageSize(); |
| | | IPage<TargetDivideDetail> page = new Page<>(pageIndex, pageSize); |
| | | |
| | | page = baseMapper.selectPage(page, |
| | | page = targetDivideDetailBaseService.selectPage(page, |
| | | QueryHelpPlus.getPredicate(TargetDivideDetail.class, pageQuery.getSearchParams())); |
| | | List<TargetDivideDetailDto> respList = BeanCopyUtils.copyBeanList(page.getRecords(), TargetDivideDetailDto.class); |
| | | |
| | |
| | | |
| | | @Override |
| | | public List<TargetDivideDetail> queryAll(TargetDivideDetailQueryCriteria criteria) { |
| | | return baseMapper.selectList(QueryHelpPlus.getPredicate(TargetDivideDetail.class, criteria)); |
| | | return targetDivideDetailBaseService.queryAll(criteria); |
| | | } |
| | | |
| | | @Override |
| | | public void addOrUpdate(TargetDivideDetailSaveOrUpdate infoDto) { |
| | | TargetMng targetMng = targetMngRepository.selectOne(new QueryWrapper<TargetMng>().eq("id",infoDto.getTargetId())); |
| | | if(infoDto.getTargetId() == null){ |
| | | throw new TargetDutyException("缺少targetId"); |
| | | } |
| | | TargetMng targetMng = targetMngBaseService.getOne(new QueryWrapper<TargetMng>().eq("id",infoDto.getTargetId())); |
| | | if(targetMng == null){ |
| | | throw new TargetDutyException(TargetDutyResultCodes.E1); |
| | | } |
| | |
| | | info.setId(f); |
| | | delList.add(info); |
| | | }); |
| | | this.updateBatchById(delList); |
| | | targetDivideDetailBaseService.updateBatchById(delList); |
| | | } |
| | | |
| | | //保存主数据 |
| | |
| | | |
| | | List<TargetDivideDetail> list = infoDto.getTargetDivideDetailList(); |
| | | list.forEach(f->{f.setTargetId(infoDto.getTargetId());}); |
| | | this.saveOrUpdateBatch(list); |
| | | targetDivideDetailBaseService.saveOrUpdateBatch(list); |
| | | |
| | | //查询最新的分解数量,如果>0,设置状态为 《已分解》,否则设置为未分解 |
| | | int divideStatus = 2; |
| | | if(infoDto.getTargetId() != null){ |
| | | long number = this.count(new QueryWrapper<TargetDivideDetail>().eq("target_id",infoDto.getTargetId())); |
| | | long number = targetDivideDetailBaseService.count(new QueryWrapper<TargetDivideDetail>().eq("target_id",infoDto.getTargetId())); |
| | | if(number > 0){ |
| | | divideStatus = 1; |
| | | } |
| | | } |
| | | targetMng.setDivideStatus(divideStatus); |
| | | targetMngRepository.update(targetMng,new UpdateWrapper<TargetMng>().eq("id",targetMng.getId())); |
| | | targetMngBaseService.update(targetMng,new UpdateWrapper<TargetMng>().eq("id",targetMng.getId())); |
| | | |
| | | |
| | | } |
| | |
| | | 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.gkhy.safePlatform.targetDuty.excepiton.TargetDutyException; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.resp.TargetDutySummaryExcel; |
| | | import com.gkhy.safePlatform.targetDuty.repository.TargetDutySummaryRepository; |
| | | import com.gkhy.safePlatform.targetDuty.entity.TargetDutySummary; |
| | | import com.gkhy.safePlatform.targetDuty.service.CommonService; |
| | | import com.gkhy.safePlatform.targetDuty.service.TargetDutySummaryService; |
| | | import com.gkhy.safePlatform.targetDuty.service.baseService.TargetDutySummaryBaseService; |
| | | import com.gkhy.safePlatform.targetDuty.utils.DateUtils; |
| | | import com.gkhy.safePlatform.targetDuty.utils.poihelper.ExcelUtil; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.gkhy.safePlatform.commons.enums.ResultCodes; |
| | |
| | | import com.gkhy.safePlatform.commons.utils.BeanCopyUtils; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.HashSet; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Set; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.net.URLEncoder; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * (TargetDutySummary)表服务实现类 |
| | |
| | | * @since 2022-07-21 15:35:14 |
| | | */ |
| | | @Service("targetDutySummaryService") |
| | | public class TargetDutySummaryServiceImpl extends ServiceImpl<TargetDutySummaryRepository, TargetDutySummary> implements TargetDutySummaryService { |
| | | public class TargetDutySummaryServiceImpl implements TargetDutySummaryService { |
| | | |
| | | @Autowired |
| | | private TargetDutySummaryRepository targetDutySummaryRepository; |
| | | private TargetDutySummaryBaseService targetDutySummaryBaseService; |
| | | |
| | | @Resource |
| | | private CommonService commonService; |
| | | |
| | | |
| | | @Autowired |
| | | public HttpServletResponse response; |
| | | |
| | | @Override |
| | | public ResultVO queryAll(PageQuery<TargetDutySummaryQueryCriteria> pageQuery) { |
| | |
| | | Long pageSize = pageQuery.getPageSize(); |
| | | IPage<TargetDutySummary> page = new Page<>(pageIndex, pageSize); |
| | | |
| | | page = baseMapper.selectPage(page, |
| | | page = targetDutySummaryBaseService.selectPage(page, |
| | | QueryHelpPlus.getPredicate(TargetDutySummary.class, pageQuery.getSearchParams())); |
| | | List<TargetDutySummaryDto> respList = BeanCopyUtils.copyBeanList(page.getRecords(), TargetDutySummaryDto.class); |
| | | |
| | |
| | | |
| | | @Override |
| | | public List<TargetDutySummary> queryAll(TargetDutySummaryQueryCriteria criteria) { |
| | | return baseMapper.selectList(QueryHelpPlus.getPredicate(TargetDutySummary.class, criteria)); |
| | | return targetDutySummaryBaseService.queryAll( criteria); |
| | | } |
| | | |
| | | @Override |
| | | public void delete(Long[] ids) { |
| | | if(ids == null){ |
| | | throw new TargetDutyException(ResultCodes.CLIENT_PARAM_ILLEGAL); |
| | | } |
| | | List<Long> idList = Arrays.asList(ids); |
| | | |
| | | List<TargetDutySummary> delList = new ArrayList<>(); |
| | | idList.forEach(f->{ |
| | | TargetDutySummary info = new TargetDutySummary(); |
| | | info.setDelFlag(1); |
| | | info.setId(f); |
| | | delList.add(info); |
| | | }); |
| | | targetDutySummaryBaseService.updateBatchById(delList); |
| | | } |
| | | |
| | | @Override |
| | | public void exportData(TargetDutySummaryQueryCriteria queryCriteria) throws IOException { |
| | | |
| | | Map<String,String> map = new LinkedHashMap<>(); |
| | | map.put("1","责任部门"); |
| | | map.put("2","安全目标指标"); |
| | | map.put("3","考核指标"); |
| | | map.put("4","1月"); |
| | | map.put("5","2月"); |
| | | map.put("6","3月"); |
| | | map.put("7","4月"); |
| | | map.put("8","5月"); |
| | | map.put("9","6月"); |
| | | map.put("10","7月"); |
| | | map.put("11","8月"); |
| | | map.put("12","9月"); |
| | | map.put("13","10月"); |
| | | map.put("14","11月"); |
| | | map.put("15","12月"); |
| | | map.put("16","考核结果"); |
| | | |
| | | String key = DateUtils.date2String(new Date(), DateUtils.PATTERN_ALLTIME_NOSIGN) ; |
| | | String fileName = URLEncoder.encode("目标汇总"+key+".xls", "UTF-8"); |
| | | response.setContentType("application/vnd.ms-excel"); |
| | | response.setHeader("Content-Disposition", "attachment;filename=" + fileName + ".xlsx"); |
| | | response.setHeader("Access-Control-Expose-Headers", "Content-Disposition"); |
| | | |
| | | |
| | | List<TargetDutySummaryExcel> respList = BeanCopyUtils.copyBeanList(this.queryAll(queryCriteria), TargetDutySummaryExcel.class); |
| | | |
| | | ExcelUtil.exportExcel(map,respList , response.getOutputStream(),DateUtils.PATTERN_STANDARD); |
| | | response.getOutputStream().close(); |
| | | } |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | 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.gkhy.safePlatform.commons.co.ContextCacheUser; |
| | | import com.gkhy.safePlatform.targetDuty.entity.ExamineItem; |
| | | import com.gkhy.safePlatform.targetDuty.entity.TargetDivideDetail; |
| | | import com.gkhy.safePlatform.targetDuty.enums.TargetDutyResultCodes; |
| | | import com.gkhy.safePlatform.targetDuty.excepiton.TargetDutyException; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.resp.ListCheckDataDto; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.resp.TargetApproveDivideDetailDto; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.resp.WorkApproveRelateDesc; |
| | | import com.gkhy.safePlatform.targetDuty.repository.TargetDivideDetailRepository; |
| | | import com.gkhy.safePlatform.targetDuty.repository.TargetDutyWorkApproveRepository; |
| | | import com.gkhy.safePlatform.targetDuty.entity.TargetDutyWorkApprove; |
| | | import com.gkhy.safePlatform.targetDuty.service.CommonService; |
| | | import com.gkhy.safePlatform.targetDuty.service.TargetDutyWorkApproveService; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.gkhy.safePlatform.commons.enums.ResultCodes; |
| | | import com.gkhy.safePlatform.commons.query.PageQuery; |
| | | import com.gkhy.safePlatform.commons.utils.BeanCopyUtils; |
| | | import com.gkhy.safePlatform.commons.utils.PageUtils; |
| | | import com.gkhy.safePlatform.commons.vo.ResultVO; |
| | | import com.gkhy.safePlatform.commons.vo.SearchResultVO; |
| | | import com.gkhy.safePlatform.targetDuty.entity.TargetDivideDetail; |
| | | import com.gkhy.safePlatform.targetDuty.entity.TargetDutyWorkApprove; |
| | | import com.gkhy.safePlatform.targetDuty.enums.TargetDutyResultCodes; |
| | | import com.gkhy.safePlatform.targetDuty.excepiton.TargetDutyException; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.req.TargetDutyWorkApproveQueryCriteria; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.resp.ListCheckDataDto; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.resp.TargetApproveDivideDetailDto; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.resp.TargetDutyWorkApproveDto; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.resp.WorkApproveRelateDesc; |
| | | import com.gkhy.safePlatform.targetDuty.service.CommonService; |
| | | import com.gkhy.safePlatform.targetDuty.service.TargetDutyWorkApproveService; |
| | | import com.gkhy.safePlatform.targetDuty.service.baseService.TargetDivideDetailBaseService; |
| | | import com.gkhy.safePlatform.targetDuty.service.baseService.TargetDutyWorkApproveBaseService; |
| | | import com.gkhy.safePlatform.targetDuty.utils.QueryHelpPlus; |
| | | import com.gkhy.safePlatform.commons.utils.BeanCopyUtils; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.StringUtils; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | * @since 2022-08-11 10:13:37 |
| | | */ |
| | | @Service("targetDutyWorkApproveService") |
| | | public class TargetDutyWorkApproveServiceImpl extends ServiceImpl<TargetDutyWorkApproveRepository, TargetDutyWorkApprove> implements TargetDutyWorkApproveService { |
| | | public class TargetDutyWorkApproveServiceImpl implements TargetDutyWorkApproveService { |
| | | |
| | | @Autowired |
| | | private TargetDutyWorkApproveRepository targetDutyWorkApproveRepository; |
| | | private TargetDutyWorkApproveBaseService targetDutyWorkApproveBaseService; |
| | | |
| | | @Resource |
| | | private CommonService commonService; |
| | | |
| | | @Autowired |
| | | private TargetDivideDetailRepository targetDivideDetailRepository; |
| | | private TargetDivideDetailBaseService targetDivideDetailBaseService; |
| | | |
| | | |
| | | @Override |
| | | public ResultVO queryAll(PageQuery<TargetDutyWorkApproveQueryCriteria> pageQuery) { |
| | | PageUtils.checkCheck(pageQuery); |
| | | Long pageIndex = pageQuery.getPageIndex(); |
| | | Long pageSize = pageQuery.getPageSize(); |
| | | IPage<TargetDutyWorkApprove> page = new Page<>(pageIndex, pageSize); |
| | | |
| | | QueryWrapper queryWrapper = QueryHelpPlus.getPredicate(TargetDutyWorkApprove.class, pageQuery.getSearchParams()); |
| | | queryWrapper.eq("del_flag","0"); |
| | | page = baseMapper.selectPage(page,queryWrapper); |
| | | page = targetDutyWorkApproveBaseService.selectPage(page,queryWrapper); |
| | | List<TargetDutyWorkApproveDto> respList = BeanCopyUtils.copyBeanList(page.getRecords(), TargetDutyWorkApproveDto.class); |
| | | |
| | | return new SearchResultVO<>( |
| | |
| | | |
| | | @Override |
| | | public List<TargetDutyWorkApprove> queryAll(TargetDutyWorkApproveQueryCriteria criteria) { |
| | | return baseMapper.selectList(QueryHelpPlus.getPredicate(TargetDutyWorkApprove.class, criteria)); |
| | | return targetDutyWorkApproveBaseService.queryAll( criteria); |
| | | } |
| | | |
| | | @Override |
| | |
| | | addInfo.setApproveResult(null); |
| | | addInfo.setApproveMemo(null); |
| | | addInfo.setSort(addInfo.getSort()+1); |
| | | targetDutyWorkApproveRepository.insert(addInfo); |
| | | targetDutyWorkApproveBaseService.save(addInfo); |
| | | } |
| | | |
| | | // 更新原审批记录 |
| | |
| | | updateInfo.setApproveResult(targetDutyWorkApprove.getApproveResult()); |
| | | updateInfo.setApproveMemo(targetDutyWorkApprove.getApproveMemo()); |
| | | updateInfo.setChildId(addInfo.getId()); |
| | | targetDutyWorkApproveRepository.updateById(updateInfo); |
| | | targetDutyWorkApproveBaseService.updateById(updateInfo); |
| | | } |
| | | |
| | | @Override |
| | |
| | | info.setSubmitPersonId(uid); |
| | | info.setSubmitPersonName(uName); |
| | | info.setSort(1); |
| | | targetDutyWorkApproveRepository.insert(info); |
| | | targetDutyWorkApproveBaseService.save(info); |
| | | } |
| | | |
| | | @Override |
| | |
| | | Long pageSize = pageQuery.getPageSize(); |
| | | IPage<ListCheckDataDto> page = new Page<>(pageIndex, pageSize); |
| | | |
| | | page = targetDutyWorkApproveRepository.listCheckData(page,pageQuery.getSearchParams().getRelateId()); |
| | | page = targetDutyWorkApproveBaseService.listCheckData(page,pageQuery.getSearchParams().getRelateId()); |
| | | |
| | | List<ListCheckDataDto> respList = page.getRecords(); |
| | | // --------------------------- 获取部门信息----------------------- |
| | |
| | | |
| | | @Override |
| | | public TargetDutyWorkApproveDto selectOne(Serializable id) { |
| | | TargetDutyWorkApprove targetDutyWorkApprove = this.getById(id); |
| | | TargetDutyWorkApprove targetDutyWorkApprove = targetDutyWorkApproveBaseService.getById(id); |
| | | if(targetDutyWorkApprove == null){ |
| | | return new TargetDutyWorkApproveDto(); |
| | | } |
| | |
| | | .collect(Collectors.toMap(WorkApproveRelateDesc::getId, Function.identity(),(k1, k2)->k1)); |
| | | |
| | | // |
| | | List<TargetDivideDetail> dList = targetDivideDetailRepository.selectBatchIds(relateDescMap.keySet()); |
| | | List<TargetDivideDetail> dList = targetDivideDetailBaseService.selectBatchIds(relateDescMap.keySet()); |
| | | List<TargetApproveDivideDetailDto> divideDetailList = BeanCopyUtils.copyBeanList(dList, TargetApproveDivideDetailDto.class); |
| | | |
| | | divideDetailList.forEach(f->{ |
| | |
| | | dto.setTargetDivideDetailList(divideDetailList); |
| | | return dto; |
| | | } |
| | | |
| | | @Override |
| | | public void delete(Long[] ids) { |
| | | if(ids == null){ |
| | | throw new TargetDutyException(ResultCodes.CLIENT_PARAM_ILLEGAL); |
| | | } |
| | | List<Long> idList = Arrays.asList(ids); |
| | | |
| | | List<TargetDutyWorkApprove> delList = new ArrayList<>(); |
| | | idList.forEach(f->{ |
| | | TargetDutyWorkApprove info = new TargetDutyWorkApprove(); |
| | | info.setDelFlag(1); |
| | | info.setId(f); |
| | | delList.add(info); |
| | | }); |
| | | targetDutyWorkApproveBaseService.updateBatchById(delList); |
| | | } |
| | | } |
| | |
| | | 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.gkhy.safePlatform.targetDuty.excepiton.TargetDutyException; |
| | | import com.gkhy.safePlatform.targetDuty.repository.TargetDutyfileInfoRepository; |
| | | import com.gkhy.safePlatform.targetDuty.entity.TargetDutyfileInfo; |
| | | import com.gkhy.safePlatform.targetDuty.service.TargetDutyfileInfoService; |
| | | import com.gkhy.safePlatform.targetDuty.service.baseService.TargetDutyfileInfoBaseService; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.gkhy.safePlatform.commons.enums.ResultCodes; |
| | |
| | | import com.gkhy.safePlatform.targetDuty.utils.QueryHelpPlus; |
| | | import com.gkhy.safePlatform.commons.utils.BeanCopyUtils; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | * @since 2022-07-21 10:07:54 |
| | | */ |
| | | @Service("targetDutyfileInfoService") |
| | | public class TargetDutyfileInfoServiceImpl extends ServiceImpl<TargetDutyfileInfoRepository, TargetDutyfileInfo> implements TargetDutyfileInfoService { |
| | | public class TargetDutyfileInfoServiceImpl implements TargetDutyfileInfoService { |
| | | |
| | | @Autowired |
| | | private TargetDutyfileInfoRepository targetDutyfileInfoRepository; |
| | | private TargetDutyfileInfoBaseService targetDutyfileInfoBaseService; |
| | | |
| | | |
| | | |
| | |
| | | Long pageSize = pageQuery.getPageSize(); |
| | | IPage<TargetDutyfileInfo> page = new Page<>(pageIndex, pageSize); |
| | | |
| | | page = baseMapper.selectPage(page, |
| | | page = targetDutyfileInfoBaseService.selectPage(page, |
| | | QueryHelpPlus.getPredicate(TargetDutyfileInfo.class, pageQuery.getSearchParams())); |
| | | List<TargetDutyfileInfoDto> respList = BeanCopyUtils.copyBeanList(page.getRecords(), TargetDutyfileInfoDto.class); |
| | | |
| | |
| | | |
| | | @Override |
| | | public List<TargetDutyfileInfo> queryAll(TargetDutyfileInfoQueryCriteria criteria) { |
| | | return baseMapper.selectList(QueryHelpPlus.getPredicate(TargetDutyfileInfo.class, criteria)); |
| | | return targetDutyfileInfoBaseService.queryAll(criteria); |
| | | } |
| | | |
| | | @Override |
| | | public void delete(Long[] ids) { |
| | | if(ids == null){ |
| | | throw new TargetDutyException(ResultCodes.CLIENT_PARAM_ILLEGAL); |
| | | } |
| | | List<Long> idList = Arrays.asList(ids); |
| | | |
| | | List<TargetDutyfileInfo> delList = new ArrayList<>(); |
| | | idList.forEach(f->{ |
| | | TargetDutyfileInfo info = new TargetDutyfileInfo(); |
| | | info.setDelFlag(1); |
| | | info.setId(f); |
| | | delList.add(info); |
| | | }); |
| | | targetDutyfileInfoBaseService.updateBatchById(delList); |
| | | } |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.gkhy.safePlatform.targetDuty.entity.TargetMng; |
| | | import com.gkhy.safePlatform.targetDuty.entity.TargetType; |
| | | import com.gkhy.safePlatform.targetDuty.excepiton.TargetDutyException; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.req.TargetDivideDetailQueryCriteria; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.req.TargetExamineSaveOrUpdate; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.resp.TargetDivideDetailDto; |
| | |
| | | import com.gkhy.safePlatform.targetDuty.service.CommonService; |
| | | import com.gkhy.safePlatform.targetDuty.service.TargetDivideDetailService; |
| | | import com.gkhy.safePlatform.targetDuty.service.TargetExamineService; |
| | | import com.gkhy.safePlatform.targetDuty.service.baseService.TargetExamineBaseService; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.gkhy.safePlatform.commons.enums.ResultCodes; |
| | |
| | | * @since 2022-07-22 09:30:01 |
| | | */ |
| | | @Service("targetExamineService") |
| | | public class TargetExamineServiceImpl extends ServiceImpl<TargetExamineRepository, TargetExamine> implements TargetExamineService { |
| | | public class TargetExamineServiceImpl implements TargetExamineService { |
| | | |
| | | @Autowired |
| | | private TargetExamineRepository targetExamineRepository; |
| | | |
| | | @Autowired |
| | | private TargetMngRepository targetMngRepository; |
| | | @Resource |
| | | private CommonService commonService; |
| | | |
| | | @Resource |
| | | private TargetDivideDetailService targetDivideDetailService; |
| | | |
| | | @Autowired |
| | | private TargetTypeRepository targetTypeRepository; |
| | | private TargetExamineBaseService targetExamineBaseService; |
| | | |
| | | |
| | | @Override |
| | | public List<TargetExamine> queryAll(TargetExamineQueryCriteria criteria) { |
| | | return baseMapper.selectList(QueryHelpPlus.getPredicate(TargetExamine.class, criteria)); |
| | | return targetExamineBaseService.queryAll(criteria); |
| | | } |
| | | |
| | | @Override |
| | | public void delete(Long[] ids) { |
| | | if(ids == null){ |
| | | throw new TargetDutyException(ResultCodes.CLIENT_PARAM_ILLEGAL); |
| | | } |
| | | List<Long> idList = Arrays.asList(ids); |
| | | |
| | | List<TargetExamine> delList = new ArrayList<>(); |
| | | idList.forEach(f->{ |
| | | TargetExamine info = new TargetExamine(); |
| | | info.setDelFlag(1); |
| | | info.setId(f); |
| | | delList.add(info); |
| | | }); |
| | | targetExamineBaseService.updateBatchById(delList); |
| | | } |
| | | |
| | | } |
| | |
| | | package com.gkhy.safePlatform.targetDuty.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | 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.gkhy.safePlatform.commons.enums.ResultCodes; |
| | | import com.gkhy.safePlatform.commons.query.PageQuery; |
| | | import com.gkhy.safePlatform.commons.utils.BeanCopyUtils; |
| | | import com.gkhy.safePlatform.commons.utils.PageUtils; |
| | | import com.gkhy.safePlatform.commons.vo.ResultVO; |
| | | import com.gkhy.safePlatform.commons.vo.SearchResultVO; |
| | | import com.gkhy.safePlatform.targetDuty.entity.*; |
| | | import com.gkhy.safePlatform.targetDuty.excepiton.TargetDutyException; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.req.TargetCheckAndSubmitQueryCriteria; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.req.TargetDivideDetailQueryCriteria; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.req.TargetMngImportExcel; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.req.TargetMngQueryCriteria; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.resp.TargetCheckAndSubmitDto; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.resp.TargetDivideDetailDto; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.resp.TargetMngDto; |
| | | import com.gkhy.safePlatform.targetDuty.repository.*; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.resp.TargetMngExcel; |
| | | import com.gkhy.safePlatform.targetDuty.service.CommonService; |
| | | import com.gkhy.safePlatform.targetDuty.service.TargetDivideDetailService; |
| | | import com.gkhy.safePlatform.targetDuty.service.TargetMngService; |
| | | import com.gkhy.safePlatform.targetDuty.service.baseService.*; |
| | | import com.gkhy.safePlatform.targetDuty.utils.DateUtils; |
| | | import com.gkhy.safePlatform.targetDuty.utils.QueryHelpPlus; |
| | | import com.gkhy.safePlatform.targetDuty.utils.poihelper.ExcelLogs; |
| | | import com.gkhy.safePlatform.targetDuty.utils.poihelper.ExcelUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.io.Serializable; |
| | | import java.net.URLEncoder; |
| | | import java.util.*; |
| | | import java.util.function.Function; |
| | | import java.util.stream.Collectors; |
| | |
| | | * @since 2022-07-20 11:49:22 |
| | | */ |
| | | @Service("targetMngService") |
| | | public class TargetMngServiceImpl extends ServiceImpl<TargetMngRepository, TargetMng> implements TargetMngService { |
| | | public class TargetMngServiceImpl implements TargetMngService { |
| | | |
| | | @Autowired |
| | | private TargetMngRepository targetMngRepository; |
| | | private TargetMngBaseService targetMngBaseService; |
| | | |
| | | @Resource |
| | | private TargetDivideDetailService targetDivideDetailService; |
| | | |
| | | @Autowired |
| | | private TargetDivideDetailRepository targetDivideDetailRepository; |
| | | private TargetDivideDetailBaseService targetDivideDetailBaseService; |
| | | |
| | | @Resource |
| | | private TargetDutyWorkApproveRepository targetDutyWorkApproveRepository; |
| | | private TargetDutyWorkApproveBaseService targetDutyWorkApproveBaseService; |
| | | |
| | | @Resource |
| | | private CommonService commonService; |
| | | |
| | | @Autowired |
| | | private TargetTypeRepository targetTypeRepository; |
| | | private TargetTypeBaseService targetTypeBaseService; |
| | | |
| | | @Autowired |
| | | private TargetExamineRepository targetExamineRepository; |
| | | private TargetExamineBaseService targetExamineBaseService; |
| | | |
| | | @Autowired |
| | | public HttpServletResponse response; |
| | | |
| | | |
| | | @Override |
| | | public ResultVO queryAll(PageQuery<TargetMngQueryCriteria> pageQuery) { |
| | | if(pageQuery.getSearchParams().getTargetType() == null){ |
| | | return new ResultVO<>(ResultCodes.CLIENT_PARAM_ILLEGAL,"缺少targetType"); |
| | | } |
| | | PageUtils.checkCheck(pageQuery); |
| | | Long pageIndex = pageQuery.getPageIndex(); |
| | | Long pageSize = pageQuery.getPageSize(); |
| | | IPage<TargetMng> page = new Page<>(pageIndex, pageSize); |
| | | |
| | | page = baseMapper.selectPage(page, |
| | | page = targetMngBaseService.selectPage(page, |
| | | QueryHelpPlus.getPredicate(TargetMng.class, pageQuery.getSearchParams())); |
| | | List<TargetMngDto> respList = BeanCopyUtils.copyBeanList(page.getRecords(), TargetMngDto.class); |
| | | respList.forEach(dto -> { |
| | | respList.forEach(dto->{ |
| | | // --------------------------- 获取部门信息----------------------- |
| | | dto.setMakerDepartmentName(commonService.getDepName(dto.getMakerDepartmentId())); |
| | | |
| | | //查询关联分解信息 |
| | | TargetDivideDetailQueryCriteria criteria = new TargetDivideDetailQueryCriteria(); |
| | | criteria.setTargetId(dto.getId()); |
| | | List<TargetDivideDetailDto> respList1 = BeanCopyUtils.copyBeanList(targetDivideDetailService.queryAll(criteria), TargetDivideDetailDto.class); |
| | | List<TargetDivideDetailDto> respList1 = BeanCopyUtils.copyBeanList(targetDivideDetailBaseService.queryAll(criteria), TargetDivideDetailDto.class); |
| | | |
| | | // --------------------------- 获取部门信息----------------------- |
| | | //收集所用到的部门ID |
| | | Set<Long> collectDepIdSet = new HashSet(); |
| | | respList1.forEach(f -> { |
| | | respList1.forEach(f->{ |
| | | collectDepIdSet.add(f.getDutyDepartmentId()); |
| | | collectDepIdSet.add(f.getMakerDepartmentId()); |
| | | }); |
| | | //获取部门名集合 |
| | | Map<Long, String> depNameMap = commonService.getDepName(collectDepIdSet); |
| | | |
| | | respList1.forEach(f -> { |
| | | respList1.forEach(f->{ |
| | | f.setDutyDepartmentName(depNameMap.get(f.getDutyDepartmentId())); |
| | | f.setMakerDepartmentName(depNameMap.get(f.getMakerDepartmentId())); |
| | | }); |
| | |
| | | // --------------------------- 获取目标分类名称----------------------- |
| | | //收集所用到的目标分类ID |
| | | Set<Long> collectTypeSet = new HashSet(); |
| | | respList1.forEach(f -> { |
| | | respList1.forEach(f->{ |
| | | collectTypeSet.add(f.getTargetTypeId()); |
| | | }); |
| | | //获取目标分类名集合 |
| | | if (!collectTypeSet.isEmpty()) { |
| | | List<TargetType> typeList = targetTypeRepository.selectBatchIds(collectTypeSet); // TODO |
| | | if(!collectTypeSet.isEmpty()){ |
| | | List<TargetType> typeList = targetTypeBaseService.selectBatchIds(collectTypeSet); |
| | | Map<Long, String> typeNameMap = typeList.stream() |
| | | .collect(Collectors.toMap(TargetType::getId, TargetType::getTypeName, (k1, k2) -> k1)); |
| | | .collect(Collectors.toMap(TargetType::getId, TargetType::getTypeName,(k1, k2)->k1)); |
| | | |
| | | respList1.forEach(f -> { |
| | | respList1.forEach(f->{ |
| | | f.setTargetTypeName(typeNameMap.get(f.getDutyDepartmentId())); |
| | | }); |
| | | } |
| | |
| | | return new SearchResultVO<>( |
| | | true, |
| | | pageIndex, |
| | | pageSize, page.getPages(), |
| | | pageSize,page.getPages(), |
| | | page.getTotal(), |
| | | respList, |
| | | ResultCodes.OK |
| | |
| | | |
| | | @Override |
| | | public List<TargetMng> queryAll(TargetMngQueryCriteria criteria) { |
| | | return baseMapper.selectList(QueryHelpPlus.getPredicate(TargetMng.class, criteria)); |
| | | return targetMngBaseService.queryAll( criteria); |
| | | } |
| | | |
| | | @Override |
| | | public Object selectOne(Serializable id) { |
| | | TargetMng targetMng = baseMapper.selectById(id); |
| | | if (targetMng == null) { |
| | | TargetMng targetMng = targetMngBaseService.getById(id); |
| | | if(targetMng == null){ |
| | | return null; |
| | | } |
| | | TargetMngDto targetMngDto = BeanCopyUtils.copyBean(targetMng, TargetMngDto.class); |
| | |
| | | //查询关联分解信息 |
| | | TargetDivideDetailQueryCriteria criteria = new TargetDivideDetailQueryCriteria(); |
| | | criteria.setTargetId(targetMng.getId()); |
| | | List<TargetDivideDetailDto> respList = BeanCopyUtils.copyBeanList(targetDivideDetailService.queryAll(criteria), TargetDivideDetailDto.class); |
| | | List<TargetDivideDetailDto> respList = BeanCopyUtils.copyBeanList(targetDivideDetailBaseService.queryAll(criteria), TargetDivideDetailDto.class); |
| | | |
| | | // --------------------------- 获取部门信息----------------------- |
| | | //收集所用到的部门ID |
| | | Set<Long> collectDepIdSet = new HashSet(); |
| | | respList.forEach(f -> { |
| | | respList.forEach(f->{ |
| | | collectDepIdSet.add(f.getDutyDepartmentId()); |
| | | collectDepIdSet.add(f.getMakerDepartmentId()); |
| | | }); |
| | | //获取部门名集合 |
| | | Map<Long, String> depNameMap = commonService.getDepName(collectDepIdSet); |
| | | |
| | | respList.forEach(f -> { |
| | | respList.forEach(f->{ |
| | | f.setDutyDepartmentName(depNameMap.get(f.getDutyDepartmentId())); |
| | | f.setMakerDepartmentName(depNameMap.get(f.getMakerDepartmentId())); |
| | | }); |
| | | |
| | | |
| | | |
| | | |
| | | // --------------------------- 获取考核结果----------------------- |
| | | //收集所用到的分解详情ID |
| | | Set<Long> collectExamResultSet = new HashSet(); |
| | | respList.forEach(f -> { |
| | | respList.forEach(f->{ |
| | | collectExamResultSet.add(f.getId()); |
| | | }); |
| | | //获取核结果集合 |
| | | if (!collectExamResultSet.isEmpty()) { |
| | | List<TargetExamine> typeList = targetExamineRepository.selectList(new QueryWrapper<TargetExamine>().in("target_divide_detail_id", collectExamResultSet)); |
| | | if(!collectExamResultSet.isEmpty()){ |
| | | List<TargetExamine> typeList = targetExamineBaseService.selectList(new QueryWrapper<TargetExamine>().in("target_divide_detail_id",collectExamResultSet)); |
| | | Map<Long, TargetExamine> examResultMap = typeList.stream() |
| | | .collect(Collectors.toMap(TargetExamine::getTargetDivideDetailId, Function.identity(), (k1, k2) -> k1)); |
| | | .collect(Collectors.toMap(TargetExamine::getTargetDivideDetailId, Function.identity(),(k1, k2)->k1)); |
| | | |
| | | respList.forEach(f -> { |
| | | respList.forEach(f->{ |
| | | TargetExamine targetExamine = examResultMap.get(f.getId()); |
| | | if (targetExamine != null) { |
| | | if(targetExamine != null){ |
| | | f.setExamineResult(targetExamine.getExamineResult()); |
| | | f.setExamineDate(targetExamine.getExamineDate()); |
| | | f.setExaminePersonId(targetExamine.getExaminePersonId()); |
| | |
| | | public ResultVO queryAll(Long uid, PageQuery<TargetCheckAndSubmitQueryCriteria> pageQuery) { |
| | | Long pageIndex = pageQuery.getPageIndex(); |
| | | Long pageSize = pageQuery.getPageSize(); |
| | | Page<TargetMng> page = new Page<>(pageIndex, pageSize); |
| | | IPage<TargetMng> page = new Page<>(pageIndex, pageSize); |
| | | |
| | | page = baseMapper.selectPage(page, |
| | | page = targetMngBaseService.selectPage(page, |
| | | QueryHelpPlus.getPredicate(TargetMng.class, pageQuery.getSearchParams())); |
| | | List<TargetCheckAndSubmitDto> respList = BeanCopyUtils.copyBeanList(page.getRecords(), TargetCheckAndSubmitDto.class); |
| | | |
| | | // 判断审批人 |
| | | respList.forEach(dto -> { |
| | | List<TargetDutyWorkApprove> list = targetDutyWorkApproveRepository.selectList( |
| | | new QueryWrapper<TargetDutyWorkApprove>().eq("del_flag", 0) |
| | | .eq("relate_type", pageQuery.getSearchParams().getRelateType()) |
| | | .eq("relate_id", dto.getId()) |
| | | respList.forEach(dto->{ |
| | | List<TargetDutyWorkApprove> list = targetDutyWorkApproveBaseService.selectList( |
| | | new QueryWrapper<TargetDutyWorkApprove>().eq("del_flag",0) |
| | | .eq("relate_type",pageQuery.getSearchParams().getRelateType()) |
| | | .eq("relate_id",dto.getId()) |
| | | .orderByDesc("sort")); |
| | | |
| | | if (!CollectionUtils.isEmpty(list)) { |
| | |
| | | dto.setApproveStatus(list.get(0).getApproveStatus()); |
| | | dto.setApprovePersonId(list.get(0).getApprovePersonId()); |
| | | // 审批中 判断审批人是否人与当前登录人 |
| | | if (dto.getApproveStatus() != null && dto.getApproveStatus() == 2) { |
| | | if (dto.getApproveStatus()!=null && dto.getApproveStatus()==2){ |
| | | dto.setCheckApprove(dto.getApprovePersonId().equals(uid)); |
| | | } |
| | | } |
| | |
| | | return new SearchResultVO<>( |
| | | true, |
| | | pageIndex, |
| | | pageSize, page.getPages(), |
| | | pageSize,page.getPages(), |
| | | page.getTotal(), |
| | | respList, |
| | | ResultCodes.OK |
| | |
| | | // 查询总数 |
| | | Integer total = 0; |
| | | // 完成数量 |
| | | Integer complete = 0; |
| | | Integer complete=0; |
| | | |
| | | // 查询目标已分解且事件类型对一个的目标 |
| | | List<TargetMng> targetMngList = targetMngRepository.selectList( |
| | | List<TargetMng> targetMngList = targetMngBaseService.selectList( |
| | | new QueryWrapper<TargetMng>() |
| | | .eq("del_flag", 0) |
| | | .eq("target_type", criteria.getTargetType()) |
| | | .eq("divide_status", 1) |
| | | .eq("target_type",criteria.getTargetType()) |
| | | .eq("divide_status",1) |
| | | ); |
| | | if (!targetMngList.isEmpty()) { |
| | | if (!targetMngList.isEmpty()){ |
| | | total = targetMngList.size(); |
| | | // 查询目标下的所有分解项 |
| | | for (TargetMng targetMng : targetMngList) { |
| | | for (TargetMng targetMng : targetMngList){ |
| | | Boolean completeFlag = true; |
| | | List<TargetDivideDetail> targetDivideDetailList = targetDivideDetailRepository.selectList( |
| | | List<TargetDivideDetail> targetDivideDetailList = targetDivideDetailBaseService.selectList( |
| | | new QueryWrapper<TargetDivideDetail>() |
| | | .eq("del_flag", 0) |
| | | .eq("target_id", targetMng.getId()) |
| | | .eq("target_id",targetMng.getId()) |
| | | ); |
| | | if (!targetDivideDetailList.isEmpty()) { |
| | | if (!targetDivideDetailList.isEmpty()){ |
| | | // 查询分解项 是否已经审核通过 |
| | | for (TargetDivideDetail targetDivideDetail : targetDivideDetailList) { |
| | | List<TargetExamine> targetExamineList = targetExamineRepository.selectList( |
| | | for (TargetDivideDetail targetDivideDetail :targetDivideDetailList){ |
| | | List<TargetExamine> targetExamineList = targetExamineBaseService.selectList( |
| | | new QueryWrapper<TargetExamine>() |
| | | .eq("del_flag", 0) |
| | | .eq("target_divide_detail_id", targetDivideDetail.getId()) |
| | | .eq("examine_result", 1) |
| | | .eq("target_divide_detail_id",targetDivideDetail.getId()) |
| | | .eq("examine_result",1) |
| | | ); |
| | | if (targetExamineList.isEmpty()) { |
| | | completeFlag = false; |
| | | if (targetExamineList.isEmpty()){ |
| | | completeFlag=false; |
| | | } |
| | | } |
| | | } |
| | | // 该目标中有未评价的或者不合格的 |
| | | if (completeFlag) { |
| | | if (completeFlag){ |
| | | complete++; |
| | | } |
| | | } |
| | | } |
| | | //未完成数 |
| | | int noComplete = total - complete; |
| | | map.put("total", total + ""); |
| | | map.put("noComplete", noComplete + ""); |
| | | map.put("complete", complete + ""); |
| | | int noComplete = total-complete; |
| | | map.put("total",total+""); |
| | | map.put("noComplete",noComplete+""); |
| | | map.put("complete",complete+""); |
| | | return map; |
| | | } |
| | | |
| | | @Override |
| | | public void delete(Long[] ids) { |
| | | if(ids == null){ |
| | | throw new TargetDutyException(ResultCodes.CLIENT_PARAM_ILLEGAL); |
| | | } |
| | | List<Long> idList = Arrays.asList(ids); |
| | | |
| | | //删除关联表数据 |
| | | UpdateWrapper<TargetDivideDetail> updateWrapper = new UpdateWrapper<>(); |
| | | updateWrapper.in("target_id",idList); |
| | | TargetDivideDetail detail = new TargetDivideDetail(); |
| | | detail.setDelFlag(1); |
| | | this.targetDivideDetailBaseService.update(detail,updateWrapper); |
| | | |
| | | List<TargetMng> delList = new ArrayList<>(); |
| | | idList.forEach(f->{ |
| | | TargetMng info = new TargetMng(); |
| | | info.setDelFlag(1); |
| | | info.setId(f); |
| | | delList.add(info); |
| | | }); |
| | | targetMngBaseService.updateBatchById(delList); |
| | | } |
| | | |
| | | @Override |
| | | public void importData(MultipartFile file) throws IOException { |
| | | String contentType = file.getContentType(); |
| | | if(!"application/vnd.ms-excel".equals(contentType) |
| | | && !"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet".equals(contentType)) { |
| | | throw new TargetDutyException("上传的excel格式错误"); |
| | | } |
| | | |
| | | Collection<TargetMngImportExcel> importExcel = ExcelUtil.importExcel(TargetMngImportExcel.class, file.getInputStream(), "yyyy-MM-dd HH:mm:ss", new ExcelLogs() , 0); |
| | | |
| | | if (CollectionUtils.isEmpty(importExcel)) { |
| | | return; |
| | | } |
| | | |
| | | List<TargetMng> respList = BeanCopyUtils.copyBeanList((List<TargetMngImportExcel>)importExcel, TargetMng.class); |
| | | |
| | | targetMngBaseService.saveBatch(respList); |
| | | } |
| | | |
| | | @Override |
| | | public void exportTemplate() throws IOException { |
| | | Map<String,String> map = new LinkedHashMap<>(); |
| | | map.put("1","安全目标指标"); |
| | | map.put("2","目标指标编号"); |
| | | map.put("3","指标类型 1:年指标 2:月指标 3:半年 4:季度"); |
| | | map.put("4","年度"); |
| | | map.put("5","指标值"); |
| | | map.put("6","指标级别 1:公司级 2:部门分厂级 3:工段班组级"); |
| | | map.put("7","完成期限(yyyy-MM-dd HH:mm:ss)"); |
| | | map.put("8","备注信息"); |
| | | |
| | | String fileName = URLEncoder.encode("目标设置数据导入模板.xls", "UTF-8"); |
| | | response.setContentType("application/vnd.ms-excel"); |
| | | response.setHeader("Content-Disposition", "attachment;filename=" + fileName + ".xlsx"); |
| | | response.setHeader("Access-Control-Expose-Headers", "Content-Disposition"); |
| | | |
| | | ExcelUtil.exportExcel(map,new ArrayList<>() , response.getOutputStream()); |
| | | response.getOutputStream().close(); |
| | | } |
| | | |
| | | @Override |
| | | public void exportData(TargetMngQueryCriteria queryCriteria) throws IOException { |
| | | Map<String,String> map = new LinkedHashMap<>(); |
| | | map.put("1","安全目标指标"); |
| | | map.put("2","目标指标编号"); |
| | | map.put("3","年度"); |
| | | map.put("4","指标值"); |
| | | map.put("5","指标级别"); |
| | | map.put("6","指标类型"); |
| | | map.put("7","完成期限"); |
| | | map.put("8","状态"); |
| | | map.put("9","备注信息"); |
| | | |
| | | String key = DateUtils.date2String(new Date(), DateUtils.PATTERN_ALLTIME_NOSIGN) ; |
| | | String fileName = URLEncoder.encode("目标设置"+key+".xls", "UTF-8"); |
| | | response.setContentType("application/vnd.ms-excel"); |
| | | response.setHeader("Content-Disposition", "attachment;filename=" + fileName + ".xlsx"); |
| | | response.setHeader("Access-Control-Expose-Headers", "Content-Disposition"); |
| | | |
| | | |
| | | List<TargetMngExcel> respList = BeanCopyUtils.copyBeanList(this.queryAll(queryCriteria), TargetMngExcel.class); |
| | | |
| | | ExcelUtil.exportExcel(map,respList , response.getOutputStream(),DateUtils.PATTERN_STANDARD); |
| | | response.getOutputStream().close(); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | 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.gkhy.safePlatform.commons.utils.PageUtils; |
| | | import com.gkhy.safePlatform.targetDuty.excepiton.TargetDutyException; |
| | | import com.gkhy.safePlatform.targetDuty.repository.TargetTypeRepository; |
| | | import com.gkhy.safePlatform.targetDuty.entity.TargetType; |
| | | import com.gkhy.safePlatform.targetDuty.service.TargetTypeService; |
| | | import com.gkhy.safePlatform.targetDuty.service.baseService.TargetTypeBaseService; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.gkhy.safePlatform.commons.enums.ResultCodes; |
| | |
| | | import com.gkhy.safePlatform.targetDuty.utils.QueryHelpPlus; |
| | | import com.gkhy.safePlatform.commons.utils.BeanCopyUtils; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | * @since 2022-08-17 10:20:01 |
| | | */ |
| | | @Service("targetTypeService") |
| | | public class TargetTypeServiceImpl extends ServiceImpl<TargetTypeRepository, TargetType> implements TargetTypeService { |
| | | public class TargetTypeServiceImpl implements TargetTypeService { |
| | | |
| | | @Autowired |
| | | private TargetTypeRepository targetTypeRepository; |
| | | private TargetTypeBaseService targetTypeBaseService; |
| | | |
| | | |
| | | |
| | | @Override |
| | | public ResultVO queryAll(PageQuery<TargetTypeQueryCriteria> pageQuery) { |
| | | PageUtils.checkCheck(pageQuery); |
| | | Long pageIndex = pageQuery.getPageIndex(); |
| | | Long pageSize = pageQuery.getPageSize(); |
| | | IPage<TargetType> page = new Page<>(pageIndex, pageSize); |
| | | |
| | | page = baseMapper.selectPage(page, |
| | | page = targetTypeBaseService.selectPage(page, |
| | | QueryHelpPlus.getPredicate(TargetType.class, pageQuery.getSearchParams())); |
| | | List<TargetTypeDto> respList = BeanCopyUtils.copyBeanList(page.getRecords(), TargetTypeDto.class); |
| | | |
| | |
| | | |
| | | @Override |
| | | public List<TargetType> queryAll(TargetTypeQueryCriteria criteria) { |
| | | return baseMapper.selectList(QueryHelpPlus.getPredicate(TargetType.class, criteria)); |
| | | return targetTypeBaseService.queryAll(criteria); |
| | | } |
| | | |
| | | @Override |
| | | public void delete(Long[] ids) { |
| | | if(ids == null){ |
| | | throw new TargetDutyException(ResultCodes.CLIENT_PARAM_ILLEGAL); |
| | | } |
| | | List<Long> idList = Arrays.asList(ids); |
| | | |
| | | List<TargetType> delList = new ArrayList<>(); |
| | | idList.forEach(f->{ |
| | | TargetType info = new TargetType(); |
| | | info.setDelFlag(1); |
| | | info.setId(f); |
| | | delList.add(info); |
| | | }); |
| | | targetTypeBaseService.updateBatchById(delList); |
| | | } |
| | | } |