Merge branch 'dev' into dev_cr
| | |
| | | return Result.success(standardTreeService.addStandardTree(standardTree)); |
| | | } |
| | | |
| | | @ApiOperation(value = "ç»æ åæ æ·»å æ£éªæ å") |
| | | @PostMapping("/addStandardMethodList") |
| | | public Result addStandardMethodList(@RequestBody Map<String, Object> map) { |
| | | Integer standardId = (Integer) map.get("standardId"); |
| | | String tree = (String) map.get("tree"); |
| | | return Result.success(standardMethodListService.addStandardMethodList(standardId, tree)); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ ¹æ®æ åæ è¿è¡æ åæ¥è¯¢") |
| | | @GetMapping("/selectsStandardMethodByFLSSM") |
| | | public Result selectsStandardMethodByFLSSM(String tree) { |
| | |
| | | return Result.success(standardProductListService.updateSection(list)); |
| | | } |
| | | |
| | | @ApiOperation(value = "å 餿 åæ ä¸çæ£éªæ å") |
| | | @DeleteMapping("/delStandardMethodByFLSSM") |
| | | public Result delStandardMethodByFLSSM(Integer id) { |
| | | return Result.success(standardMethodListService.delStandardMethodByFLSSM(id)); |
| | | } |
| | | |
| | | @ApiOperation(value = "å 餿 åæ ä¸çæ£éªé¡¹ç®") |
| | | @DeleteMapping("/delStandardProductByIds") |
| | | public Result delStandardProductByIds(String ids) { |
| | | JSONArray lists = JSON.parseArray(ids); |
| | | return Result.success(standardProductListService.delStandardProduct(lists)); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ°å¢æ åæ ä¸çæ£éªé¡¹ç®") |
| | | @PostMapping("/addStandardProduct") |
| | | public Result addStandardProduct(@RequestBody Map<String, String> map) { |
| | | String ids = map.get("ids"); |
| | | String tree = map.get("tree"); |
| | | return Result.success(standardTreeService.addStandardProduct(ids, tree)); |
| | | } |
| | | |
| | | @ApiOperation(value = "å 餿 åæ çå±çº§") |
| | | @DeleteMapping("/delStandardTree") |
| | | public Result delStandardTree(String tree) { |
| | |
| | | |
| | | @ApiOperation(value = "éè¿æ£éªæ åæ¥è¯¢æ£éªé¡¹ç®") |
| | | @GetMapping("/selectStandardProductListByMethodId") |
| | | public Result selectStandardProductListByMethodId(Integer id, String tree, Integer page) { |
| | | return Result.success(standardProductListService.selectStandardProductListByMethodId(id, tree, page)); |
| | | public Result selectStandardProductListByMethodId(Integer id, String tree) { |
| | | return Result.success(standardProductListService.selectStandardProductListByMethodId(id, tree)); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ¹éæ¥è¯¢æ£éªé¡¹ç®") |
| | |
| | | @Param("endIndex") Integer endIndex, |
| | | @Param("methodId") Integer methodId, |
| | | @Param("tree") String tree); |
| | | |
| | | /** |
| | | * æ¹éæ·»å æ å |
| | | * @param productLists |
| | | */ |
| | | void saveBatchProductLists(@Param("productLists") List<StandardProductList> productLists); |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | List<SampleTypeDto> getStandardTree2(); |
| | | |
| | | List<SampleDto> getStandardTree3(String sampleType); |
| | | |
| | | |
| | | String getLaboratory(String str); |
| | | |
| | | Integer getStructureItemParameterId(String sampleType, String item, String itemChild, String inspectionItemClass); |
| | |
| | | @ApiModelProperty("åå·") |
| | | private String model; |
| | | |
| | | @ApiModelProperty("åå·") |
| | | @ApiModelProperty("模æ¿id") |
| | | private Integer templateId; |
| | | |
| | | @ApiModelProperty("") |
| | |
| | | |
| | | private String tree; |
| | | |
| | | @ApiModelProperty("æ£éªé¡¹id") |
| | | private Integer structureItemParameterId; |
| | | |
| | | @ApiModelProperty(value = "æ£éªé¡¹åç±»") |
| | |
| | | */ |
| | | public interface StandardMethodListService extends IService<StandardMethodList> { |
| | | |
| | | int addStandardMethodList(Integer standardId, String tree); |
| | | |
| | | Map<String, List<?>> selectsStandardMethodByFLSSM(String tree); |
| | | |
| | | Map<String, List<?>> selectsStandardMethodByFLSSM2(String tree); |
| | | |
| | | int delStandardMethodByFLSSM(Integer id); |
| | | |
| | | List<StandardMethodList> selectStandardMethodEnum(); |
| | | |
| | |
| | | |
| | | int upStandardProductList(StandardProductList list); |
| | | |
| | | int delStandardProduct(JSONArray list); |
| | | |
| | | List<StandardProductList> selectStandardProductList(InsSampleReceiveDto insSample); |
| | | |
| | | Map<String, Object> selectStandardProductListByMethodId(Integer id, String tree, Integer page); |
| | | Map<String, Object> selectStandardProductListByMethodId(Integer id, String tree); |
| | | |
| | | IPage<StandardProductList> selectStandardProductByMethodId(Integer id, String tree, Integer page, String laboratory, String item, String items); |
| | | |
| | |
| | | |
| | | int delStandardTree(String tree); |
| | | |
| | | int addStandardProduct(String ids, String tree); |
| | | |
| | | List<SampleTypeDto> getStandardTree2(); |
| | | |
| | | int upStandardProducts(Map<String, Object> product); |
| | |
| | | |
| | | private StandardProductListMapper standardProductListMapper; |
| | | |
| | | @Override |
| | | public int addStandardMethodList(Integer standardId, String tree) { |
| | | String[] trees = tree.split(" - "); |
| | | Map<String, String> map = standardMethodListMapper.selectStandardMethodById(standardId); |
| | | StandardMethodList list = new StandardMethodList(); |
| | | list.setCode(map.get("code")); |
| | | list.setName(map.get("name")); |
| | | list.setRemark(map.get("remark")); |
| | | list.setFactory(trees[0]); |
| | | try { |
| | | list.setLaboratory(trees[1]); |
| | | }catch (Exception e){} |
| | | try { |
| | | list.setSampleType(trees[2]); |
| | | }catch (Exception e){} |
| | | try { |
| | | list.setSample(trees[3]); |
| | | }catch (Exception e){} |
| | | try { |
| | | list.setModel(trees[4]); |
| | | }catch (Exception e){} |
| | | standardMethodListMapper.insert(list); |
| | | List<StandardProductList> standardProductLists = standardMethodListMapper.selectParameterList(list.getCode()); |
| | | for (StandardProductList standardProductList : standardProductLists) { |
| | | standardProductList.setStandardMethodListId(list.getId()); |
| | | standardProductList.setFactory(trees[0]); |
| | | try { |
| | | standardProductList.setLaboratory(trees[1]); |
| | | }catch (Exception e){} |
| | | try { |
| | | standardProductList.setSampleType(trees[2]); |
| | | }catch (Exception e){} |
| | | try { |
| | | standardProductList.setSample(trees[3]); |
| | | }catch (Exception e){} |
| | | try { |
| | | standardProductList.setModel(trees[4]); |
| | | }catch (Exception e){} |
| | | standardProductListMapper.insert(standardProductList); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, List<?>> selectsStandardMethodByFLSSM(String tree) { |
| | |
| | | return map; |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, List<?>> selectsStandardMethodByFLSSM2(String tree) { |
| | | String[] trees = tree.split(" - "); |
| | | List<StandardMethodList> standardMethodLists = null; |
| | | switch (trees.length){ |
| | | case 5: |
| | | standardMethodLists = standardMethodListMapper.selectStandardMethodLists2(trees[0],trees[1],trees[2],trees[3],trees[4]); |
| | | break; |
| | | case 4: |
| | | standardMethodLists = standardMethodListMapper.selectStandardMethodLists2(trees[0],trees[1],trees[2],trees[3],null); |
| | | break; |
| | | case 3: |
| | | standardMethodLists = standardMethodListMapper.selectStandardMethodLists2(trees[0],trees[1],trees[2],null,null); |
| | | break; |
| | | case 2: |
| | | standardMethodLists = standardMethodListMapper.selectStandardMethodLists2(trees[0],trees[1],null,null,null); |
| | | break; |
| | | case 1: |
| | | standardMethodLists = standardMethodListMapper.selectStandardMethodLists2(trees[0],null,null,null,null); |
| | | break; |
| | | } |
| | | Map<String, List<?>> map = new HashMap<>(); |
| | | map.put("standardMethodList", standardMethodLists); |
| | | return map; |
| | | } |
| | | |
| | | @Override |
| | | public int delStandardMethodByFLSSM(Integer id) { |
| | | standardProductListMapper.delete(Wrappers.<StandardProductList>lambdaUpdate().eq(StandardProductList::getStandardMethodListId, id)); |
| | | return standardMethodListMapper.deleteById(id); |
| | | } |
| | | @Override |
| | | public List<StandardMethodList> selectStandardMethodEnum() { |
| | | return standardMethodListMapper.selectListEnum(); |
| | |
| | | import com.ruoyi.basic.pojo.StandardProductListSupplierAsk; |
| | | import com.ruoyi.basic.pojo.StandardTree; |
| | | import com.ruoyi.basic.service.StandardProductListService; |
| | | import com.ruoyi.basic.service.StandardProductListService2; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | |
| | | private StandardTreeMapper standardTreeMapper; |
| | | |
| | | private StandardProductListService2 standardProductListService2; |
| | | |
| | | private IfsInventoryQuantityMapper ifsInventoryQuantityMapper; |
| | | |
| | | private StandardProductListSupplierAskMapper standardProductListSupplierAskMapper; |
| | |
| | | return standardProductListMapper.updateById(list); |
| | | } |
| | | |
| | | @Override |
| | | public int delStandardProduct(JSONArray list) { |
| | | return standardProductListMapper.deleteBatchIds(list); |
| | | } |
| | | |
| | | @Override |
| | | public List<StandardProductList> selectStandardProductList(InsSampleReceiveDto insSample) { |
| | |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public Map<String, Object> selectStandardProductListByMethodId(Integer id, String tree, Integer page) { |
| | | public Map<String, Object> selectStandardProductListByMethodId(Integer id, String tree) { |
| | | String[] trees = tree.split(" - "); |
| | | try { |
| | | String tree1 = trees[2]; |
| | | } catch (Exception e) { |
| | | throw new BaseException("æä½å¤ªå¿«,ç³»ç»ä¼ åé误!!!!"); |
| | | } |
| | | // 夿æ¯å¦ææ½ |
| | | boolean isDrag = false; |
| | | List<StandardProductList> list = new ArrayList<>(); |
| | | if (trees.length == 3) { |
| | |
| | | if (sp.getTemplateId() != null && !sp.getTemplateId().equals("")) { |
| | | pl.setTemplateId(sp.getTemplateId()); |
| | | } |
| | | //å ä¸ºè¿æä¸ªäº§åå«èå¼ çº¿å¤¹ æ¥ç»éå
· ,è¿ä¸¤ä¸ªé¡¹ç®çæ°æ®å®å
¨ä¸æ ·,ç¹æ®å¤ç |
| | | if (sp.getTree() != null && !sp.getTree().equals("") && !pl.getTree().equals("ä¸å¤©ç§ææ£æµä¸å¿ - çµå产åå®éªå®¤ - éå
· - èå¼ çº¿å¤¹ - null")) { |
| | | pl.setTree(sp.getTree()); |
| | | } |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | if (page == 1) { |
| | | Integer userId = SecurityUtils.getUserId().intValue(); |
| | | // CompletableFuture.supplyAsync(() -> { |
| | | if (trees.length == 5) { |
| | | standardProductListMapper.delete(Wrappers.<StandardProductList>lambdaUpdate() |
| | | .eq(StandardProductList::getStandardMethodListId, id) |
| | | .eq(StandardProductList::getTree, tree)); |
| | | } else { |
| | | standardProductListMapper.delete(Wrappers.<StandardProductList>lambdaUpdate() |
| | | .eq(StandardProductList::getStandardMethodListId, id) |
| | | .like(StandardProductList::getTree, tree)); |
| | | } |
| | | |
| | | try { |
| | | standardProductListService2.saveBatch(list.stream().map(a -> { |
| | | a.setFactory(trees[0]); |
| | | a.setLaboratory(trees[1]); |
| | | a.setSampleType(trees[2]); |
| | | a.setCreateUser(userId); |
| | | a.setUpdateUser(userId); |
| | | a.setStandardMethodListId(id); |
| | | return a; |
| | | }).collect(Collectors.toList())); |
| | | } catch (Exception e) { |
| | | // å¤çéå¤ ID çè®°å½ï¼éæ°çæ ID å¹¶ç»§ç»å°è¯æå
¥ |
| | | for (StandardProductList productList : list) { |
| | | productList.setId(IdWorker.getId()); |
| | | } |
| | | } |
| | | |
| | | Integer userId = SecurityUtils.getUserId().intValue(); |
| | | if (trees.length == 5) { |
| | | standardProductListMapper.delete(Wrappers.<StandardProductList>lambdaUpdate() |
| | | .eq(StandardProductList::getStandardMethodListId, id) |
| | | .eq(StandardProductList::getTree, tree)); |
| | | } else { |
| | | standardProductListMapper.delete(Wrappers.<StandardProductList>lambdaUpdate() |
| | | .eq(StandardProductList::getStandardMethodListId, id) |
| | | .like(StandardProductList::getTree, tree)); |
| | | } |
| | | Map<String, Object> map = new HashMap<>(); |
| | | |
| | | |
| | | List<StandardProductList> productLists = list.stream().map(a -> { |
| | | a.setFactory(trees[0]); |
| | | a.setLaboratory(trees[1]); |
| | | a.setSampleType(trees[2]); |
| | | a.setCreateUser(userId); |
| | | a.setUpdateUser(userId); |
| | | a.setStandardMethodListId(id); |
| | | return a; |
| | | }).collect(Collectors.toList()); |
| | | // this.saveBatch(productLists); |
| | | // æ¹éæ·»å æ å |
| | | baseMapper.saveBatchProductLists(productLists); |
| | | |
| | | |
| | | Collections.sort(list, (o1, o2) -> { |
| | | String field1 = o1.getManHourGroup(); |
| | | String field2 = o2.getManHourGroup(); |
| | |
| | | list.sort((o1, o2) -> (o1.getSort() == null ? 0 : o1.getSort()) |
| | | - (o2.getSort() == null ? 0 : o2.getSort())); |
| | | } |
| | | try { |
| | | map.put("productList", list.subList((page - 1) * 300, page * 300)); |
| | | } catch (IndexOutOfBoundsException e) { |
| | | map.put("productList", list.subList((page - 1) * 300, list.size())); |
| | | } |
| | | |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("productList", list); |
| | | map.put("total", list.size()); |
| | | return map; |
| | | } |
| | |
| | | |
| | | @Override |
| | | public void resetTreeDragBatch(List<StandardProductList> standardProductLists) { |
| | | standardProductListService2.updateBatchById(standardProductLists); |
| | | this.updateBatchById(standardProductLists); |
| | | } |
| | | |
| | | /** |
| | |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public int addStandardProduct(String ids, String tree) { |
| | | String[] trees = tree.split(" - "); |
| | | JSONArray jsonArray = JSON.parseArray(ids); |
| | | for (Object o : jsonArray) { |
| | | StandardProductList standardProductList = standardTreeMapper.selectStandardProductById(Integer.parseInt("" + o)); |
| | | standardProductList.setFactory(trees[0]); |
| | | try { |
| | | standardProductList.setLaboratory(trees[1]); |
| | | } catch (Exception e) { |
| | | } |
| | | try { |
| | | standardProductList.setSampleType(trees[2]); |
| | | } catch (Exception e) { |
| | | } |
| | | try { |
| | | standardProductList.setSample(trees[3]); |
| | | } catch (Exception e) { |
| | | } |
| | | try { |
| | | standardProductList.setModel(trees[4]); |
| | | } catch (Exception e) { |
| | | } |
| | | standardProductListMapper.insert(standardProductList); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | @Override |
| | | public List<SampleTypeDto> getStandardTree2() { |
| | | return standardTreeMapper.getStandardTree2(); |
| | | } |
| | |
| | | <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> |
| | | <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/> |
| | | </resultMap> |
| | | |
| | | <!-- æ¹éæ·»å æ£æµæ å --> |
| | | <insert id="saveBatchProductLists"> |
| | | INSERT INTO standard_product_list (id, inspection_item, inspection_item_en, inspection_item_subclass, inspection_item_subclass_en, factory, laboratory, sample_type, sample, model, son_laboratory, unit, price, man_hour, man_hour_group, inspection_item_type, inspection_value_type, checkout_number, section, cores, method, method_s, man_day, bsm, ask, tell, standard_method_list_id, template_id, state, dic, tree, structure_item_parameter_id, inspection_item_class, inspection_item_class_en, radius, radius_list, rates, sort, conductor_material, conductor_type) |
| | | VALUES |
| | | <foreach item="item" collection="productLists" open="(" separator="),(" close=")"> |
| | | #{item.id}, #{item.inspectionItem}, #{item.inspectionItemEn}, #{item.inspectionItemSubclass}, #{item.inspectionItemSubclassEn}, #{item.factory}, #{item.sonLaboratory}, #{item.sampleType}, #{item.sample}, #{item.model}, #{item.sonLaboratory}, #{item.unit}, #{item.price}, #{item.manHour}, #{item.manHourGroup}, #{item.inspectionItemType}, #{item.inspectionValueType}, #{item.checkoutNumber}, #{item.section}, #{item.cores}, #{item.method}, #{item.methodS}, #{item.manDay}, #{item.bsm}, #{item.ask}, #{item.tell}, #{item.standardMethodListId}, #{item.templateId}, #{item.state}, #{item.dic}, #{item.tree}, #{item.structureItemParameterId}, |
| | | #{item.inspectionItemClass}, #{item.inspectionItemClassEn}, #{item.radius}, #{item.radiusList}, #{item.rates}, #{item.sort}, #{item.conductorMaterial}, #{item.conductorType} |
| | | </foreach> |
| | | |
| | | </insert> |
| | | |
| | | |
| | | <update id="updateSection"> |
| | | UPDATE standard_product_list |
| | | SET price=#{productList.price}, |
| | |
| | | */ |
| | | |
| | | @ApiOperation(value = "å é¤å
审管ççº æ£æªæ½éä»¶") |
| | | @GetMapping("/delInternalCorrectFile") |
| | | @DeleteMapping("/delInternalCorrectFile") |
| | | public Result delInternalCorrectFile(Integer correctFileId){ |
| | | return Result.success(internalCorrectFileMapper.deleteById(correctFileId)); |
| | | } |
| | |
| | | */ |
| | | |
| | | @ApiOperation(value = "å
审宿½è®¡åå é¤") |
| | | @GetMapping("/delInternalImplement") |
| | | @DeleteMapping("/delInternalImplement") |
| | | public Result delInternalImplement(Integer implementId){ |
| | | return Result.success(internalImplementService.delInternalImplement(implementId)); |
| | | } |
| | |
| | | */ |
| | | |
| | | @ApiOperation(value = "å
审ä¼è®®å é¤") |
| | | @GetMapping("/delInternalMeeting") |
| | | @DeleteMapping("/delInternalMeeting") |
| | | public Result delInternalMeeting(Integer meetingId){ |
| | | return Result.success(internalMeetingService.delInternalMeeting(meetingId)); |
| | | } |
| | |
| | | */ |
| | | |
| | | @ApiOperation(value = "å
审年度计åå é¤") |
| | | @GetMapping("/delInternalPlan") |
| | | @DeleteMapping("/delInternalPlan") |
| | | public Result delInternalPlan(Integer planId){ |
| | | return Result.success(internalPlanService.delInternalPlan(planId)); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.task; |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.ruoyi.common.core.domain.entity.User; |
| | | import com.ruoyi.common.utils.WxCpUtils; |
| | | import com.ruoyi.personnel.mapper.PersonTrainingDetailedMapper; |
| | | import com.ruoyi.personnel.pojo.PersonTrainingDetailed; |
| | | import com.ruoyi.system.mapper.UserMapper; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.time.LocalDateTime; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * å¹è®è®¡åä½¿ç¨æéè®°å½æé |
| | | */ |
| | | @Component |
| | | public class PersonTrainingSchedule { |
| | | @Resource |
| | | private PersonTrainingDetailedMapper personTrainingDetailedMapper; |
| | | @Resource |
| | | private UserMapper userMapper; |
| | | @Resource |
| | | private ThreadPoolTaskExecutor threadPoolTaskExecutor; |
| | | |
| | | /** |
| | | * æéå¡«å设å¤ä½¿ç¨è®°å½ |
| | | */ |
| | | // @Scheduled(cron = "0/5 * * * * *") |
| | | @Scheduled(cron = "0 0 9 1 * *") // æ¯æä¸å·æ§è¡ |
| | | public void task1() { |
| | | // æ¥è¯¢å½æå¹è®è®¡å |
| | | DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy.M"); |
| | | String format = LocalDateTime.now().format(formatter); |
| | | List<PersonTrainingDetailed> personTrainingDetaileds = personTrainingDetailedMapper.selectList(Wrappers.<PersonTrainingDetailed>lambdaQuery() |
| | | .eq(PersonTrainingDetailed::getTrainingDate, format)); |
| | | |
| | | for (PersonTrainingDetailed personTrainingDetailed : personTrainingDetaileds) { |
| | | threadPoolTaskExecutor.execute(() -> { |
| | | // æ¥è¯¢å¹è®è®²å¸ |
| | | User user = userMapper.selectById(personTrainingDetailed.getTrainingLecturerId()); |
| | | // ä¼ä¸å¾®ä¿¡éç¥å¹è® |
| | | String message = ""; |
| | | message += "人åå¹è®è®¡åæééç¥"; |
| | | message += "\nå¹è®ç®æ : " + personTrainingDetailed.getTrainingObjectives(); |
| | | message += "\nå¹è®å
容: " + personTrainingDetailed.getTrainingContent(); |
| | | message += "\nåå 对象: " + personTrainingDetailed.getParticipants(); |
| | | message += "\nå¹è®æ¥æ: " + personTrainingDetailed.getTrainingDate(); |
| | | message += "\n计å彿è¿è¡å¹è®"; |
| | | |
| | | //åéä¼ä¸å¾®ä¿¡æ¶æ¯éç¥ |
| | | try { |
| | | WxCpUtils.inform(user.getAccount(), message, null); |
| | | } catch (Exception e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | package com.ruoyi.process.service.impl; |
| | | |
| | | import cn.hutool.core.date.DateUtil; |
| | | import com.alibaba.excel.EasyExcel; |
| | | import com.alibaba.excel.ExcelWriter; |
| | | import com.alibaba.excel.write.metadata.WriteSheet; |
| | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.basic.pojo.StandardTemplate; |
| | | import com.ruoyi.common.numgen.NumberGenerator; |
| | | import com.ruoyi.common.utils.QueryWrappers; |
| | | import com.ruoyi.framework.exception.ErrorException; |
| | | import com.ruoyi.inspect.mapper.InsReportMapper; |
| | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.net.URLEncoder; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | @Resource |
| | | private InsSampleMapper insSampleMapper; |
| | | |
| | | @Resource |
| | | private NumberGenerator<ProcessComplain> numberGenerator; |
| | | |
| | | |
| | | @Override |
| | | public IPage<ProcessComplain> pageProcessComplain(Page page, ProcessComplain processComplain) { |
| | |
| | | throw new ErrorException("æ ·åç¼å·è¾å
¥æè¯¯"); |
| | | } |
| | | //æè¯ç¼å·çæ |
| | | //todo giveCode |
| | | // String giveCode = this.giveCode.giveCode("JCZX-", "cnas_process_complain", "", "yyMMdd"); |
| | | // processComplain.setComplainNo(giveCode); |
| | | String giveCode = numberGenerator.generateNumberWithPrefix(3, |
| | | "JCZX-" + DateUtil.format(new Date(), "yyMMdd"), |
| | | ProcessComplain::getComplainNo); |
| | | processComplain.setComplainNo(giveCode); |
| | | return processComplainMapper.insert(processComplain); |
| | | } |
| | | |
| | |
| | | import com.ruoyi.basic.pojo.IfsInventoryQuantity; |
| | | import com.ruoyi.basic.pojo.StandardTemplate; |
| | | import com.ruoyi.basic.service.StandardTemplateService; |
| | | import com.ruoyi.common.constant.DictDataConstants; |
| | | import com.ruoyi.common.constant.InsOrderTypeConstants; |
| | | import com.ruoyi.common.core.domain.entity.Custom; |
| | | import com.ruoyi.common.core.domain.entity.InformationNotification; |
| | |
| | | standardMethod2.append("ã").append(s); |
| | | } |
| | | standardMethod2.replace(0, 1, ""); |
| | | // todo: æ¥è¯¢åå
¸æ£æµç±»å |
| | | // List<SysDictData> sysDictData = iSysDictTypeService.selectDictDataByName(""); |
| | | String orderType = null; |
| | | |
| | | // æ ·åç±»å |
| | | String orderType = iSysDictTypeService.selectLabelByDict(DictDataConstants.CHECK_TYPE, insOrder.getOrderType()); |
| | | |
| | | List<RowRenderData> rows = new ArrayList<>(); |
| | | List<TextRenderData> text = new ArrayList<>(); |
| | |
| | | String modelStr = CollUtil.join(models, "\n"); |
| | | String finalModelStr = modelStr; |
| | | |
| | | // todo: æ¥è¯¢åå
¸ |
| | | // List<SysDictData> sysDictData = iSysDictTypeService.selectDictDataByName(""); |
| | | // æ£æµç±»å |
| | | String orderType = null; |
| | | String formType = null; |
| | | orderType = iSysDictTypeService.selectLabelByDict(DictDataConstants.CHECK_TYPE, insOrder.getOrderType()); |
| | | // å¤æç¬¬ä¸ä¸ªåå
¸æ¯å¦ä¸ºç©º |
| | | if (StringUtils.isBlank(orderType)) { |
| | | orderType = iSysDictTypeService.selectLabelByDict(DictDataConstants.CHECK_TYPE1, insOrder.getOrderType()); |
| | | } |
| | | |
| | | // æ¥æ ·æ¹å¼ |
| | | String formType = iSysDictTypeService.selectLabelByDict(DictDataConstants.FORM_TYPE, insOrder.getFormType()); |
| | | |
| | | // æ ·åç¶æ |
| | | String sampleStatus = null; |
| | | String sampleStatus = iSysDictTypeService.selectLabelByDict(DictDataConstants.SAMPLE_STATUS_LIST, insOrder.getSampleStatus());; |
| | | |
| | | ConfigureBuilder builder = Configure.builder(); |
| | | builder.useSpringEL(true); |
| | | List<Map<String, String>> finalDeviceList = deviceList; |
| | | Integer userId = insSampleUserMapper.selectOne(Wrappers.<InsSampleUser>lambdaQuery().eq(InsSampleUser::getInsSampleId, orderId).last("limit 1")).getUserId(); |
| | | Custom custom = customMapper.selectById(insOrder.getCompanyId()); |
| | | |
| | | // æ¥è¯¢å¤ææ¯å¦æä¸å¤å®é¡¹ç®,åå
¨é½æ¯å¤å®é¡¹ |
| | |
| | | |
| | | String finalResultCh = resultCh; |
| | | String finalResultEn = resultEn; |
| | | String finalOrderType = orderType; |
| | | InputStream inputStream = this.getClass().getResourceAsStream("/static/report-template.docx"); |
| | | XWPFTemplate template = XWPFTemplate.compile(inputStream, builder.build()).render( |
| | | new HashMap<String, Object>() {{ |
| | |
| | | put("images", images); |
| | | put("examineUrl", null); |
| | | put("ratifyUrl", null); |
| | | put("orderType", orderType); |
| | | put("orderType", finalOrderType); |
| | | put("getTime", finalSendTime.format(DateTimeFormatter.ofPattern("yyyyå¹´MMæddæ¥"))); |
| | | put("getTimeEn", monthNames[finalSendTime.getMonthValue() - 1] + " " + finalSendTime.format(DateTimeFormatter.ofPattern("dd, yyyy"))); |
| | | put("seal1", null); |
| | |
| | | public class InsOrderPlanVO{ |
| | | |
| | | |
| | | private String id; |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("å§æç¼å·") |
| | | private String entrustCode; |
| | |
| | | private String tempUrlPdf; |
| | | |
| | | @ApiModelProperty("æ¥åid") |
| | | private String insReportId; |
| | | private Integer insReportId; |
| | | |
| | | } |
| | |
| | | private UserService userService; |
| | | |
| | | /** |
| | | * type : 1: è·åæ£æµäººåä¿¡æ¯ |
| | | * todo: type : 1: è·åæ£æµäººåä¿¡æ¯ |
| | | type : 2: è·åå½åé¨é¨(å®éªå®¤äººå) |
| | | * @param user |
| | | * @param type |
| | | * @return |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.common.constant; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * åå
¸ç±»å |
| | | * |
| | | * @Author zhuo |
| | | * @Date 2025/2/25 |
| | | */ |
| | | public class DictDataConstants { |
| | | |
| | | // æ£éªç±»å(åææ) |
| | | public static final String CHECK_TYPE = "check_type"; |
| | | |
| | | // æ£éªç±»å(æå) |
| | | public static final String CHECK_TYPE1 = "check_type1"; |
| | | |
| | | // æ¥æ ·æ¹å¼ |
| | | public static final String FORM_TYPE = "form_type"; |
| | | |
| | | // æ ·åç¶æ |
| | | public static final String SAMPLE_STATUS_LIST = "sample_status_list"; |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.common.core.domain.entity.SysDictType; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * åå
¸è¡¨ æ°æ®å± |
| | |
| | | */ |
| | | public SysDictType checkDictTypeUnique(String dictType); |
| | | |
| | | /** |
| | | * æ ¹æ®åå
¸åç§°æ¥è¯¢åå
¸æ°æ® |
| | | * |
| | | * @param dictName åå
¸åç§° |
| | | * @return åå
¸æ°æ®éåä¿¡æ¯ |
| | | */ |
| | | List<SysDictType> selectList(String dictName); |
| | | |
| | | /** |
| | | * æ ¹æ®åå
¸ç¼å·, åå
¸å¼valueæ¥è¯¢labelå
容 |
| | | * |
| | | * @param dictType åå
¸ç±»å |
| | | * @param dictValue åå
¸å¼ |
| | | * @return ç»æ |
| | | */ |
| | | String selectLabelByDict(@Param("dictType") String dictType, @Param("dictValue") String dictValue); |
| | | } |
| | |
| | | * @return ç»æ |
| | | */ |
| | | public boolean checkDictTypeUnique(SysDictType dictType); |
| | | |
| | | /** |
| | | * æ ¹æ®åå
¸ç¼å·, åå
¸å¼valueæ¥è¯¢labelå
容 |
| | | * |
| | | * @param dictType åå
¸ç±»å |
| | | * @param dictValue åå
¸å¼ |
| | | * @return ç»æ |
| | | */ |
| | | public String selectLabelByDict(String dictType, String dictValue); |
| | | } |
| | |
| | | } |
| | | return UserConstants.UNIQUE; |
| | | } |
| | | |
| | | /** |
| | | * æ ¹æ®åå
¸ç¼å·, åå
¸å¼valueæ¥è¯¢labelå
容 |
| | | * |
| | | * @param dictType åå
¸ç±»å |
| | | * @param dictValue åå
¸å¼ |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public String selectLabelByDict(String dictType, String dictValue) { |
| | | return dictTypeMapper.selectLabelByDict(dictType, dictValue); |
| | | } |
| | | } |
| | |
| | | from sys_dict_type |
| | | where dict_name = #{dictName} |
| | | </select> |
| | | |
| | | <!-- æ ¹æ®åå
¸ç¼å·, åå
¸å¼valueæ¥è¯¢labelå
容 --> |
| | | <select id="selectLabelByDict" resultType="java.lang.String"> |
| | | select dict_label |
| | | from sys_dict_data |
| | | where dict_type = #{dictType} |
| | | and dict_value = #{dictValue} |
| | | </select> |
| | | </mapper> |
| | |
| | | <if test="userName != null and userName != ''"> |
| | | AND u.account like concat('%', #{userName}, '%') |
| | | </if> |
| | | <if test="nickName != null and nickName != ''"> |
| | | AND u.name like concat('%', #{nickName}, '%') |
| | | </if> |
| | | <if test="status != null and status != ''"> |
| | | AND u.status = #{status} |
| | | </if> |