工时统计+权限+异步处理method+检验样品结果判断
| | |
| | | |
| | | @ValueTableShow(7) |
| | | @ApiModelProperty(value = "å建人") |
| | | @TableField(exist = false,select = false) |
| | | private String createUserName; |
| | | |
| | | @ValueTableShow(9) |
| | | @ApiModelProperty(value = "æ´æ°äºº") |
| | | @TableField(exist = false,select = false) |
| | | private String updateUserName; |
| | | |
| | | @ValueTableShow(8) |
| | |
| | | import com.yuanchu.mom.common.GetLook; |
| | | import com.yuanchu.mom.common.PrintChina; |
| | | import com.yuanchu.mom.mapper.StandardMethodMapper; |
| | | import com.yuanchu.mom.mapper.StandardProductListMapper; |
| | | import com.yuanchu.mom.mapper.StructureItemParameterMapper; |
| | | import com.yuanchu.mom.pojo.StandardMethod; |
| | | import com.yuanchu.mom.pojo.StandardProductList; |
| | | import com.yuanchu.mom.pojo.StructureItemParameter; |
| | | import com.yuanchu.mom.service.StandardMethodService; |
| | | import com.yuanchu.mom.service.StandardProductListService; |
| | | import com.yuanchu.mom.service.StructureItemParameterService; |
| | | import com.yuanchu.mom.utils.QueryWrappers; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | |
| | | import java.io.IOException; |
| | | import java.util.*; |
| | | import java.util.concurrent.CompletableFuture; |
| | | |
| | | /** |
| | | * @author Administrator |
| | | * @description é对表ãstandard_method(æ åæ¹æ³)ãçæ°æ®åºæä½Serviceå®ç° |
| | | * @createDate 2024-03-03 19:21:41 |
| | | */ |
| | | * @author Administrator |
| | | * @description é对表ãstandard_method(æ åæ¹æ³)ãçæ°æ®åºæä½Serviceå®ç° |
| | | * @createDate 2024-03-03 19:21:41 |
| | | */ |
| | | @Service |
| | | @AllArgsConstructor |
| | | public class StandardMethodServiceImpl extends ServiceImpl<StandardMethodMapper, StandardMethod> |
| | | implements StandardMethodService{ |
| | | implements StandardMethodService { |
| | | |
| | | private GetLook getLook; |
| | | |
| | | private StandardMethodMapper standardMethodMapper; |
| | | |
| | | StandardProductListMapper standardProductListMapper; |
| | | StandardProductListService standardProductListService; |
| | | |
| | | StructureItemParameterMapper structureItemParameterMapper; |
| | | StructureItemParameterService structureItemParameterService; |
| | | |
| | | @Override |
| | | public Map<String, Object> selectStandardMethodList(Page page, StandardMethod standardMethod) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("head", PrintChina.printChina(StandardMethod.class)); |
| | | Map<String, Integer> map1 = getLook.selectPowerByMethodAndUserId("selectStandardMethodList"); |
| | | if(map1.get("look")==1) standardMethod.setCreateUser(map1.get("userId")); |
| | | if (map1.get("look") == 1) standardMethod.setCreateUser(map1.get("userId")); |
| | | map.put("body", standardMethodMapper.selectStandardMethodList(page, QueryWrappers.queryWrappers(standardMethod))); |
| | | return map; |
| | | } |
| | | |
| | | @Override |
| | | public List<StandardMethod> selectStandardMethods() { |
| | | return standardMethodMapper.selectList(Wrappers.<StandardMethod>lambdaQuery().select(StandardMethod::getId,StandardMethod::getCode,StandardMethod::getName).ne(StandardMethod::getId, 0)); |
| | | return standardMethodMapper.selectList(Wrappers.<StandardMethod>lambdaQuery().select(StandardMethod::getId, StandardMethod::getCode, StandardMethod::getName).ne(StandardMethod::getId, 0)); |
| | | } |
| | | |
| | | @Override |
| | |
| | | |
| | | @Override |
| | | public int upStandardMethod(StandardMethod standardMethod) { |
| | | StandardMethod oldStandardMethod = standardMethodMapper.selectById(standardMethod.getId()); |
| | | if (!oldStandardMethod.getCode().equals(standardMethod.getCode())) { |
| | | CompletableFuture.supplyAsync(() -> replaceMethod(oldStandardMethod.getCode(), standardMethod.getCode())); |
| | | } |
| | | int i = standardMethodMapper.updateById(standardMethod); |
| | | return i; |
| | | } |
| | | |
| | | //ç¼è¾methodåå
¨é¨æ¿æ¢ |
| | | public String replaceMethod(String oldCode, String code) { |
| | | //æ¥è¯¢StandardProductList䏿æMethod妿å
å«ä¹åçåæ¿æ¢ |
| | | List<StandardProductList> standardProductLists = standardProductListMapper.selectList(null); |
| | | for (StandardProductList standardProductList : standardProductLists) { |
| | | if (standardProductList.getMethod().contains(oldCode)) { |
| | | String[] split = standardProductList.getMethod().split(","); |
| | | String a = null; |
| | | for (int i = 0; i < split.length; i++) { |
| | | String methodName = split[i].substring(1, split[i].length() - 1); |
| | | if (i == 0) { |
| | | methodName = split[i].substring(2, split[i].length() - 1); |
| | | } else if (i == split.length - 1) { |
| | | methodName = split[i].substring(1, split[i].length() - 2); |
| | | } |
| | | if (methodName.equals(oldCode)) { |
| | | methodName = code; |
| | | } |
| | | a += "\"" + methodName + "\","; |
| | | } |
| | | String method = "[\"" + a.substring(0, a.length() - 1) + "\"]"; |
| | | standardProductList.setMethod(method); |
| | | } |
| | | } |
| | | standardProductListService.updateBatchById(standardProductLists); |
| | | //æ¥è¯¢StructureItemParameter䏿æMethod妿å
å«ä¹åçåæ¿æ¢ |
| | | List<StructureItemParameter> structureItemParameters = structureItemParameterMapper.selectList(null); |
| | | for (StructureItemParameter structureItemParameter : structureItemParameters) { |
| | | if (structureItemParameter.getMethod().contains(oldCode)) { |
| | | String[] split = structureItemParameter.getMethod().split(","); |
| | | String a = null; |
| | | for (int i = 0; i < split.length; i++) { |
| | | String methodName = split[i].substring(1, split[i].length() - 1); |
| | | if (i == 0) { |
| | | methodName = split[i].substring(2, split[i].length() - 1); |
| | | } else if (i == split.length - 1) { |
| | | methodName = split[i].substring(1, split[i].length() - 2); |
| | | } |
| | | if (methodName.equals(oldCode)) { |
| | | methodName = code; |
| | | } |
| | | a += "\"" + methodName + "\","; |
| | | } |
| | | String method = "[\"" + a.substring(0, a.length() - 1) + "\"]"; |
| | | structureItemParameter.setMethod(method); |
| | | } |
| | | } |
| | | structureItemParameterService.updateBatchById(structureItemParameters); |
| | | return "æ¿æ¢å®æ¯!"; |
| | | } |
| | | |
| | | @Transactional(rollbackFor = Exception.class) |
| | |
| | | standardMethod.setField(list.get(1).toString()); |
| | | // é æ ¼å¼ |
| | | List<List<Object>> structureTestObjectId = new ArrayList<>(); |
| | | if (ObjectUtils.isEmpty(list.get(3))){ |
| | | if (ObjectUtils.isEmpty(list.get(3))) { |
| | | structureTestObjectId.add(Arrays.asList(list.get(2))); |
| | | } else { |
| | | structureTestObjectId.add(Arrays.asList(list.get(2), list.get(3))); |
| | |
| | | |
| | | @Override |
| | | protected void addInterceptors(InterceptorRegistry registry) { |
| | | registry.addInterceptor(fiferConfig).addPathPatterns("/**"); |
| | | registry.addInterceptor(powerConfig).addPathPatterns("/**"); |
| | | // registry.addInterceptor(fiferConfig).addPathPatterns("/**"); |
| | | // registry.addInterceptor(powerConfig).addPathPatterns("/**"); |
| | | registry.addInterceptor(logConfig).addPathPatterns("/**"); |
| | | super.addInterceptors(registry); |
| | | } |
| | |
| | | SampleOrderDto sampleOrderDto = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), SampleOrderDto.class); |
| | | return Result.success(insOrderService.selectInsOrderParameter(page, sampleOrderDto)); |
| | | } |
| | | |
| | | @ValueClassify("æ£éªä¸å") |
| | | @ApiOperation(value = "æ¯å¦å
¨é¨æ¥è¯¢") |
| | | @PostMapping("/selectAllInsOrder") |
| | | public Result selectAllInsOrder(){ |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ValueClassify("æ£éªä¸å") |
| | | @ApiOperation(value = "æ£éªåé
") |
| | | @PostMapping("/upInsOrder") |
| | |
| | | |
| | | private String tree; |
| | | |
| | | @TableField(exist = false,select = false) |
| | | private Integer structureItemParameterId; |
| | | } |
| | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | |
| | | InsOrder insOrder = insOrderMapper.selectById(insSampleMapper.selectById(insProduct.getInsSampleId()).getInsOrderId()); |
| | | //æ ¡éªå¦æè¿ä¸ªäººè¿ä¸ªæ£æµé¡¹ç®å·²ç»æ·»å è¿äºåä¸éè¦åæ°å¢ |
| | | Long count = auxiliaryOutputWorkingHoursMapper.selectCount(Wrappers.<AuxiliaryOutputWorkingHours>lambdaQuery() |
| | | .eq(AuxiliaryOutputWorkingHours::getCheck, userMapper.selectById(userId).getName()) |
| | | .eq(AuxiliaryOutputWorkingHours::getCheck, userId) |
| | | .eq(AuxiliaryOutputWorkingHours::getInspectProject, insProduct.getInspectionItemSubclass() + insProduct.getInspectionItem()) |
| | | .eq(AuxiliaryOutputWorkingHours::getOrderNo, insOrder.getEntrustCode())); |
| | | if (count == 0) { |
| | |
| | | auxiliaryOutputWorkingHours.setAmount(1);//éå çæ°é |
| | | auxiliaryOutputWorkingHours.setOutputWorkTime(insProduct.getManHour());//产éå·¥æ¶ |
| | | auxiliaryOutputWorkingHours.setManHourGroup(insProduct.getManHourGroup());//å·¥æ¶åç» |
| | | auxiliaryOutputWorkingHours.setDateTime(LocalDateTime.now());//æ¥æ |
| | | DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); |
| | | DateTimeFormatter formatters = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); |
| | | auxiliaryOutputWorkingHours.setDateTime(LocalDateTime.now().format(formatter));//æ¥æ |
| | | LocalDateTime localDateTime = LocalDateTime.now(); |
| | | DateTime parse = DateUtil.parse(localDateTime.format(formatter)); |
| | | auxiliaryOutputWorkingHours.setWeekDay(getWeek(localDateTime.format(formatters)));//ææ |
| | | auxiliaryOutputWorkingHours.setWeek(DateUtil.weekOfYear(DateUtil.offsetDay(parse, 1)));//卿¬¡ |
| | | auxiliaryOutputWorkingHours.setCheck(userMapper.selectById(userId).getName());//æ£æµäºº |
| | | auxiliaryOutputWorkingHours.setWeek(String.valueOf(DateUtil.weekOfYear(DateUtil.offsetDay(parse, 1))));//卿¬¡ |
| | | auxiliaryOutputWorkingHours.setCheck(userId);//æ£æµäºº |
| | | auxiliaryOutputWorkingHoursMapper.insert(auxiliaryOutputWorkingHours); |
| | | } |
| | | |
| | |
| | | List<InsOrderState> insOrderStates = insOrderStateMapper.selectList(Wrappers.<InsOrderState>lambdaQuery().eq(InsOrderState::getInsOrderId, orderId)); |
| | | long count = insOrderStates.stream().filter(a -> a.getInsState() == 5).count(); |
| | | if (count == insOrderStates.size() && num == 5) { |
| | | /*æ ·åä¸ç项ç®åªè¦æä¸ä¸ªé¡¹ç®ä¸åæ ¼åæ£éªç»æä¸º0,å¦å为1*/ |
| | | List<InsSample> insSamples = insSampleMapper.selectList(Wrappers.<InsSample>lambdaQuery().eq(InsSample::getInsOrderId, orderId)); |
| | | for (InsSample insSample : insSamples) { |
| | | List<InsProduct> insProducts = insProductMapper.selectList(Wrappers.<InsProduct>lambdaQuery().eq(InsProduct::getInsSampleId, insSample.getId()).eq(InsProduct::getState, 1)); |
| | | List<Integer> results = insProducts.stream().map(InsProduct::getInsResult).filter(str -> str != null).collect(Collectors.toList()); |
| | | if (results.contains(0)) { |
| | | insSample.setInsResult(0); |
| | | } else { |
| | | insSample.setInsResult(1); |
| | | } |
| | | insSampleMapper.updateById(insSample); |
| | | } |
| | | InsOrder insOrder = insOrderMapper.selectById(orderId); |
| | | Map<String, String> user = insProductMapper.selectUserById(insOrder.getUserId()); |
| | | List<SampleProductDto> samples = insSampleMapper.selectSampleProductListByOrderId(orderId); |
| | |
| | | import cn.hutool.core.util.ObjectUtil; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | |
| | | private InsSampleUserMapper insSampleUserMapper; |
| | | |
| | | private InsOrderStateMapper insOrderStateMapper; |
| | | |
| | | |
| | | |
| | | |
| | | UserMapper userMapper; |
| | | |
| | | PowerMapper powerMapper; |
| | | |
| | | |
| | | //è·åæ£éªä¸åæ°æ® |
| | | @Override |
| | | public Map<String, Object> selectInsOrderParameter(IPage<InsOrder> page, SampleOrderDto sampleOrderDto) { |
| | | //夿å
¨é¨,个人,ç»ç»çæé |
| | | Map<String, Integer> map1 = getLook.selectPowerByMethodAndUserId("selectInsOrderParameter"); |
| | | User user = userMapper.selectById(map1.get("userId")); |
| | | Integer roleId = user.getRoleId(); |
| | | //夿æ¯å¦æ¯å
¨é¨æé |
| | | Power power = powerMapper.selectOne(Wrappers.<Power>lambdaQuery().eq(Power::getRoleId, roleId).eq(Power::getMenuMethod, "selectAllInsOrder")); |
| | | if (ObjectUtils.isEmpty(power)) { |
| | | if (map1.get("look") == 1) { |
| | | //个人 |
| | | sampleOrderDto.setCreateUser(map1.get("userId")); |
| | | }else { |
| | | //ç»ç» |
| | | sampleOrderDto.setCompany(user.getCompany()); |
| | | } |
| | | } |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("head", PrintChina.printChina(SampleOrderDto.class)); |
| | | Map<String, Integer> map1 = getLook.selectPowerByMethodAndUserId("selectInsOrderParameter"); |
| | | if (map1.get("look") == 1) sampleOrderDto.setCreateUser(map1.get("userId")); |
| | | map.put("body", insOrderMapper.selectInsOrderPage(page, QueryWrappers.queryWrappers(sampleOrderDto))); |
| | | return map; |
| | | } |
| | |
| | | insOrder.setSendTime(LocalDateTime.now()); |
| | | insOrderMapper.updateById(insOrder); |
| | | List<InsSample> insSamples = insSampleMapper.selectList(Wrappers.<InsSample>lambdaQuery().eq(InsSample::getInsOrderId, orderId).select(InsSample::getId)); |
| | | List<Integer> ids = insSamples.stream().map(a-> a.getId()).collect(Collectors.toList()); |
| | | List<Integer> ids = insSamples.stream().map(a -> a.getId()).collect(Collectors.toList()); |
| | | List<InsProduct> insProducts = insProductMapper.selectList(Wrappers.<InsProduct>lambdaQuery().in(InsProduct::getInsSampleId, ids).eq(InsProduct::getState, 1).select(InsProduct::getSonLaboratory).groupBy(InsProduct::getSonLaboratory)); |
| | | for (InsProduct insProduct : insProducts) { |
| | | InsOrderState insOrderState = new InsOrderState(); |
| | | insOrderState.setInsOrderId(orderId); |
| | | try { |
| | | insOrderState.setLaboratory(insProduct.getSonLaboratory()); |
| | | }catch (NullPointerException e){ |
| | | } catch (NullPointerException e) { |
| | | throw new ErrorException("该æ£éªåææªç»´æ¤å®éªå®¤çæ£éªé¡¹ç®"); |
| | | } |
| | | insOrderState.setInsState(0); |
| | | insOrderStateMapper.insert(insOrderState); |
| | | } |
| | | if(userId!=null){ |
| | | if (userId != null) { |
| | | InsSampleUser insSampleUser = new InsSampleUser(); |
| | | insSampleUser.setState(0); |
| | | insSampleUser.setUserId(userId); |
| | |
| | | list.forEach(a -> { |
| | | a.setId(null); |
| | | a.setInsOrderId(insOrder.getId()); |
| | | if(StrUtil.isEmpty(a.getSampleCode())){ |
| | | if (StrUtil.isEmpty(a.getSampleCode())) { |
| | | a.setSampleCode(giveCode.giveCode("", "ins_sample", "", "yyMMdd")); |
| | | } |
| | | insSampleMapper.insert(a); |
| | |
| | | product.setUpdateTime(null); |
| | | product.setUpdateUser(null); |
| | | product.setInsSampleId(a.getId()); |
| | | if(product.getInspectionItemSubclass() == null){ |
| | | if (product.getInspectionItemSubclass() == null) { |
| | | product.setInspectionItemSubclass(""); |
| | | } |
| | | insProductMapper.insert(product); |
| | |
| | | map.put("head", PrintChina.printChina(CostStatisticsDto.class)); |
| | | Map<String, Integer> map1 = getLook.selectPowerByMethodAndUserId("costStatistics"); |
| | | if (map1.get("look") == 1) costStatisticsDto.setCreateUser(map1.get("userId")); |
| | | map.put("body", insOrderMapper.selectCostStatistics(page, QueryWrappers.queryWrappers(costStatisticsDto).ge("create_time", split[0]).le("create_time", split[1]+" 23:59:59"))); |
| | | map.put("body", insOrderMapper.selectCostStatistics(page, QueryWrappers.queryWrappers(costStatisticsDto).ge("create_time", split[0]).le("create_time", split[1] + " 23:59:59"))); |
| | | return map; |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, Object> selectSampleDefects(Page page, String inspectionItems, String orderNumber) { |
| | | List<SampleDefectsFatherVo> sampleDefectsFatherVos = insOrderMapper.selectSampleDefects(page, inspectionItems, orderNumber); |
| | |
| | | |
| | | @Override |
| | | public int updateStatus(Integer id) { |
| | | return insOrderMapper.updateStatus(id); |
| | | return insOrderMapper.updateStatus(id); |
| | | } |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.controller; |
| | | |
| | | import com.alibaba.excel.EasyExcel; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.annotation.ValueClassify; |
| | | import com.yuanchu.mom.dto.AuxiliaryCorrectionHoursDto; |
| | | import com.yuanchu.mom.dto.AuxiliaryOutputWorkingHoursDto; |
| | | import com.yuanchu.mom.excel.AuxiliaryCorrectionHoursListener; |
| | | import com.yuanchu.mom.service.AuxiliaryCorrectionHoursService; |
| | | import com.yuanchu.mom.utils.JackSonUtil; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.IOException; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * å·¥æ¶ç»è®¡çä¿®æ£å·¥æ¶ å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-05-29 02:38:19 |
| | | */ |
| | | @Api(tags = "å·¥æ¶ç»è®¡-ä¿®æ£å·¥æ¶") |
| | | @AllArgsConstructor |
| | | @RestController |
| | | @RequestMapping("/auxiliaryCorrectionHours") |
| | | public class AuxiliaryCorrectionHoursController { |
| | | |
| | | @Resource |
| | | AuxiliaryCorrectionHoursService auxiliaryCorrectionHoursService; |
| | | |
| | | @ValueClassify("å·¥æ¶ç®¡ç") |
| | | @ApiOperation(value = "æ¥è¯¢ä¿®æ£å·¥æ¶") |
| | | @PostMapping("/selectAuxiliaryCorrectionHours") |
| | | public Result selectAuxiliaryCorrectionHours(@RequestBody Map<String, Object> data) throws Exception { |
| | | Page page = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("page")), Page.class); |
| | | AuxiliaryCorrectionHoursDto entity = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), AuxiliaryCorrectionHoursDto.class); |
| | | return Result.success(auxiliaryCorrectionHoursService.selectAuxiliaryCorrectionHours(page, entity)); |
| | | } |
| | | |
| | | /** |
| | | * excelä¸ä¼ |
| | | * |
| | | * @return |
| | | */ |
| | | @ValueClassify("å·¥æ¶ç®¡ç") |
| | | @ApiOperation(value = "导å
¥") |
| | | @PostMapping("/upload") |
| | | public Result upload(@RequestParam("file") MultipartFile file) { |
| | | try { |
| | | EasyExcel.read(file.getInputStream(), AuxiliaryCorrectionHoursDto.class, new AuxiliaryCorrectionHoursListener(auxiliaryCorrectionHoursService)).sheet().doRead(); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return Result.success(); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.annotation.ValueClassify; |
| | | import com.yuanchu.mom.dto.AuxiliaryCorrectionHoursDto; |
| | | import com.yuanchu.mom.dto.AuxiliaryOriginalHoursDto; |
| | | import com.yuanchu.mom.dto.AuxiliaryOriginalHoursLookDto; |
| | | import com.yuanchu.mom.service.AuxiliaryOriginalHoursService; |
| | | import com.yuanchu.mom.utils.JackSonUtil; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Map; |
| | | |
| | | @Api(tags = "å·¥æ¶ç»è®¡-åå§å·¥æ¶") |
| | | @AllArgsConstructor |
| | | @RestController |
| | | @RequestMapping("/auxiliaryOriginalHours") |
| | | public class AuxiliaryOriginalHoursController { |
| | | |
| | | @Resource |
| | | AuxiliaryOriginalHoursService auxiliaryOriginalHoursService; |
| | | |
| | | @ValueClassify("å·¥æ¶ç®¡ç") |
| | | @ApiOperation(value = "æ¥è¯¢åå§å·¥æ¶") |
| | | @PostMapping("/selectAuxiliaryOriginalHours") |
| | | public Result selectAuxiliaryOriginalHours(@RequestBody Map<String, Object> data) throws Exception { |
| | | Page page = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("page")), Page.class); |
| | | AuxiliaryOriginalHoursLookDto entity = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), AuxiliaryOriginalHoursLookDto.class); |
| | | return Result.success(auxiliaryOriginalHoursService.selectAuxiliaryOriginalHours(page, entity)); |
| | | } |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.annotation.ValueClassify; |
| | | import com.yuanchu.mom.dto.AuxiliaryOutputWorkingHoursDto; |
| | | import com.yuanchu.mom.pojo.AuxiliaryOutputWorkingHours; |
| | | import com.yuanchu.mom.pojo.AuxiliaryWorkingHoursDay; |
| | | import com.yuanchu.mom.service.AuxiliaryOutputWorkingHoursService; |
| | |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | |
| | | @PostMapping("/selectAuxiliaryOutputWorkingHours") |
| | | public Result selectAuxiliaryOutputWorkingHours(@RequestBody Map<String, Object> data) throws Exception { |
| | | Page page = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("page")), Page.class); |
| | | AuxiliaryOutputWorkingHours entity = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), AuxiliaryOutputWorkingHours.class); |
| | | AuxiliaryOutputWorkingHoursDto entity = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), AuxiliaryOutputWorkingHoursDto.class); |
| | | return Result.success(auxiliaryOutputWorkingHoursService.selectAuxiliaryOutputWorkingHours(page, entity)); |
| | | } |
| | | |
| | | @ValueClassify("å·¥æ¶ç®¡ç") |
| | | @ApiOperation(value = "ç»è®¡äº§éå·¥æ¶æ±æ»åè¾
å©å·¥æ¶æ±æ»") |
| | | @PostMapping("/collectWorkingHours") |
| | | public Result collectWorkingHours(){ |
| | | return Result.success(auxiliaryOutputWorkingHoursService.collectWorkingHours()); |
| | | } |
| | | |
| | | |
| | | @ValueClassify("å·¥æ¶ç®¡ç") |
| | | @ApiOperation(value = "导åº") |
| | | @PostMapping("/exportWorkingHours") |
| | | public void exportWorkingHours(HttpServletResponse response) throws IOException { |
| | | auxiliaryOutputWorkingHoursService.exportWorkingHours(response); |
| | | } |
| | | |
| | | @ValueClassify("å·¥æ¶ç®¡ç") |
| | | @ApiOperation(value = "ç»é¿æé") |
| | | @PostMapping("/leader") |
| | | public Result leader() { |
| | | return Result.success(); |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.annotation.ValueClassify; |
| | | import com.yuanchu.mom.dto.AuxiliaryWorkingHoursDayDto; |
| | | import com.yuanchu.mom.pojo.AuxiliaryWorkingHours; |
| | | import com.yuanchu.mom.pojo.AuxiliaryWorkingHoursDay; |
| | | import com.yuanchu.mom.service.AuxiliaryWorkingHoursDayService; |
| | |
| | | import com.yuanchu.mom.vo.Result; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import jdk.nashorn.internal.ir.annotations.Ignore; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | @PostMapping("/selectAuxiliaryWorkingHoursDay") |
| | | public Result selectAuxiliaryWorkingHoursDay(@RequestBody Map<String, Object> data) throws Exception { |
| | | Page page = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("page")), Page.class); |
| | | AuxiliaryWorkingHoursDay entity = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), AuxiliaryWorkingHoursDay.class); |
| | | AuxiliaryWorkingHoursDayDto entity = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), AuxiliaryWorkingHoursDayDto.class); |
| | | return Result.success(auxiliaryWorkingHoursDayService.selectAuxiliaryWorkingHoursDay(page, entity)); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | @ValueClassify("å·¥æ¶ç®¡ç") |
| | | @ApiOperation(value = "å®¡æ ¸/æ¹å") |
| | | @PostMapping("/checkOrApprove") |
| | | public Result checkOrApprove(Integer id, String state) { |
| | | @ApiOperation(value = "æ¹å") |
| | | @PostMapping("/approve") |
| | | public Result approve(Integer id, String state) { |
| | | return Result.success(auxiliaryWorkingHoursDayService.checkOrApprove(id,state)); |
| | | } |
| | | |
| | | @ValueClassify("å·¥æ¶ç®¡ç") |
| | | @ApiOperation(value = "å®¡æ ¸") |
| | | @PostMapping("/check") |
| | | public Result check(@RequestBody AuxiliaryWorkingHoursDay auxiliaryWorkingHoursDay ) { |
| | | return Result.success(auxiliaryWorkingHoursDayService.updateAuxiliaryWorkingHoursDay(auxiliaryWorkingHoursDay)); |
| | | } |
| | | |
| | | @ValueClassify("å·¥æ¶ç®¡ç") |
| | | @ApiOperation(value = "ç¼è¾") |
| | | @PostMapping("/updateAuxiliaryWorkingHoursDay") |
| | | public Result updateAuxiliaryWorkingHoursDay(@RequestBody AuxiliaryWorkingHoursDay auxiliaryWorkingHoursDay) { |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.dto; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.yuanchu.mom.annotation.ValueTableShow; |
| | | import com.yuanchu.mom.pojo.AuxiliaryCorrectionHours; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class AuxiliaryCorrectionHoursDto extends AuxiliaryCorrectionHours { |
| | | |
| | | @ApiModelProperty("å§å") |
| | | @ValueTableShow(2) |
| | | @ExcelProperty(value = "å§å") |
| | | private String name; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.dto; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.yuanchu.mom.annotation.ValueTableShow; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDateTime; |
| | | |
| | | @Data |
| | | //åå§å·¥æ¶ |
| | | public class AuxiliaryOriginalHoursDto { |
| | | @ApiModelProperty("å§å") |
| | | @ValueTableShow(2) |
| | | @ExcelProperty(value = "å§å") |
| | | private String name; |
| | | |
| | | @ApiModelProperty("ç±»å") |
| | | @ValueTableShow(3) |
| | | @ExcelProperty(value = "ç±»å") |
| | | private String type; |
| | | |
| | | @ApiModelProperty("1æ¥å·¥æ¶") |
| | | @ValueTableShow(4) |
| | | @ExcelProperty(value = "1æ¥") |
| | | private Double oneHours; |
| | | |
| | | @ApiModelProperty("2æ¥å·¥æ¶") |
| | | @ValueTableShow(5) |
| | | @ExcelProperty(value = "2æ¥") |
| | | private Double twoHours; |
| | | |
| | | @ApiModelProperty("3æ¥å·¥æ¶") |
| | | @ValueTableShow(6) |
| | | @ExcelProperty(value = "3æ¥") |
| | | private Double threeHours; |
| | | |
| | | @ApiModelProperty("4æ¥å·¥æ¶") |
| | | @ValueTableShow(7) |
| | | @ExcelProperty(value = "4æ¥") |
| | | private Double fourHours; |
| | | |
| | | @ApiModelProperty("5æ¥å·¥æ¶") |
| | | @ValueTableShow(8) |
| | | @ExcelProperty(value = "5æ¥") |
| | | private Double fiveHours; |
| | | |
| | | @ApiModelProperty("6æ¥å·¥æ¶") |
| | | @ValueTableShow(9) |
| | | @ExcelProperty(value = "6æ¥") |
| | | private Double sixHours; |
| | | |
| | | @ApiModelProperty("7æ¥å·¥æ¶") |
| | | @ValueTableShow(10) |
| | | @ExcelProperty(value = "7æ¥") |
| | | private Double sevenHours; |
| | | |
| | | @ApiModelProperty("8æ¥å·¥æ¶") |
| | | @ValueTableShow(11) |
| | | @ExcelProperty(value = "8æ¥") |
| | | private Double eightHours; |
| | | |
| | | @ApiModelProperty("9æ¥å·¥æ¶") |
| | | @ValueTableShow(12) |
| | | @ExcelProperty(value = "9æ¥") |
| | | private Double nineHours; |
| | | |
| | | @ApiModelProperty("10æ¥å·¥æ¶") |
| | | @ValueTableShow(13) |
| | | @ExcelProperty(value = "10æ¥") |
| | | private Double tenHours; |
| | | |
| | | @ApiModelProperty("11æ¥å·¥æ¶") |
| | | @ValueTableShow(14) |
| | | @ExcelProperty(value = "11æ¥") |
| | | private Double elevenHours; |
| | | |
| | | @ApiModelProperty("12æ¥å·¥æ¶") |
| | | @ValueTableShow(15) |
| | | @ExcelProperty(value = "12æ¥") |
| | | private Double twelveHours; |
| | | |
| | | @ApiModelProperty("13æ¥å·¥æ¶") |
| | | @ValueTableShow(16) |
| | | @ExcelProperty(value = "13æ¥") |
| | | private Double thirteenHours; |
| | | |
| | | @ApiModelProperty("14æ¥å·¥æ¶") |
| | | @ValueTableShow(17) |
| | | @ExcelProperty(value = "14æ¥") |
| | | private Double fourteenHours; |
| | | |
| | | @ApiModelProperty("15æ¥å·¥æ¶") |
| | | @ValueTableShow(18) |
| | | @ExcelProperty(value = "15æ¥") |
| | | private Double fifteenHours; |
| | | |
| | | @ApiModelProperty("16æ¥å·¥æ¶") |
| | | @ValueTableShow(19) |
| | | @ExcelProperty(value = "16æ¥") |
| | | private Double sixteenHours; |
| | | |
| | | @ApiModelProperty("17æ¥å·¥æ¶") |
| | | @ValueTableShow(20) |
| | | @ExcelProperty(value = "17æ¥") |
| | | private Double seventeenHours; |
| | | |
| | | @ApiModelProperty("18æ¥å·¥æ¶") |
| | | @ValueTableShow(21) |
| | | @ExcelProperty(value = "18æ¥") |
| | | private Double eighteenHours; |
| | | |
| | | @ApiModelProperty("19æ¥å·¥æ¶") |
| | | @ValueTableShow(22) |
| | | @ExcelProperty(value = "19æ¥") |
| | | private Double nineteenHours; |
| | | |
| | | @ApiModelProperty("20æ¥å·¥æ¶") |
| | | @ValueTableShow(23) |
| | | @ExcelProperty(value = "20æ¥") |
| | | private Double twentyHours; |
| | | |
| | | @ApiModelProperty("21æ¥å·¥æ¶") |
| | | @ValueTableShow(24) |
| | | @ExcelProperty(value = "21æ¥") |
| | | private Double twentyOneHours; |
| | | |
| | | @ApiModelProperty("22æ¥å·¥æ¶") |
| | | @ValueTableShow(25) |
| | | @ExcelProperty(value = "22æ¥") |
| | | private Double twentyTwoHours; |
| | | |
| | | @ApiModelProperty("23æ¥å·¥æ¶") |
| | | @ValueTableShow(26) |
| | | @ExcelProperty(value = "23æ¥") |
| | | private Double twentyThreeHours; |
| | | |
| | | @ApiModelProperty("24æ¥å·¥æ¶") |
| | | @ValueTableShow(27) |
| | | @ExcelProperty(value = "24æ¥") |
| | | private Double twentyFourHours; |
| | | |
| | | @ApiModelProperty("25æ¥å·¥æ¶") |
| | | @ValueTableShow(28) |
| | | @ExcelProperty(value = "25æ¥") |
| | | private Double twentyFiveHours; |
| | | |
| | | @ApiModelProperty("26æ¥å·¥æ¶") |
| | | @ValueTableShow(29) |
| | | @ExcelProperty(value = "26æ¥") |
| | | private Double twentySixHours; |
| | | |
| | | @ApiModelProperty("27æ¥å·¥æ¶") |
| | | @ValueTableShow(30) |
| | | @ExcelProperty(value = "27æ¥") |
| | | private Double twentySevenHours; |
| | | |
| | | @ApiModelProperty("28æ¥å·¥æ¶") |
| | | @ValueTableShow(31) |
| | | @ExcelProperty(value = "28æ¥") |
| | | private Double twentyEightHours; |
| | | |
| | | @ApiModelProperty("29æ¥å·¥æ¶") |
| | | @ValueTableShow(32) |
| | | @ExcelProperty(value = "29æ¥") |
| | | private Double twentyNineHours; |
| | | |
| | | @ApiModelProperty("30æ¥å·¥æ¶") |
| | | @ValueTableShow(33) |
| | | @ExcelProperty(value = "30æ¥") |
| | | private Double thirtyHours; |
| | | |
| | | @ApiModelProperty("31æ¥å·¥æ¶") |
| | | @ValueTableShow(34) |
| | | @ExcelProperty(value = "31æ¥") |
| | | private Double thirtyOneHours; |
| | | |
| | | @ApiModelProperty("æä»½") |
| | | @ValueTableShow(35) |
| | | @ExcelProperty(value = "æä»½") |
| | | private LocalDateTime month; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.dto; |
| | | |
| | | |
| | | import lombok.Data; |
| | | |
| | | import javax.validation.constraints.NotNull; |
| | | import java.time.LocalDateTime; |
| | | |
| | | @Data |
| | | //åå§å·¥æ¶ç»è®¡çæ¥è¯¢æ¡ä»¶ |
| | | public class AuxiliaryOriginalHoursLookDto { |
| | | |
| | | @NotNull |
| | | private LocalDateTime startTime;//æå |
| | | |
| | | @NotNull |
| | | private LocalDateTime endTime;//ææ« |
| | | |
| | | private Integer userId; |
| | | |
| | | private Integer departId; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.dto; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.yuanchu.mom.annotation.ValueTableShow; |
| | | import com.yuanchu.mom.pojo.AuxiliaryOutputWorkingHours; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class AuxiliaryOutputWorkingHoursDto extends AuxiliaryOutputWorkingHours { |
| | | |
| | | @ApiModelProperty("æ£æµäºº") |
| | | @ValueTableShow(13) |
| | | @ExcelProperty(value = "æ£æµäºº") |
| | | private String name; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.dto; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.yuanchu.mom.annotation.ValueTableShow; |
| | | import com.yuanchu.mom.pojo.AuxiliaryWorkingHoursDay; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class AuxiliaryWorkingHoursDayDto extends AuxiliaryWorkingHoursDay { |
| | | |
| | | @ApiModelProperty("å§å") |
| | | @ValueTableShow(2) |
| | | @ExcelProperty(value = "å§å") |
| | | private String name; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.excel; |
| | | |
| | | |
| | | import com.alibaba.excel.context.AnalysisContext; |
| | | import com.alibaba.excel.event.AnalysisEventListener; |
| | | import com.yuanchu.mom.dto.AuxiliaryCorrectionHoursDto; |
| | | import com.yuanchu.mom.service.AuxiliaryCorrectionHoursService; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | public class AuxiliaryCorrectionHoursListener extends AnalysisEventListener<AuxiliaryCorrectionHoursDto> { |
| | | |
| | | private static final int BATCH_COUNT = 1000; |
| | | List<AuxiliaryCorrectionHoursDto> list = new ArrayList<>(); |
| | | |
| | | private AuxiliaryCorrectionHoursService auxiliaryCorrectionHoursService; |
| | | |
| | | public AuxiliaryCorrectionHoursListener(AuxiliaryCorrectionHoursService auxiliaryCorrectionHoursService) { |
| | | this.auxiliaryCorrectionHoursService = auxiliaryCorrectionHoursService; |
| | | } |
| | | |
| | | @Override |
| | | public void invoke(AuxiliaryCorrectionHoursDto data, AnalysisContext analysisContext) { |
| | | list.add(data); |
| | | if (list.size() >= BATCH_COUNT) { |
| | | save(); |
| | | list.clear(); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void doAfterAllAnalysed(AnalysisContext analysisContext) { |
| | | save(); |
| | | } |
| | | |
| | | |
| | | private void save() { |
| | | auxiliaryCorrectionHoursService.importExcel(list); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.mapper; |
| | | |
| | | 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.yuanchu.mom.dto.AuxiliaryCorrectionHoursDto; |
| | | import com.yuanchu.mom.dto.AuxiliaryOutputWorkingHoursDto; |
| | | import com.yuanchu.mom.pojo.AuxiliaryCorrectionHours; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * å·¥æ¶ç»è®¡çä¿®æ£å·¥æ¶ Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-05-29 02:38:19 |
| | | */ |
| | | public interface AuxiliaryCorrectionHoursMapper extends BaseMapper<AuxiliaryCorrectionHours> { |
| | | |
| | | IPage<AuxiliaryCorrectionHoursDto> selectAuxiliaryCorrectionHours(Page page, @Param("ew") QueryWrapper<AuxiliaryCorrectionHoursDto> ew, @Param("ids") List<Integer> ids); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.mapper; |
| | | |
| | | 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.yuanchu.mom.dto.AuxiliaryOriginalHoursDto; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | public interface AuxiliaryOriginalHoursMapper { |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | 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.yuanchu.mom.dto.AuxiliaryOriginalHoursDto; |
| | | import com.yuanchu.mom.dto.AuxiliaryOutputWorkingHoursDto; |
| | | import com.yuanchu.mom.dto.AuxiliaryWorkingHoursDayDto; |
| | | import com.yuanchu.mom.pojo.AuxiliaryOutputWorkingHours; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface AuxiliaryOutputWorkingHoursMapper extends BaseMapper<AuxiliaryOutputWorkingHours> { |
| | | |
| | | IPage<AuxiliaryOutputWorkingHours> selectAuxiliaryOutputWorkingHours(Page page, QueryWrapper<AuxiliaryOutputWorkingHours> ew); |
| | | IPage<AuxiliaryOutputWorkingHoursDto> selectAuxiliaryOutputWorkingHours(Page page, @Param("ew") QueryWrapper<AuxiliaryOutputWorkingHoursDto> ew, @Param("ids") List<Integer> ids); |
| | | |
| | | //æ¥è¯¢ç»è®¡å·¥æ¶å¯¼åºæ°æ® |
| | | List<AuxiliaryOutputWorkingHoursDto> selectDataByUser(@Param("ids") List<Integer> ids); |
| | | |
| | | //æ¥è¯¢è¯¥æç产éå·¥æ¶ |
| | | List<Map<String, Object>> totalHours(@Param("startTime") LocalDateTime startTime, @Param("endTime") LocalDateTime endTime, @Param("userId") Integer userId, @Param("departId") Integer departId, @Param("ids") List<Integer> ids); |
| | | |
| | | |
| | | List<AuxiliaryOutputWorkingHours> selectListByIds(@Param("ids") List<Integer> ids); |
| | | } |
| | |
| | | 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.yuanchu.mom.dto.AuxiliaryWorkingHoursDayDto; |
| | | import com.yuanchu.mom.pojo.AuxiliaryWorkingHours; |
| | | import com.yuanchu.mom.pojo.AuxiliaryWorkingHoursDay; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface AuxiliaryWorkingHoursDayMapper extends BaseMapper<AuxiliaryWorkingHoursDay> { |
| | | |
| | | IPage<AuxiliaryWorkingHoursDay> selectAuxiliaryWorkingHoursDay(Page page, QueryWrapper<AuxiliaryWorkingHoursDay> ew); |
| | | IPage<AuxiliaryWorkingHoursDayDto> selectAuxiliaryWorkingHoursDay(Page page, @Param("ew") QueryWrapper<AuxiliaryWorkingHoursDayDto> ew, @Param("ids") List<Integer> ids); |
| | | |
| | | //æ¥è¯¢è¾
å©å·¥æ¶å¯¼åºä¿¡æ¯ |
| | | List<AuxiliaryWorkingHoursDayDto> selectDataByUser(@Param("ids") List<Integer> ids); |
| | | |
| | | List<AuxiliaryWorkingHoursDay> selectListByIds(@Param("ids") List<Integer> ids); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.pojo; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.baomidou.mybatisplus.annotation.FieldFill; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | import com.yuanchu.mom.annotation.ValueTableShow; |
| | | import com.yuanchu.mom.common.OrderBy; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | /** |
| | | * <p> |
| | | * å·¥æ¶ç»è®¡çä¿®æ£å·¥æ¶ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-05-29 02:38:19 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("auxiliary_correction_hours") |
| | | @ApiModel(value = "AuxiliaryCorrectionHours对象", description = "å·¥æ¶ç»è®¡çä¿®æ£å·¥æ¶") |
| | | public class AuxiliaryCorrectionHours extends OrderBy implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("å§åid") |
| | | private Integer nameUser; |
| | | |
| | | @ApiModelProperty("ç±»å") |
| | | @ValueTableShow(3) |
| | | @ExcelProperty(value = "ç±»å") |
| | | private String type; |
| | | |
| | | @ApiModelProperty("1æ¥å·¥æ¶") |
| | | @ValueTableShow(4) |
| | | @ExcelProperty(value = "1æ¥") |
| | | private Double oneHours; |
| | | |
| | | @ApiModelProperty("2æ¥å·¥æ¶") |
| | | @ValueTableShow(5) |
| | | @ExcelProperty(value = "2æ¥") |
| | | private Double twoHours; |
| | | |
| | | @ApiModelProperty("3æ¥å·¥æ¶") |
| | | @ValueTableShow(6) |
| | | @ExcelProperty(value = "3æ¥") |
| | | private Double threeHours; |
| | | |
| | | @ApiModelProperty("4æ¥å·¥æ¶") |
| | | @ValueTableShow(7) |
| | | @ExcelProperty(value = "4æ¥") |
| | | private Double fourHours; |
| | | |
| | | @ApiModelProperty("5æ¥å·¥æ¶") |
| | | @ValueTableShow(8) |
| | | @ExcelProperty(value = "5æ¥") |
| | | private Double fiveHours; |
| | | |
| | | @ApiModelProperty("6æ¥å·¥æ¶") |
| | | @ValueTableShow(9) |
| | | @ExcelProperty(value = "6æ¥") |
| | | private Double sixHours; |
| | | |
| | | @ApiModelProperty("7æ¥å·¥æ¶") |
| | | @ValueTableShow(10) |
| | | @ExcelProperty(value = "7æ¥") |
| | | private Double sevenHours; |
| | | |
| | | @ApiModelProperty("8æ¥å·¥æ¶") |
| | | @ValueTableShow(11) |
| | | @ExcelProperty(value = "8æ¥") |
| | | private Double eightHours; |
| | | |
| | | @ApiModelProperty("9æ¥å·¥æ¶") |
| | | @ValueTableShow(12) |
| | | @ExcelProperty(value = "9æ¥") |
| | | private Double nineHours; |
| | | |
| | | @ApiModelProperty("10æ¥å·¥æ¶") |
| | | @ValueTableShow(13) |
| | | @ExcelProperty(value = "10æ¥") |
| | | private Double tenHours; |
| | | |
| | | @ApiModelProperty("11æ¥å·¥æ¶") |
| | | @ValueTableShow(14) |
| | | @ExcelProperty(value = "11æ¥") |
| | | private Double elevenHours; |
| | | |
| | | @ApiModelProperty("12æ¥å·¥æ¶") |
| | | @ValueTableShow(15) |
| | | @ExcelProperty(value = "12æ¥") |
| | | private Double twelveHours; |
| | | |
| | | @ApiModelProperty("13æ¥å·¥æ¶") |
| | | @ValueTableShow(16) |
| | | @ExcelProperty(value = "13æ¥") |
| | | private Double thirteenHours; |
| | | |
| | | @ApiModelProperty("14æ¥å·¥æ¶") |
| | | @ValueTableShow(17) |
| | | @ExcelProperty(value = "14æ¥") |
| | | private Double fourteenHours; |
| | | |
| | | @ApiModelProperty("15æ¥å·¥æ¶") |
| | | @ValueTableShow(18) |
| | | @ExcelProperty(value = "15æ¥") |
| | | private Double fifteenHours; |
| | | |
| | | @ApiModelProperty("16æ¥å·¥æ¶") |
| | | @ValueTableShow(19) |
| | | @ExcelProperty(value = "16æ¥") |
| | | private Double sixteenHours; |
| | | |
| | | @ApiModelProperty("17æ¥å·¥æ¶") |
| | | @ValueTableShow(20) |
| | | @ExcelProperty(value = "17æ¥") |
| | | private Double seventeenHours; |
| | | |
| | | @ApiModelProperty("18æ¥å·¥æ¶") |
| | | @ValueTableShow(21) |
| | | @ExcelProperty(value = "18æ¥") |
| | | private Double eighteenHours; |
| | | |
| | | @ApiModelProperty("19æ¥å·¥æ¶") |
| | | @ValueTableShow(22) |
| | | @ExcelProperty(value = "19æ¥") |
| | | private Double nineteenHours; |
| | | |
| | | @ApiModelProperty("20æ¥å·¥æ¶") |
| | | @ValueTableShow(23) |
| | | @ExcelProperty(value = "20æ¥") |
| | | private Double twentyHours; |
| | | |
| | | @ApiModelProperty("21æ¥å·¥æ¶") |
| | | @ValueTableShow(24) |
| | | @ExcelProperty(value = "21æ¥") |
| | | private Double twentyOneHours; |
| | | |
| | | @ApiModelProperty("22æ¥å·¥æ¶") |
| | | @ValueTableShow(25) |
| | | @ExcelProperty(value = "22æ¥") |
| | | private Double twentyTwoHours; |
| | | |
| | | @ApiModelProperty("23æ¥å·¥æ¶") |
| | | @ValueTableShow(26) |
| | | @ExcelProperty(value = "23æ¥") |
| | | private Double twentyThreeHours; |
| | | |
| | | @ApiModelProperty("24æ¥å·¥æ¶") |
| | | @ValueTableShow(27) |
| | | @ExcelProperty(value = "24æ¥") |
| | | private Double twentyFourHours; |
| | | |
| | | @ApiModelProperty("25æ¥å·¥æ¶") |
| | | @ValueTableShow(28) |
| | | @ExcelProperty(value = "25æ¥") |
| | | private Double twentyFiveHours; |
| | | |
| | | @ApiModelProperty("26æ¥å·¥æ¶") |
| | | @ValueTableShow(29) |
| | | @ExcelProperty(value = "26æ¥") |
| | | private Double twentySixHours; |
| | | |
| | | @ApiModelProperty("27æ¥å·¥æ¶") |
| | | @ValueTableShow(30) |
| | | @ExcelProperty(value = "27æ¥") |
| | | private Double twentySevenHours; |
| | | |
| | | @ApiModelProperty("28æ¥å·¥æ¶") |
| | | @ValueTableShow(31) |
| | | @ExcelProperty(value = "28æ¥") |
| | | private Double twentyEightHours; |
| | | |
| | | @ApiModelProperty("29æ¥å·¥æ¶") |
| | | @ValueTableShow(32) |
| | | @ExcelProperty(value = "29æ¥") |
| | | private Double twentyNineHours; |
| | | |
| | | @ApiModelProperty("30æ¥å·¥æ¶") |
| | | @ValueTableShow(33) |
| | | @ExcelProperty(value = "30æ¥") |
| | | private Double thirtyHours; |
| | | |
| | | @ApiModelProperty("31æ¥å·¥æ¶") |
| | | @ValueTableShow(34) |
| | | @ExcelProperty(value = "31æ¥") |
| | | private Double thirtyOneHours; |
| | | |
| | | @ApiModelProperty("æä»½") |
| | | @ValueTableShow(35) |
| | | @ExcelProperty(value = "æä»½") |
| | | private LocalDateTime month; |
| | | |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | @ApiModelProperty("å建人id") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹äººid") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | } |
| | |
| | | package com.yuanchu.mom.pojo; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.baomidou.mybatisplus.annotation.FieldFill; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.yuanchu.mom.annotation.ValueTableShow; |
| | | import com.yuanchu.mom.common.OrderBy; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | |
| | | @Setter |
| | | @TableName("auxiliary_output_working_hours") |
| | | @ApiModel(value = "AuxiliaryOutputWorkingHours对象", description = "æ¥å·¥æ¶ç®¡çç产éå·¥æ¶") |
| | | public class AuxiliaryOutputWorkingHours implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | public class AuxiliaryOutputWorkingHours extends OrderBy implements Serializable { |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("æ£æµé¡¹ç®") |
| | | @ExcelProperty(value = "æ£æµé¡¹ç®") |
| | | @ValueTableShow(2) |
| | | private String inspectProject; |
| | | |
| | | @ApiModelProperty("å çå§æåå·") |
| | | @ExcelProperty(value = "å çå§æåå·") |
| | | @ValueTableShow(3) |
| | | private String overtimeOrderNo; |
| | | |
| | | @ApiModelProperty("å çå·¥æ¶") |
| | | @ExcelProperty(value = "å çå·¥æ¶") |
| | | @ValueTableShow(4) |
| | | private Double overtimeWorkTime; |
| | | |
| | | @ApiModelProperty("å çæ°é") |
| | | @ExcelProperty(value = "å çæ°é") |
| | | @ValueTableShow(5) |
| | | private Integer overtimeAmount; |
| | | |
| | | @ApiModelProperty("éå çå§æåå·") |
| | | @ExcelProperty(value = "éå çå§æåå·") |
| | | @ValueTableShow(6) |
| | | private String orderNo; |
| | | |
| | | @ApiModelProperty("éå çå·¥æ¶") |
| | | @ExcelProperty(value = "éå çå·¥æ¶") |
| | | @ValueTableShow(7) |
| | | private Double workTime; |
| | | |
| | | @ApiModelProperty("éå çæ°é") |
| | | @ExcelProperty(value = "éå çæ°é") |
| | | @ValueTableShow(8) |
| | | private Integer amount; |
| | | |
| | | @ApiModelProperty("产éå·¥æ¶") |
| | | @ExcelProperty(value = "产éå·¥æ¶") |
| | | @ValueTableShow(9) |
| | | private Double outputWorkTime; |
| | | |
| | | @ApiModelProperty("æ¥æ") |
| | | @ExcelProperty(value = "æ¥æ") |
| | | @ValueTableShow(10) |
| | | private LocalDateTime dateTime; |
| | | private String dateTime; |
| | | |
| | | @ApiModelProperty("卿¬¡") |
| | | @ExcelProperty(value = "卿¬¡") |
| | | @ValueTableShow(11) |
| | | private Integer week; |
| | | private String week; |
| | | |
| | | @ApiModelProperty("ææ") |
| | | @ExcelProperty(value = "ææ") |
| | | @ValueTableShow(12) |
| | | private String weekDay; |
| | | |
| | | @ApiModelProperty("æ£æµäºº") |
| | | @ValueTableShow(13) |
| | | private String check; |
| | | @ApiModelProperty("æ£æµäººid") |
| | | private Integer check; |
| | | |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime updateTime; |
| | | |
| | | @ApiModelProperty("å建人id") |
| | |
| | | package com.yuanchu.mom.pojo; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.baomidou.mybatisplus.annotation.FieldFill; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | |
| | | import java.time.LocalDateTime; |
| | | |
| | | import com.yuanchu.mom.annotation.ValueTableShow; |
| | | import com.yuanchu.mom.common.OrderBy; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-05-28 02:22:19 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @Data |
| | | @TableName("auxiliary_working_hours_day") |
| | | @ApiModel(value = "AuxiliaryWorkingHoursDay对象", description = "æ¥å·¥æ¶ç®¡ççè¾
å©å·¥æ¶") |
| | | public class AuxiliaryWorkingHoursDay implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | public class AuxiliaryWorkingHoursDay extends OrderBy implements Serializable { |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("å§å") |
| | | @ValueTableShow(2) |
| | | private String name; |
| | | @ApiModelProperty("å§åid") |
| | | private Integer nameUser; |
| | | |
| | | @ApiModelProperty("ç¼å·") |
| | | @ExcelProperty(value = "ç¼å·") |
| | | @ValueTableShow(3) |
| | | private String number; |
| | | |
| | | @ApiModelProperty("è¾
å©é¡¹ç®åç§°") |
| | | @ExcelProperty(value = "è¾
å©é¡¹ç®åç§°") |
| | | @ValueTableShow(4) |
| | | private String auxiliaryProject; |
| | | |
| | | @ApiModelProperty("æ ¸åå·¥æ¶") |
| | | @ExcelProperty(value = "æ ¸åå·¥æ¶") |
| | | @ValueTableShow(5) |
| | | private Double approvedWorkingHour; |
| | | |
| | | @ApiModelProperty("æ°é") |
| | | @ExcelProperty(value = "æ°é") |
| | | @ValueTableShow(6) |
| | | private Integer amount; |
| | | |
| | | @ApiModelProperty("è¾
å©å·¥æ¶") |
| | | @ExcelProperty(value = "è¾
å©å·¥æ¶") |
| | | @ValueTableShow(7) |
| | | private Double nonproductiveTime; |
| | | |
| | | @ApiModelProperty("è¾
å©è¯´æ") |
| | | @ExcelProperty(value = "è¾
å©è¯´æ") |
| | | @ValueTableShow(8) |
| | | private String remarks; |
| | | |
| | | @ApiModelProperty("夿 ¸äºº") |
| | | @ExcelProperty(value = "夿 ¸äºº") |
| | | @ValueTableShow(9) |
| | | private String reviewer; |
| | | |
| | | @ApiModelProperty("夿 ¸æ°é") |
| | | @ExcelProperty(value = "夿 ¸æ°é") |
| | | @ValueTableShow(10) |
| | | private Integer reviewerNumber; |
| | | |
| | | @ApiModelProperty("夿 ¸å·¥æ¶") |
| | | @ExcelProperty(value = "夿 ¸å·¥æ¶") |
| | | @ValueTableShow(11) |
| | | private Double reviewerNonproductiveTime; |
| | | |
| | | @ApiModelProperty("夿 ¸è¯´æ") |
| | | @ExcelProperty(value = "夿 ¸è¯´æ") |
| | | @ValueTableShow(12) |
| | | private String reviewerRemark; |
| | | |
| | | @ApiModelProperty("å¹´") |
| | | @ExcelProperty(value = "å¹´") |
| | | @ValueTableShow(13) |
| | | private String year; |
| | | |
| | | @ApiModelProperty("çæ¬¡") |
| | | @ExcelProperty(value = "çæ¬¡") |
| | | @ValueTableShow(14) |
| | | private String shift; |
| | | |
| | | @ApiModelProperty("卿¬¡") |
| | | @ExcelProperty(value = "卿¬¡") |
| | | @ValueTableShow(15) |
| | | private Integer week; |
| | | private String week; |
| | | |
| | | @ApiModelProperty("ææ") |
| | | @ExcelProperty(value = "ææ") |
| | | @ValueTableShow(16) |
| | | private String weekDay; |
| | | |
| | |
| | | private Integer updateUser; |
| | | |
| | | @ApiModelProperty("ç¶æ") |
| | | @ExcelProperty(value = "ç¶æ") |
| | | @ValueTableShow(18) |
| | | private String state; |
| | | |
| | | @ApiModelProperty("æ¥æ") |
| | | @TableLogic |
| | | @ExcelProperty(value = "æ¥æ") |
| | | @ValueTableShow(19) |
| | | private LocalDateTime dateTime; |
| | | private String dateTime; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.dto.AuxiliaryCorrectionHoursDto; |
| | | import com.yuanchu.mom.pojo.AuxiliaryCorrectionHours; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * å·¥æ¶ç»è®¡çä¿®æ£å·¥æ¶ æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-05-29 02:38:19 |
| | | */ |
| | | public interface AuxiliaryCorrectionHoursService extends IService<AuxiliaryCorrectionHours> { |
| | | |
| | | Map<String, Object> selectAuxiliaryCorrectionHours(Page page, AuxiliaryCorrectionHoursDto auxiliaryCorrectionHoursDto); |
| | | |
| | | /** |
| | | * 导å
¥ä¸ä¼ |
| | | * @param list |
| | | */ |
| | | void importExcel(List<AuxiliaryCorrectionHoursDto> list); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.dto.AuxiliaryOriginalHoursDto; |
| | | import com.yuanchu.mom.dto.AuxiliaryOriginalHoursLookDto; |
| | | |
| | | import java.util.Map; |
| | | |
| | | public interface AuxiliaryOriginalHoursService { |
| | | |
| | | Map<String, Object> selectAuxiliaryOriginalHours(Page page, AuxiliaryOriginalHoursLookDto auxiliaryOriginalHoursLookDto); |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.dto.AuxiliaryOutputWorkingHoursDto; |
| | | import com.yuanchu.mom.pojo.AuxiliaryOutputWorkingHours; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | |
| | | */ |
| | | public interface AuxiliaryOutputWorkingHoursService extends IService<AuxiliaryOutputWorkingHours> { |
| | | |
| | | Map<String, Object> selectAuxiliaryOutputWorkingHours(Page page, AuxiliaryOutputWorkingHours auxiliaryOutputWorkingHours); |
| | | Map<String, Object> selectAuxiliaryOutputWorkingHours(Page page, AuxiliaryOutputWorkingHoursDto auxiliaryOutputWorkingHoursDto); |
| | | |
| | | /** |
| | | * ç»è®¡äº§éå·¥æ¶æ±æ»åè¾
å©å·¥æ¶æ±æ» |
| | | * @return |
| | | */ |
| | | Map<String,Object> collectWorkingHours(); |
| | | |
| | | /** |
| | | * å¯¼åº |
| | | * @param response |
| | | * @throws IOException |
| | | */ |
| | | void exportWorkingHours(HttpServletResponse response)throws IOException; |
| | | } |
| | |
| | | package com.yuanchu.mom.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.dto.AuxiliaryWorkingHoursDayDto; |
| | | import com.yuanchu.mom.pojo.AuxiliaryWorkingHours; |
| | | import com.yuanchu.mom.pojo.AuxiliaryWorkingHoursDay; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | |
| | | */ |
| | | public interface AuxiliaryWorkingHoursDayService extends IService<AuxiliaryWorkingHoursDay> { |
| | | |
| | | Map<String, Object> selectAuxiliaryWorkingHoursDay(Page page, AuxiliaryWorkingHoursDay auxiliaryWorkingHoursDay); |
| | | Map<String, Object> selectAuxiliaryWorkingHoursDay(Page page, AuxiliaryWorkingHoursDayDto auxiliaryWorkingHoursDayDto); |
| | | |
| | | int insertAuxiliaryWorkingHoursDay(AuxiliaryWorkingHoursDay auxiliaryWorkingHoursDay); |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service.impl; |
| | | |
| | | import cn.hutool.core.collection.CollectionUtil; |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.common.GetLook; |
| | | import com.yuanchu.mom.common.PrintChina; |
| | | import com.yuanchu.mom.dto.AuxiliaryCorrectionHoursDto; |
| | | import com.yuanchu.mom.dto.AuxiliaryOutputWorkingHoursDto; |
| | | import com.yuanchu.mom.mapper.PowerMapper; |
| | | import com.yuanchu.mom.mapper.UserMapper; |
| | | import com.yuanchu.mom.pojo.AuxiliaryCorrectionHours; |
| | | import com.yuanchu.mom.mapper.AuxiliaryCorrectionHoursMapper; |
| | | import com.yuanchu.mom.pojo.Power; |
| | | import com.yuanchu.mom.pojo.User; |
| | | import com.yuanchu.mom.service.AuxiliaryCorrectionHoursService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.mom.utils.QueryWrappers; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * <p> |
| | | * å·¥æ¶ç»è®¡çä¿®æ£å·¥æ¶ æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-05-29 02:38:19 |
| | | */ |
| | | @Service |
| | | public class AuxiliaryCorrectionHoursServiceImpl extends ServiceImpl<AuxiliaryCorrectionHoursMapper, AuxiliaryCorrectionHours> implements AuxiliaryCorrectionHoursService { |
| | | |
| | | @Resource |
| | | AuxiliaryCorrectionHoursMapper auxiliaryCorrectionHoursMapper; |
| | | |
| | | @Resource |
| | | GetLook getLook; |
| | | |
| | | @Resource |
| | | UserMapper userMapper; |
| | | |
| | | @Resource |
| | | PowerMapper powerMapper; |
| | | |
| | | @Override |
| | | public Map<String, Object> selectAuxiliaryCorrectionHours(Page page, AuxiliaryCorrectionHoursDto auxiliaryCorrectionHoursDto) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | List<Integer> ids = null; |
| | | map.put("head", PrintChina.printChina(AuxiliaryCorrectionHoursDto.class)); |
| | | //夿ç»é¿,ç»å,管çåæé |
| | | Map<String, Integer> map1 = getLook.selectPowerByMethodAndUserId("selectAuxiliaryCorrectionHours"); |
| | | User user = userMapper.selectById(map1.get("userId")); |
| | | Integer roleId = user.getRoleId(); |
| | | Power power = powerMapper.selectOne(Wrappers.<Power>lambdaQuery().eq(Power::getRoleId, roleId).eq(Power::getMenuMethod, "leader")); |
| | | if (ObjectUtils.isEmpty(power)) { |
| | | //䏿¯ç»é¿ |
| | | if (map1.get("look") == 1) { |
| | | //æ¯ç»å |
| | | auxiliaryCorrectionHoursDto.setNameUser(map1.get("userId")); |
| | | } else { |
| | | //管çå(䏿·»å éå¶æ¡ä»¶ææäººé½å¯ä»¥ç) |
| | | } |
| | | } else { |
| | | //æ¯ç»é¿ |
| | | //æ¥è¯¢ç»é¿ä¸çç»å |
| | | List<User> users = userMapper.selectList(Wrappers.<User>lambdaQuery().like(User::getDepartLimsId, user.getDepartLimsId())); |
| | | if (ObjectUtils.isNotEmpty(users)) { |
| | | ids = users.stream().map(User::getId).distinct().collect(Collectors.toList()); |
| | | } |
| | | } |
| | | map.put("body", auxiliaryCorrectionHoursMapper.selectAuxiliaryCorrectionHours(page, QueryWrappers.queryWrappers(auxiliaryCorrectionHoursDto),ids)); |
| | | return map; |
| | | } |
| | | |
| | | //导å
¥ä¸ä¼ |
| | | @Override |
| | | public void importExcel(List<AuxiliaryCorrectionHoursDto> list) { |
| | | if (CollectionUtil.isEmpty(list)) { |
| | | return; |
| | | } |
| | | List<AuxiliaryCorrectionHours> auxiliaryCorrectionHoursList = new ArrayList<>(); |
| | | for (AuxiliaryCorrectionHoursDto auxiliaryCorrectionHoursDto : list) { |
| | | AuxiliaryCorrectionHours auxiliaryCorrectionHours = new AuxiliaryCorrectionHours(); |
| | | User user = userMapper.selectOne(Wrappers.<User>lambdaQuery().eq(User::getName, auxiliaryCorrectionHoursDto.getName())); |
| | | if (ObjectUtils.isEmpty(user)){ |
| | | throw new RuntimeException("ç³»ç»æ²¡ææ¥å°"+auxiliaryCorrectionHoursDto.getName()+"è¿ä¸ªç¨æ·ä¿¡æ¯!"); |
| | | } |
| | | BeanUtils.copyProperties(auxiliaryCorrectionHoursDto,auxiliaryCorrectionHours); |
| | | auxiliaryCorrectionHours.setNameUser(user.getId()); |
| | | auxiliaryCorrectionHoursList.add(auxiliaryCorrectionHours); |
| | | } |
| | | //æ¹éæ°å¢ |
| | | saveBatch(auxiliaryCorrectionHoursList); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.common.GetLook; |
| | | import com.yuanchu.mom.common.PrintChina; |
| | | import com.yuanchu.mom.dto.AuxiliaryCorrectionHoursDto; |
| | | import com.yuanchu.mom.dto.AuxiliaryOriginalHoursDto; |
| | | import com.yuanchu.mom.dto.AuxiliaryOriginalHoursLookDto; |
| | | import com.yuanchu.mom.mapper.*; |
| | | import com.yuanchu.mom.pojo.Power; |
| | | import com.yuanchu.mom.pojo.User; |
| | | import com.yuanchu.mom.service.AuxiliaryOriginalHoursService; |
| | | import com.yuanchu.mom.utils.QueryWrappers; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | @Service |
| | | public class AuxiliaryOriginalHoursServiceImpl implements AuxiliaryOriginalHoursService { |
| | | |
| | | @Resource |
| | | GetLook getLook; |
| | | |
| | | @Resource |
| | | UserMapper userMapper; |
| | | |
| | | @Resource |
| | | PowerMapper powerMapper; |
| | | |
| | | @Resource |
| | | AuxiliaryOriginalHoursMapper auxiliaryOriginalHoursMapper; |
| | | |
| | | @Resource |
| | | AuxiliaryOutputWorkingHoursMapper auxiliaryOutputWorkingHoursMapper; |
| | | |
| | | @Resource |
| | | AuxiliaryWorkingHoursDayMapper auxiliaryWorkingHoursDayMapper; |
| | | |
| | | @Override |
| | | public Map<String, Object> selectAuxiliaryOriginalHours(Page page, AuxiliaryOriginalHoursLookDto auxiliaryOriginalHoursLookDto) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | List<Integer> ids = null; |
| | | map.put("head", PrintChina.printChina(AuxiliaryCorrectionHoursDto.class)); |
| | | //夿ç»é¿,ç»å,管çåæé |
| | | Map<String, Integer> map1 = getLook.selectPowerByMethodAndUserId("selectAuxiliaryOriginalHours"); |
| | | User user = userMapper.selectById(map1.get("userId")); |
| | | Integer roleId = user.getRoleId(); |
| | | Power power = powerMapper.selectOne(Wrappers.<Power>lambdaQuery().eq(Power::getRoleId, roleId).eq(Power::getMenuMethod, "leader")); |
| | | if (ObjectUtils.isEmpty(power)) { |
| | | //䏿¯ç»é¿ |
| | | if (map1.get("look") == 1) { |
| | | //æ¯ç»å |
| | | ids.add(map1.get("userId")); |
| | | } else { |
| | | //管çå(䏿·»å éå¶æ¡ä»¶ææäººé½å¯ä»¥ç) |
| | | } |
| | | } else { |
| | | //æ¯ç»é¿ |
| | | //æ¥è¯¢ç»é¿ä¸çç»å |
| | | List<User> users = userMapper.selectList(Wrappers.<User>lambdaQuery().like(User::getDepartLimsId, user.getDepartLimsId())); |
| | | if (ObjectUtils.isNotEmpty(users)) { |
| | | ids = users.stream().map(User::getId).distinct().collect(Collectors.toList()); |
| | | } |
| | | } |
| | | IPage<AuxiliaryOriginalHoursDto> originalHoursDtoIPage = new Page<>(); |
| | | originalHoursDtoIPage.setSize(page.getSize()); |
| | | originalHoursDtoIPage.setCurrent(page.getCurrent()); |
| | | List<AuxiliaryOriginalHoursDto> auxiliaryOriginalHoursDtos = null; |
| | | //产éå·¥æ¶ |
| | | List<Map<String, Object>> maps = auxiliaryOutputWorkingHoursMapper.totalHours(auxiliaryOriginalHoursLookDto.getStartTime(), auxiliaryOriginalHoursLookDto.getEndTime(), auxiliaryOriginalHoursLookDto.getUserId(), auxiliaryOriginalHoursLookDto.getDepartId(), ids); |
| | | Map<Object, Map<Object, Double>> collect = maps.stream().collect( |
| | | Collectors.groupingBy(objmap -> objmap.get("name"), |
| | | Collectors.groupingBy(objmap -> objmap.get("month"), |
| | | Collectors.summingDouble(objmap -> Double.parseDouble(objmap.get("output_work_time").toString()))))); |
| | | |
| | | //è¾
å©å·¥æ¶ |
| | | //è¾
å©å·¥æ¶ |
| | | //å çå·¥æ¶ |
| | | //æ»å·¥æ¶ |
| | | originalHoursDtoIPage.setRecords(auxiliaryOriginalHoursDtos); |
| | | map.put("body", originalHoursDtoIPage); |
| | | return map; |
| | | } |
| | | } |
| | |
| | | package com.yuanchu.mom.service.impl; |
| | | |
| | | import com.alibaba.excel.EasyExcel; |
| | | import com.alibaba.excel.ExcelWriter; |
| | | import com.alibaba.excel.write.metadata.WriteSheet; |
| | | import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy; |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.common.GetLook; |
| | | import com.yuanchu.mom.common.PrintChina; |
| | | import com.yuanchu.mom.dto.AuxiliaryOutputWorkingHoursDto; |
| | | import com.yuanchu.mom.dto.AuxiliaryWorkingHoursDayDto; |
| | | import com.yuanchu.mom.mapper.AuxiliaryWorkingHoursDayMapper; |
| | | import com.yuanchu.mom.mapper.PowerMapper; |
| | | import com.yuanchu.mom.mapper.UserMapper; |
| | | import com.yuanchu.mom.pojo.AuxiliaryOutputWorkingHours; |
| | | import com.yuanchu.mom.mapper.AuxiliaryOutputWorkingHoursMapper; |
| | | import com.yuanchu.mom.pojo.AuxiliaryWorkingHoursDay; |
| | | import com.yuanchu.mom.pojo.Power; |
| | | import com.yuanchu.mom.pojo.User; |
| | | import com.yuanchu.mom.service.AuxiliaryOutputWorkingHoursService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.mom.utils.QueryWrappers; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.net.URLEncoder; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @Resource |
| | | AuxiliaryOutputWorkingHoursMapper auxiliaryOutputWorkingHoursMapper; |
| | | |
| | | @Resource |
| | | GetLook getLook; |
| | | |
| | | @Resource |
| | | AuxiliaryWorkingHoursDayMapper auxiliaryWorkingHoursDayMapper; |
| | | |
| | | @Resource |
| | | UserMapper userMapper; |
| | | |
| | | @Resource |
| | | PowerMapper powerMapper; |
| | | |
| | | @Override |
| | | public Map<String, Object> selectAuxiliaryOutputWorkingHours(Page page, AuxiliaryOutputWorkingHours auxiliaryOutputWorkingHours) { |
| | | public Map<String, Object> selectAuxiliaryOutputWorkingHours(Page page, AuxiliaryOutputWorkingHoursDto auxiliaryOutputWorkingHoursDto) { |
| | | String dates = auxiliaryOutputWorkingHoursDto.getDateTime(); |
| | | String week = auxiliaryOutputWorkingHoursDto.getWeek(); |
| | | auxiliaryOutputWorkingHoursDto.setDateTime(null); |
| | | auxiliaryOutputWorkingHoursDto.setWeek(null); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("head", PrintChina.printChina(AuxiliaryOutputWorkingHours.class)); |
| | | map.put("body", auxiliaryOutputWorkingHoursMapper.selectAuxiliaryOutputWorkingHours(page, QueryWrappers.queryWrappers(auxiliaryOutputWorkingHours))); |
| | | List<Integer> ids = null; |
| | | map.put("head", PrintChina.printChina(AuxiliaryOutputWorkingHoursDto.class)); |
| | | //夿ç»é¿,ç»å,管çåæé |
| | | Map<String, Integer> map1 = getLook.selectPowerByMethodAndUserId("selectAuxiliaryOutputWorkingHours"); |
| | | User user = userMapper.selectById(map1.get("userId")); |
| | | Integer roleId = user.getRoleId(); |
| | | Power power = powerMapper.selectOne(Wrappers.<Power>lambdaQuery().eq(Power::getRoleId, roleId).eq(Power::getMenuMethod, "leader")); |
| | | if (ObjectUtils.isEmpty(power)) { |
| | | //䏿¯ç»é¿ |
| | | if (map1.get("look") == 1) { |
| | | //æ¯ç»å |
| | | auxiliaryOutputWorkingHoursDto.setCheck(map1.get("userId")); |
| | | } else { |
| | | //管çå(䏿·»å éå¶æ¡ä»¶ææäººé½å¯ä»¥ç) |
| | | } |
| | | } else { |
| | | //æ¯ç»é¿ |
| | | //æ¥è¯¢ç»é¿ä¸çç»å |
| | | List<User> users = userMapper.selectList(Wrappers.<User>lambdaQuery().like(User::getDepartLimsId, user.getDepartLimsId())); |
| | | if (ObjectUtils.isNotEmpty(users)) { |
| | | ids = users.stream().map(User::getId).distinct().collect(Collectors.toList()); |
| | | } |
| | | } |
| | | if (ObjectUtils.isNotEmpty(dates)) { |
| | | String[] split = dates.replaceAll("\\[", "").replaceAll("]", "").replaceAll("\"", "").split(","); |
| | | if (ObjectUtils.isNotEmpty(week)){ |
| | | String[] weeks = week.replaceAll("\\[", "").replaceAll("]", "").replaceAll("\"", "").split(","); |
| | | map.put("body", auxiliaryOutputWorkingHoursMapper.selectAuxiliaryOutputWorkingHours(page, |
| | | QueryWrappers.queryWrappers(auxiliaryOutputWorkingHoursDto) |
| | | .ge("date_time", split[0]).le("date_time", split[1] + " 23:59:59") |
| | | .ge("week", weeks[0]).le("week", weeks[1] ), ids)); |
| | | } |
| | | map.put("body", auxiliaryOutputWorkingHoursMapper.selectAuxiliaryOutputWorkingHours(page, QueryWrappers.queryWrappers(auxiliaryOutputWorkingHoursDto).ge("date_time", split[0]).le("date_time", split[1] + " 23:59:59"), ids)); |
| | | } else { |
| | | map.put("body", auxiliaryOutputWorkingHoursMapper.selectAuxiliaryOutputWorkingHours(page, QueryWrappers.queryWrappers(auxiliaryOutputWorkingHoursDto), ids)); |
| | | } |
| | | return map; |
| | | } |
| | | |
| | | //ç»è®¡äº§éå·¥æ¶æ±æ»åè¾
å©å·¥æ¶æ±æ» |
| | | @Override |
| | | public Map<String, Object> collectWorkingHours() { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | Double sumOutputWorkTime = 0.0; |
| | | Double sumApprovedWorkingHour = 0.0; |
| | | List<Integer> ids = null; |
| | | //夿æ¯ç»é¿è¿æ¯ç»åè¿æ¯ç®¡çå |
| | | Map<String, Integer> map1 = getLook.selectPowerByMethodAndUserId("selectAuxiliaryOutputWorkingHours"); |
| | | User user = userMapper.selectById(map1.get("userId")); |
| | | Integer roleId = user.getRoleId(); |
| | | Power power = powerMapper.selectOne(Wrappers.<Power>lambdaQuery().eq(Power::getRoleId, roleId).eq(Power::getMenuMethod, "leader")); |
| | | if (ObjectUtils.isEmpty(power)) { |
| | | //䏿¯ç»é¿ |
| | | if (map1.get("look") == 1) { |
| | | //æ¯ç»å |
| | | ids.add(map1.get("userId")); |
| | | } else { |
| | | //管çå(䏿·»å éå¶æ¡ä»¶ææäººé½å¯ä»¥ç) |
| | | } |
| | | } else { |
| | | //æ¯ç»é¿ |
| | | //æ¥è¯¢ç»é¿ä¸çç»å |
| | | List<User> users = userMapper.selectList(Wrappers.<User>lambdaQuery().like(User::getDepartLimsId, user.getDepartLimsId())); |
| | | if (ObjectUtils.isNotEmpty(users)) { |
| | | ids = users.stream().map(User::getId).distinct().collect(Collectors.toList()); |
| | | } |
| | | } |
| | | //ç»è®¡å½åç¨æ·ç产åå·¥æ¶ |
| | | List<AuxiliaryOutputWorkingHours> auxiliaryOutputWorkingHours = auxiliaryOutputWorkingHoursMapper.selectListByIds(ids); |
| | | if (ObjectUtils.isNotEmpty(auxiliaryOutputWorkingHours)) { |
| | | Map<String, Double> sumMap = new HashMap<>(); |
| | | for (AuxiliaryOutputWorkingHours auxiliaryOutputWorkingHour : auxiliaryOutputWorkingHours) { |
| | | if (!sumMap.containsKey(auxiliaryOutputWorkingHour.getManHourGroup())) { |
| | | sumMap.put(auxiliaryOutputWorkingHour.getManHourGroup(), auxiliaryOutputWorkingHour.getOutputWorkTime()); |
| | | } |
| | | } |
| | | sumOutputWorkTime = sumMap.values().stream().mapToDouble(Double::doubleValue).sum(); |
| | | } |
| | | map.put("产éå·¥æ¶æ±æ»", sumOutputWorkTime); |
| | | //ç»è®¡å½åç¨æ·çè¾
å©å·¥æ¶ |
| | | List<AuxiliaryWorkingHoursDay> auxiliaryWorkingHoursDays = auxiliaryWorkingHoursDayMapper.selectListByIds(ids); |
| | | if (ObjectUtils.isNotEmpty(auxiliaryWorkingHoursDays)) { |
| | | for (AuxiliaryWorkingHoursDay auxiliaryWorkingHoursDay : auxiliaryWorkingHoursDays) { |
| | | sumApprovedWorkingHour += auxiliaryWorkingHoursDay.getNonproductiveTime(); |
| | | } |
| | | } |
| | | map.put("è¾
å©å·¥æ¶æ±æ»", sumApprovedWorkingHour); |
| | | return map; |
| | | } |
| | | |
| | | //å¯¼åº |
| | | @Override |
| | | public void exportWorkingHours(HttpServletResponse response) throws IOException { |
| | | List<AuxiliaryOutputWorkingHoursDto> auxiliaryOutputWorkingHoursDtos = null; |
| | | List<AuxiliaryWorkingHoursDayDto> auxiliaryWorkingHoursDayDtos = null; |
| | | List<Integer> ids = null; |
| | | //夿æ¯ç»é¿è¿æ¯ç»åè¿æ¯ç®¡çå |
| | | Map<String, Integer> map1 = getLook.selectPowerByMethodAndUserId("selectAuxiliaryOutputWorkingHours"); |
| | | User user = userMapper.selectById(map1.get("userId")); |
| | | Integer roleId = user.getRoleId(); |
| | | Power power = powerMapper.selectOne(Wrappers.<Power>lambdaQuery().eq(Power::getRoleId, roleId).eq(Power::getMenuMethod, "leader")); |
| | | if (ObjectUtils.isEmpty(power)) { |
| | | //䏿¯ç»é¿ |
| | | if (map1.get("look") == 1) { |
| | | //æ¯ç»å |
| | | ids.add(map1.get("userId")); |
| | | } else { |
| | | //管çå(䏿·»å éå¶æ¡ä»¶ææäººé½å¯ä»¥ç) |
| | | } |
| | | } else { |
| | | //æ¯ç»é¿ |
| | | //æ¥è¯¢ç»é¿ä¸çç»å |
| | | List<User> users = userMapper.selectList(Wrappers.<User>lambdaQuery().like(User::getDepartLimsId, user.getDepartLimsId())); |
| | | if (ObjectUtils.isNotEmpty(users)) { |
| | | ids = users.stream().map(User::getId).distinct().collect(Collectors.toList()); |
| | | } |
| | | } |
| | | |
| | | //æ¥è¯¢è¾
å©å·¥æ¶ |
| | | auxiliaryWorkingHoursDayDtos = auxiliaryWorkingHoursDayMapper.selectDataByUser(ids); |
| | | // if (auxiliaryWorkingHoursDayDtos == null || auxiliaryWorkingHoursDayDtos.size() == 0) { |
| | | // throw new RuntimeException("ææ æ°æ®"); |
| | | // } |
| | | //æ¥è¯¢ç»è®¡å·¥æ¶ |
| | | auxiliaryOutputWorkingHoursDtos = auxiliaryOutputWorkingHoursMapper.selectDataByUser(ids); |
| | | // if (auxiliaryOutputWorkingHoursDtos == null || auxiliaryOutputWorkingHoursDtos.size() == 0) { |
| | | // throw new RuntimeException("ææ æ°æ®"); |
| | | // } |
| | | response.setContentType("application/vnd.ms-excel"); |
| | | response.setCharacterEncoding("UTF-8"); |
| | | // è¿éURLEncoder.encodeå¯ä»¥é²æ¢ä¸æä¹±ç å½ç¶åeasyexcel没æå
³ç³» |
| | | String fileName = URLEncoder.encode("å·¥æ¶ç®¡ç导åº", "UTF-8"); |
| | | response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx"); |
| | | try { |
| | | // æ°å»ºExcelWriter |
| | | ExcelWriter excelWriter = EasyExcel.write(response.getOutputStream()).registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()).build(); |
| | | |
| | | WriteSheet mainSheet = EasyExcel.writerSheet(0, "è¾
å©å·¥æ¶å¯¼åº").head(AuxiliaryWorkingHoursDayDto.class).build(); |
| | | excelWriter.write(auxiliaryWorkingHoursDayDtos, mainSheet); |
| | | |
| | | WriteSheet mainSheet1 = EasyExcel.writerSheet(1, "产éå·¥æ¶å¯¼åº").head(AuxiliaryOutputWorkingHoursDto.class).build(); |
| | | excelWriter.write(auxiliaryOutputWorkingHoursDtos, mainSheet1); |
| | | // å
³éæµ |
| | | excelWriter.finish(); |
| | | } catch (IOException e) { |
| | | throw new RuntimeException("导åºå¤±è´¥"); |
| | | } |
| | | } |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.common.GetLook; |
| | | import com.yuanchu.mom.common.PrintChina; |
| | | import com.yuanchu.mom.dto.AuxiliaryWorkingHoursDayDto; |
| | | import com.yuanchu.mom.exception.ErrorException; |
| | | import com.yuanchu.mom.mapper.AuxiliaryWorkingHoursMapper; |
| | | import com.yuanchu.mom.mapper.PerformanceShiftMapper; |
| | | import com.yuanchu.mom.mapper.UserMapper; |
| | | import com.yuanchu.mom.pojo.AuxiliaryWorkingHours; |
| | | import com.yuanchu.mom.pojo.AuxiliaryWorkingHoursDay; |
| | | import com.yuanchu.mom.mapper.AuxiliaryWorkingHoursDayMapper; |
| | | import com.yuanchu.mom.pojo.PerformanceShift; |
| | | import com.yuanchu.mom.pojo.User; |
| | | import com.yuanchu.mom.mapper.*; |
| | | import com.yuanchu.mom.pojo.*; |
| | | import com.yuanchu.mom.service.AuxiliaryWorkingHoursDayService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.mom.utils.MyUtil; |
| | |
| | | import javax.annotation.Resource; |
| | | import java.time.LocalDateTime; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | UserMapper userMapper; |
| | | |
| | | @Resource |
| | | RoleMapper roleMapper; |
| | | |
| | | @Resource |
| | | PowerMapper powerMapper; |
| | | |
| | | @Resource |
| | | PerformanceShiftMapper performanceShiftMapper; |
| | | |
| | | @Override |
| | | public Map<String, Object> selectAuxiliaryWorkingHoursDay(Page page, AuxiliaryWorkingHoursDay auxiliaryWorkingHoursDay) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("head", PrintChina.printChina(AuxiliaryWorkingHoursDay.class)); |
| | | map.put("body", auxiliaryWorkingHoursDayMapper.selectAuxiliaryWorkingHoursDay(page, QueryWrappers.queryWrappers(auxiliaryWorkingHoursDay))); |
| | | public Map<String, Object> selectAuxiliaryWorkingHoursDay(Page page, AuxiliaryWorkingHoursDayDto auxiliaryWorkingHoursDayDto) { |
| | | String dates = auxiliaryWorkingHoursDayDto.getDateTime(); |
| | | String week = auxiliaryWorkingHoursDayDto.getWeek(); |
| | | auxiliaryWorkingHoursDayDto.setDateTime(null); |
| | | auxiliaryWorkingHoursDayDto.setWeek(null); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | List<Integer> ids = null; |
| | | map.put("head", PrintChina.printChina(AuxiliaryWorkingHoursDayDto.class)); |
| | | //夿ç»é¿,ç»å,管çåæé |
| | | Map<String, Integer> map1 = getLook.selectPowerByMethodAndUserId("selectAuxiliaryWorkingHoursDay"); |
| | | User user = userMapper.selectById(map1.get("userId")); |
| | | Integer roleId = user.getRoleId(); |
| | | Power power = powerMapper.selectOne(Wrappers.<Power>lambdaQuery().eq(Power::getRoleId, roleId).eq(Power::getMenuMethod, "leader")); |
| | | if (ObjectUtils.isEmpty(power)) { |
| | | //䏿¯ç»é¿ |
| | | if (map1.get("look") == 1) { |
| | | //æ¯ç»å |
| | | auxiliaryWorkingHoursDayDto.setNameUser(map1.get("userId")); |
| | | } else { |
| | | //管çå(䏿·»å éå¶æ¡ä»¶ææäººé½å¯ä»¥ç) |
| | | } |
| | | } else { |
| | | //æ¯ç»é¿ |
| | | //æ¥è¯¢ç»å |
| | | List<User> users = userMapper.selectList(Wrappers.<User>lambdaQuery().like(User::getDepartLimsId, user.getDepartLimsId())); |
| | | if (ObjectUtils.isNotEmpty(users)) { |
| | | ids = users.stream().map(User::getId).distinct().collect(Collectors.toList()); |
| | | } |
| | | } |
| | | if (ObjectUtils.isNotEmpty(dates)) { |
| | | String[] split = dates.replaceAll("\\[", "").replaceAll("]", "").replaceAll("\"", "").split(","); |
| | | if (ObjectUtils.isNotEmpty(week)) { |
| | | String[] weeks = week.replaceAll("\\[", "").replaceAll("]", "").replaceAll("\"", "").split(","); |
| | | map.put("body", auxiliaryWorkingHoursDayMapper.selectAuxiliaryWorkingHoursDay(page, |
| | | QueryWrappers.queryWrappers(auxiliaryWorkingHoursDayDto) |
| | | .ge("date_time", split[0]).le("date_time", split[1] + " 23:59:59") |
| | | .ge("week", weeks[0]).le("week", weeks[1] ), ids)); |
| | | } else { |
| | | map.put("body", auxiliaryWorkingHoursDayMapper.selectAuxiliaryWorkingHoursDay(page, QueryWrappers.queryWrappers(auxiliaryWorkingHoursDayDto).ge("date_time", split[0]).le("date_time", split[1] + " 23:59:59"), ids)); |
| | | } |
| | | } |
| | | else { |
| | | map.put("body", auxiliaryWorkingHoursDayMapper.selectAuxiliaryWorkingHoursDay(page, QueryWrappers.queryWrappers(auxiliaryWorkingHoursDayDto), ids)); |
| | | } |
| | | return map; |
| | | } |
| | | |
| | |
| | | @Override |
| | | public int insertAuxiliaryWorkingHoursDay(AuxiliaryWorkingHoursDay auxiliaryWorkingHoursDay) { |
| | | Integer userId = getLook.selectPowerByMethodAndUserId(null).get("userId"); |
| | | User user = userMapper.selectById(userId); |
| | | auxiliaryWorkingHoursDay.setName(user.getName());//å§å |
| | | auxiliaryWorkingHoursDay.setNameUser(userId);//å§åid |
| | | auxiliaryWorkingHoursDay.setState("å·²æäº¤"); |
| | | return auxiliaryWorkingHoursDayMapper.insert(auxiliaryWorkingHoursDay); |
| | | } |
| | |
| | | @Override |
| | | public int checkOrApprove(Integer id, String state) { |
| | | AuxiliaryWorkingHoursDay auxiliaryWorkingHoursDay = auxiliaryWorkingHoursDayMapper.selectById(id); |
| | | if (auxiliaryWorkingHoursDay.getState().equals("å·²æ¹å") && state.equals("å·²å®¡æ ¸")) { |
| | | throw new RuntimeException("è¯¥æ°æ®å·²ç»æ¹åæ éå®¡æ ¸!"); |
| | | } |
| | | auxiliaryWorkingHoursDay.setState(state); |
| | | return auxiliaryWorkingHoursDayMapper.updateById(auxiliaryWorkingHoursDay); |
| | | } |
| | |
| | | throw new RuntimeException("è¯¥æ°æ®å·²ç»æ¹åæå·²å®¡æ ¸,æ æ³è¿è¡ç¼è¾!"); |
| | | } |
| | | Integer userId = getLook.selectPowerByMethodAndUserId(null).get("userId"); |
| | | User user = userMapper.selectById(userId); |
| | | auxiliaryWorkingHoursDay.setName(user.getName());//å§å |
| | | auxiliaryWorkingHoursDay.setNameUser(userId);//å§åid |
| | | return auxiliaryWorkingHoursDayMapper.updateById(auxiliaryWorkingHoursDay); |
| | | } |
| | | |
| | |
| | | public String selectshiftByUser(LocalDateTime dateTime) { |
| | | Integer userId = getLook.selectPowerByMethodAndUserId(null).get("userId"); |
| | | PerformanceShift performanceShift = performanceShiftMapper.selectOne(Wrappers.<PerformanceShift>lambdaQuery().eq(PerformanceShift::getUserId, userId).eq(PerformanceShift::getWorkTime, dateTime)); |
| | | if (ObjectUtils.isEmpty(performanceShift)){ |
| | | throw new RuntimeException("æ²¡ææ¥å°å½åç¨æ·éæ©æ¥æçå½ççæ¬¡ä¿¡æ¯!!"); |
| | | if (ObjectUtils.isEmpty(performanceShift)) { |
| | | return null; |
| | | } |
| | | return performanceShift.getShift(); |
| | | } |
| | |
| | | |
| | | import com.alibaba.excel.write.metadata.style.WriteCellStyle; |
| | | import com.alibaba.excel.write.metadata.style.WriteFont; |
| | | import com.yuanchu.mom.pojo.AuxiliaryOutputWorkingHours; |
| | | import org.apache.poi.ss.usermodel.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | public class StyleYearUtils { |
| | | /** |
| | | * æ 颿 ·å¼ |
| | | * |
| | | * @return |
| | | */ |
| | | public static WriteCellStyle getHeadStyle(){ |
| | | public static WriteCellStyle getHeadStyle() { |
| | | // 头ççç¥ |
| | | WriteCellStyle headWriteCellStyle = new WriteCellStyle(); |
| | | // èæ¯é¢è² |
| | |
| | | // åä½ |
| | | WriteFont headWriteFont = new WriteFont(); |
| | | headWriteFont.setFontName("仿å®");//设置åä½åå |
| | | headWriteFont.setFontHeightInPoints((short)9);//设置åä½å¤§å° |
| | | headWriteFont.setFontHeightInPoints((short) 9);//设置åä½å¤§å° |
| | | headWriteFont.setBold(true);//åä½å ç² |
| | | headWriteFont.setColor((short) 1); |
| | | headWriteCellStyle.setWriteFont(headWriteFont); //卿 ·å¼ç¨åºç¨è®¾ç½®çåä½; |
| | |
| | | |
| | | /** |
| | | * å
å®¹æ ·å¼ |
| | | * |
| | | * @return |
| | | */ |
| | | public static WriteCellStyle getContentStyle(){ |
| | | public static WriteCellStyle getContentStyle() { |
| | | // å
容ççç¥ |
| | | WriteCellStyle contentWriteCellStyle = new WriteCellStyle(); |
| | | |
| | |
| | | |
| | | return contentWriteCellStyle; |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | |
| | | String a="[\"GB/T 15972.20-2021\",\"IEC 60793-1-20:2014\"]"; |
| | | System.out.println(a.contains("GB/T 15972.20-2021")); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.yuanchu.mom.mapper.AuxiliaryCorrectionHoursMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.yuanchu.mom.pojo.AuxiliaryCorrectionHours"> |
| | | <id column="id" property="id" /> |
| | | <result column="name_user" property="nameUser" /> |
| | | <result column="type" property="type" /> |
| | | <result column="one_hours" property="oneHours" /> |
| | | <result column="two_hours" property="twoHours" /> |
| | | <result column="three_hours" property="threeHours" /> |
| | | <result column="four_hours" property="fourHours" /> |
| | | <result column="five_hours" property="fiveHours" /> |
| | | <result column="six_hours" property="sixHours" /> |
| | | <result column="seven_hours" property="sevenHours" /> |
| | | <result column="eight_hours" property="eightHours" /> |
| | | <result column="nine_hours" property="nineHours" /> |
| | | <result column="ten_hours" property="tenHours" /> |
| | | <result column="eleven_hours" property="elevenHours" /> |
| | | <result column="twelve_hours" property="twelveHours" /> |
| | | <result column="thirteen_hours" property="thirteenHours" /> |
| | | <result column="fourteen_hours" property="fourteenHours" /> |
| | | <result column="fifteen_hours" property="fifteenHours" /> |
| | | <result column="sixteen_hours" property="sixteenHours" /> |
| | | <result column="seventeen_hours" property="seventeenHours" /> |
| | | <result column="eighteen_hours" property="eighteenHours" /> |
| | | <result column="nineteen_hours" property="nineteenHours" /> |
| | | <result column="twenty_hours" property="twentyHours" /> |
| | | <result column="twenty_one_hours" property="twentyOneHours" /> |
| | | <result column="twenty_two_hours" property="twentyTwoHours" /> |
| | | <result column="twenty_three_hours" property="twentyThreeHours" /> |
| | | <result column="twenty_four_hours" property="twentyFourHours" /> |
| | | <result column="twenty_five_hours" property="twentyFiveHours" /> |
| | | <result column="twenty_six_hours" property="twentySixHours" /> |
| | | <result column="twenty_seven_hours" property="twentySevenHours" /> |
| | | <result column="twenty_eight_hours" property="twentyEightHours" /> |
| | | <result column="twenty_nine_hours" property="twentyNineHours" /> |
| | | <result column="thirty_hours" property="thirtyHours" /> |
| | | <result column="thirty_one_hours" property="thirtyOneHours" /> |
| | | <result column="month" property="month" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="update_time" property="updateTime" /> |
| | | <result column="create_user" property="createUser" /> |
| | | <result column="update_user" property="updateUser" /> |
| | | </resultMap> |
| | | <select id="selectAuxiliaryCorrectionHours" resultType="com.yuanchu.mom.dto.AuxiliaryCorrectionHoursDto"> |
| | | select data.* |
| | | from ( |
| | | select ach.*,name |
| | | FROM auxiliary_correction_hours ach |
| | | left join user on user.id=ach.name_user |
| | | <if test="ids !=null and ids != ''"> |
| | | WHERE name_user in |
| | | <foreach collection="ids" index="index" open="(" separator="," close=")" item="val"> |
| | | #{val} |
| | | </foreach> |
| | | </if> |
| | | ) data |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | </select> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > |
| | | <mapper namespace="com.yuanchu.mom.mapper.AuxiliaryOriginalHoursMapper"> |
| | | </mapper> |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.yuanchu.mom.mapper.AuxiliaryOutputWorkingHoursMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.yuanchu.mom.pojo.AuxiliaryOutputWorkingHours"> |
| | | <id column="id" property="id" /> |
| | | <result column="inspect_project" property="inspectProject" /> |
| | | <result column="overtime_order_no" property="overtimeOrderNo" /> |
| | | <result column="overtime_work_time" property="overtimeWorkTime" /> |
| | | <result column="overtime_amount" property="overtimeAmount" /> |
| | | <result column="order_no" property="orderNo" /> |
| | | <result column="work_time" property="workTime" /> |
| | | <result column="amount" property="amount" /> |
| | | <result column="output_work_time" property="outputWorkTime" /> |
| | | <result column="date_time" property="dateTime" /> |
| | | <result column="week" property="week" /> |
| | | <result column="week_day" property="weekDay" /> |
| | | <result column="check" property="check" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="update_time" property="updateTime" /> |
| | | <result column="create_user" property="createUser" /> |
| | | <result column="update_user" property="updateUser" /> |
| | | <id column="id" property="id"/> |
| | | <result column="inspect_project" property="inspectProject"/> |
| | | <result column="overtime_order_no" property="overtimeOrderNo"/> |
| | | <result column="overtime_work_time" property="overtimeWorkTime"/> |
| | | <result column="overtime_amount" property="overtimeAmount"/> |
| | | <result column="order_no" property="orderNo"/> |
| | | <result column="work_time" property="workTime"/> |
| | | <result column="amount" property="amount"/> |
| | | <result column="output_work_time" property="outputWorkTime"/> |
| | | <result column="date_time" property="dateTime"/> |
| | | <result column="week" property="week"/> |
| | | <result column="week_day" property="weekDay"/> |
| | | <result column="check" property="check"/> |
| | | <result column="create_time" property="createTime"/> |
| | | <result column="update_time" property="updateTime"/> |
| | | <result column="create_user" property="createUser"/> |
| | | <result column="update_user" property="updateUser"/> |
| | | </resultMap> |
| | | <select id="selectAuxiliaryOutputWorkingHours" resultType="com.yuanchu.mom.pojo.AuxiliaryOutputWorkingHours"> |
| | | select data.* |
| | | from ( |
| | | <select id="selectAuxiliaryOutputWorkingHours" resultType="com.yuanchu.mom.dto.AuxiliaryOutputWorkingHoursDto"> |
| | | select * |
| | | FROM auxiliary_output_working_hours |
| | | from ( |
| | | select aowh.id, |
| | | inspect_project, |
| | | overtime_order_no, |
| | | overtime_work_time, |
| | | overtime_amount, |
| | | order_no, |
| | | work_time, |
| | | amount, |
| | | output_work_time, |
| | | date_time, |
| | | week, |
| | | week_day, |
| | | name |
| | | FROM auxiliary_output_working_hours aowh |
| | | left join user on user.id=aowh.`check` |
| | | <if test="ids !=null and ids != ''"> |
| | | WHERE `check` in |
| | | <foreach collection="ids" index="index" open="(" separator="," close=")" item="val"> |
| | | #{val} |
| | | </foreach> |
| | | </if> |
| | | ) data |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | </select> |
| | | <select id="selectDataByUser" resultType="com.yuanchu.mom.dto.AuxiliaryOutputWorkingHoursDto"> |
| | | select aowh.*,name |
| | | FROM auxiliary_output_working_hours aowh |
| | | left join user on user.id=aowh.`check` |
| | | <if test="ids !=null and ids != ''"> |
| | | WHERE `check` in |
| | | <foreach collection="ids" index="index" open="(" separator="," close=")" item="val"> |
| | | #{val} |
| | | </foreach> |
| | | </if> |
| | | </select> |
| | | <select id="totalHours" resultType="java.util.Map"> |
| | | select A.name, |
| | | A.month, |
| | | A.output_work_time |
| | | from( |
| | | select user.name, |
| | | user.id, |
| | | depart_lims_id, |
| | | output_work_time, |
| | | date_time as month |
| | | from auxiliary_output_working_hours aowh |
| | | left join user on user.id=aowh.`check` |
| | | left join department_lims dl on depart_lims_id=dl.id |
| | | where date_time between #{startTime} and #{endTime} |
| | | <if test="ids !=null and ids != ''"> |
| | | and `check` in |
| | | <foreach collection="ids" index="index" open="(" separator="," close=")" item="val"> |
| | | #{val} |
| | | </foreach> |
| | | </if> |
| | | order by date_time |
| | | )A |
| | | where 1=1 |
| | | <if test="userId !=null and userId != ''"> |
| | | and A.user_id=#{userId} |
| | | </if> |
| | | <if test="departId !=null and departId != ''"> |
| | | and A.depart_lims_id=#{departId} |
| | | </if> |
| | | group by A.name,A.month |
| | | </select> |
| | | <select id="selectListByIds" resultType="com.yuanchu.mom.pojo.AuxiliaryOutputWorkingHours"> |
| | | select * from auxiliary_output_working_hours |
| | | where 1=1 |
| | | <if test="ids !=null and ids != ''"> |
| | | and `check` in |
| | | <foreach collection="ids" index="index" open="(" separator="," close=")" item="val"> |
| | | #{val} |
| | | </foreach> |
| | | </if> |
| | | </select> |
| | | </mapper> |
| | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.yuanchu.mom.pojo.AuxiliaryWorkingHoursDay"> |
| | | <id column="id" property="id"/> |
| | | <result column="name" property="name"/> |
| | | <result column="nameUser" property="nameUser"/> |
| | | <result column="number" property="number"/> |
| | | <result column="auxiliary_project" property="auxiliaryProject"/> |
| | | <result column="approved_working_hour" property="approvedWorkingHour"/> |
| | |
| | | <result column="update_user" property="updateUser"/> |
| | | <result column="state" property="state"/> |
| | | </resultMap> |
| | | <select id="selectAuxiliaryWorkingHoursDay" resultType="com.yuanchu.mom.pojo.AuxiliaryWorkingHoursDay"> |
| | | <select id="selectAuxiliaryWorkingHoursDay" resultType="com.yuanchu.mom.dto.AuxiliaryWorkingHoursDayDto"> |
| | | select data.* |
| | | from ( |
| | | select * |
| | | FROM auxiliary_working_hours_day |
| | | select awhd.*,name |
| | | FROM auxiliary_working_hours_day awhd |
| | | left join user on name_user=user.id |
| | | <if test="ids !=null and ids != ''"> |
| | | WHERE name_user in |
| | | <foreach collection="ids" index="index" open="(" separator="," close=")" item="val"> |
| | | #{val} |
| | | </foreach> |
| | | </if> |
| | | ) data |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | </select> |
| | | <select id="selectDataByUser" resultType="com.yuanchu.mom.dto.AuxiliaryWorkingHoursDayDto"> |
| | | select awhd.*,name |
| | | FROM auxiliary_working_hours_day awhd |
| | | left join user on name_user=user.id |
| | | <if test="ids !=null and ids != ''"> |
| | | WHERE name_user in |
| | | <foreach collection="ids" index="index" open="(" separator="," close=")" item="val"> |
| | | #{val} |
| | | </foreach> |
| | | </if> |
| | | </select> |
| | | <select id="selectListByIds" resultType="com.yuanchu.mom.pojo.AuxiliaryWorkingHoursDay"> |
| | | select * from auxiliary_working_hours_day |
| | | where 1=1 |
| | | <if test="ids !=null and ids != ''"> |
| | | and name_user in |
| | | <foreach collection="ids" index="index" open="(" separator="," close=")" item="val"> |
| | | #{val} |
| | | </foreach> |
| | | </if> |
| | | </select> |
| | | </mapper> |