Merge remote-tracking branch 'origin/master'
# Conflicts:
# sys/src/main/resources/application-dev.yml
| | |
| | | package com.yuanchu.limslaboratory.annotation; |
| | | |
| | | import java.lang.annotation.ElementType; |
| | | import java.lang.annotation.Retention; |
| | | import java.lang.annotation.RetentionPolicy; |
| | | import java.lang.annotation.Target; |
| | | import com.yuanchu.limslaboratory.enums.InterfaceType; |
| | | import com.yuanchu.limslaboratory.enums.MenuEnums; |
| | | |
| | | import java.lang.annotation.*; |
| | | |
| | | /** |
| | | * @author å¼ å®¾ |
| | | */ |
| | | @Target({ElementType.METHOD, ElementType.TYPE}) |
| | | @Retention(RetentionPolicy.RUNTIME) |
| | | @Documented |
| | | public @interface AuthHandler { |
| | | |
| | | /** |
| | | * æ¥å£ç±»å |
| | | * @return |
| | | */ |
| | | int type() default 0; |
| | | |
| | | InterfaceType type() default InterfaceType.NUll; |
| | | |
| | | /** |
| | | * æ¥å£å |
| | | * èåid |
| | | * @return |
| | | */ |
| | | String name() default ""; |
| | | MenuEnums menuId() default MenuEnums.NUll; |
| | | |
| | | /** |
| | | * æ¯å¦éè¦æ·»å æ°æ®åº |
| | | * @return |
| | | */ |
| | | boolean isAdd() default false; |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.limslaboratory.enums; |
| | | |
| | | /** |
| | | * @Author å¼ å®¾ |
| | | * @Date 2023/8/30 |
| | | */ |
| | | public enum InterfaceType { |
| | | |
| | | /** |
| | | * æ¥å£ç±»å |
| | | */ |
| | | SELECT("select",0), |
| | | ADD("add",1), |
| | | UPDATE("update",2), |
| | | DELETE("delete",3), |
| | | NUll(); |
| | | |
| | | |
| | | private String type; |
| | | |
| | | private Integer num; |
| | | |
| | | public String getType() { |
| | | return type; |
| | | } |
| | | |
| | | InterfaceType() { |
| | | } |
| | | |
| | | public void setType(String type) { |
| | | this.type = type; |
| | | } |
| | | |
| | | public Integer getNum() { |
| | | return this.num; |
| | | } |
| | | |
| | | public void setNum(Integer num) { |
| | | this.num = num; |
| | | } |
| | | |
| | | InterfaceType(String type, Integer num) { |
| | | this.type = type; |
| | | this.num = num; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.limslaboratory.enums; |
| | | |
| | | /** |
| | | * @Author å¼ å®¾ |
| | | * @Date 2023/8/29 |
| | | */ |
| | | public enum MenuEnums { |
| | | /** |
| | | * ç©ºæ ¼åºååè½æ¨¡å |
| | | */ |
| | | standardLibrary("æ ååº",1), |
| | | index("æ ååº",38), |
| | | |
| | | inspectionManagement("æ¥æ£ç®¡ç",2), |
| | | commissionInspection("å§ææ£éª",3), |
| | | reportForInspection("åæææ¥æ£",4), |
| | | |
| | | experiment("è¯éªç®¡ç",5), |
| | | inspectionApplication("æ°å¢æ£éª",6), |
| | | planAssignments("æ£éªè®¡å",7), |
| | | checkTheReport("æ£éªæ¥å",8), |
| | | reportAuditing("æ¥åå®¡æ ¸",9), |
| | | nonConformanceReview("ä¸åæ ¼ååé¦",10), |
| | | nonConformingFeedback("ä¸åæ ¼åè¯å®¡",11), |
| | | passRateStatistics("åæ ¼çç»è®¡",12), |
| | | |
| | | laboratory("å®éªå®¤ç®¡ç",13), |
| | | ledger("设å¤å°è´¦",14), |
| | | measure("计é管ç",15), |
| | | gather("设å¤éé",16), |
| | | personnel("人å管ç",17), |
| | | org("ç»ç»æ¶æ",36), |
| | | role("è§è²ç®¡ç",37), |
| | | |
| | | laboratoryManage("å®éªå®¤ç®¡ç",18), |
| | | CNAS("CNS管ç",19), |
| | | reviewAnnualPlan("å®¡æ ¸å¹´åº¦è®¡å",20), |
| | | nonConformanceManage("ä¸ç¬¦å项管ç",21), |
| | | nonConformanceStatistics("ä¸ç¬¦å项ç»è®¡",22), |
| | | satisfactionSurveys("满æåº¦è°æ¥",23), |
| | | |
| | | chart("æºè½å¾è¡¨",24), |
| | | center("å®éªä¸å¿",25), |
| | | spc("SPCæ§å¶å¾",26), |
| | | shota("æ£å¤ªåå¸å¾",27), |
| | | work("å·¥ä½ç»è®¡",28), |
| | | |
| | | message("æ¶æ¯ä»£å",29), |
| | | mymessage("æçæ¶æ¯",30), |
| | | toDo("æç代å",31), |
| | | |
| | | personal("个人管ç",32), |
| | | myInformation("æçä¿¡æ¯",33), |
| | | |
| | | baseData("åºç¡æ°æ®",34), |
| | | basicDataMessage("åºç¡æ°æ®",35), |
| | | |
| | | home("主页",39), |
| | | |
| | | /** |
| | | * 空 |
| | | */ |
| | | NUll(); |
| | | MenuEnums() { |
| | | } |
| | | |
| | | private String name; |
| | | |
| | | private Integer id; |
| | | |
| | | MenuEnums(String name, Integer id) { |
| | | this.name = name; |
| | | this.id = id; |
| | | } |
| | | |
| | | public String getName() { |
| | | return name; |
| | | } |
| | | |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | |
| | | public Integer getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(Integer id) { |
| | | this.id = id; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.limslaboratory.utils; |
| | | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.core.io.Resource; |
| | | import org.springframework.core.io.support.PathMatchingResourcePatternResolver; |
| | | import org.springframework.core.io.support.ResourcePatternResolver; |
| | | import org.springframework.core.type.classreading.CachingMetadataReaderFactory; |
| | | import org.springframework.core.type.classreading.MetadataReader; |
| | | import org.springframework.core.type.classreading.MetadataReaderFactory; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.util.ClassUtils; |
| | | |
| | | import java.io.IOException; |
| | | import java.util.ArrayList; |
| | | import java.util.Enumeration; |
| | | import java.util.List; |
| | | import java.util.jar.JarEntry; |
| | | import java.util.jar.JarFile; |
| | | import java.io.File; |
| | | import java.net.JarURLConnection; |
| | | import java.net.URL; |
| | | |
| | | /** |
| | | * @author å¼ å®¾ |
| | | */ |
| | | @Component |
| | | @Slf4j |
| | | public class MyClassUtil { |
| | | |
| | | private final static String RESOURCE_PATTERN = "/**/*.class"; |
| | | |
| | | /** |
| | | * éè¿å
åè·å项ç®å
䏿æç±» |
| | | * |
| | | * @param BASE_PACKAGE å
å |
| | | * @return |
| | | */ |
| | | public static List<Class<?>> getClassList(String BASE_PACKAGE) { |
| | | List<Class<?>> classes = new ArrayList<>(); |
| | | //springå·¥å
·ç±»ï¼å¯ä»¥è·åæå®è·¯å¾ä¸çå
¨é¨ç±» |
| | | ResourcePatternResolver resourcePatternResolver = new PathMatchingResourcePatternResolver(); |
| | | try { |
| | | String pattern = ResourcePatternResolver.CLASSPATH_ALL_URL_PREFIX + |
| | | ClassUtils.convertClassNameToResourcePath(BASE_PACKAGE) + RESOURCE_PATTERN; |
| | | Resource[] resources = resourcePatternResolver.getResources(pattern); |
| | | //MetadataReader çå·¥åç±» |
| | | MetadataReaderFactory readerfactory = new CachingMetadataReaderFactory(resourcePatternResolver); |
| | | for (Resource resource : resources) { |
| | | //ç¨äºè¯»åç±»ä¿¡æ¯ |
| | | MetadataReader reader = readerfactory.getMetadataReader(resource); |
| | | //æ«æå°çclass |
| | | String classname = reader.getClassMetadata().getClassName(); |
| | | log.info("classname={}", classname); |
| | | Class<?> clazz = Class.forName(classname); |
| | | classes.add(clazz); |
| | | } |
| | | } catch (Exception e) { |
| | | log.error("è·åclasså¼å¸¸:", e); |
| | | } |
| | | return classes; |
| | | } |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | import com.yuanchu.limslaboratory.annotation.AuthHandler; |
| | | import com.yuanchu.limslaboratory.mapper.InstrumentMapper; |
| | | import com.yuanchu.limslaboratory.mapper.UserMapper; |
| | | import com.yuanchu.limslaboratory.pojo.Inspection; |
| | | import com.yuanchu.limslaboratory.pojo.Report; |
| | |
| | | |
| | | @Resource |
| | | UserMapper userMapper; |
| | | |
| | | @Resource |
| | | private InstrumentMapper instrumentMapper; |
| | | |
| | | @ApiOperation(value = "æ¥è¯¢æ£éªç³è¯·åå表") |
| | | @ApiImplicitParams(value = { |
| | |
| | | |
| | | @ApiOperation(value = "æ°å¢æ£éªå") |
| | | @PostMapping("/addInspect") |
| | | public Result addInspect(@RequestHeader("token") String token, @Validated @RequestBody InspectionVo inspectionVo) throws Exception { |
| | | @AuthHandler |
| | | public Result addInspect(@RequestHeader("X-Token") String token, @Validated @RequestBody InspectionVo inspectionVo) throws Exception { |
| | | Object object = RedisUtil.get(token); |
| | | Map<String, Object> unmarshal = JackSonUtil.unmarshal(JackSonUtil.marshal(object), Map.class); |
| | | return Result.success(inspectionService.addInspect((Integer) unmarshal.get("id"), inspectionVo)); |
| | |
| | | @ApiImplicitParam(name = "id", value = "æ£éªåid", dataTypeClass = Integer.class, required = true) |
| | | }) |
| | | @GetMapping("/selectInspectsListById") |
| | | @AuthHandler |
| | | public Result selectInspectsListById(Integer id) { |
| | | return Result.success(inspectionService.selectInspectsListById(id)); |
| | | } |
| | | |
| | | @ApiOperation(value = "éæ©æ£éªé¡¹ç®ç责任人") |
| | | @GetMapping("/selectUser") |
| | | @AuthHandler |
| | | public Result selectUser() { |
| | | return Result.success(userMapper.selectUser()); |
| | | } |
| | | |
| | | @ApiOperation(value = "éæ©æ£éªè®¾å¤") |
| | | @GetMapping("/selectEquipment") |
| | | @AuthHandler |
| | | public Result selectEquipment(){return Result.success(instrumentMapper.getInstrument());} |
| | | |
| | | @ApiOperation(value = "ä¿åæ£éªé¡¹ç®è´£ä»»äºº") |
| | | @ApiImplicitParams(value = { |
| | |
| | | @ApiImplicitParam(name = "userProId", value = "责任人id", dataTypeClass = Integer.class, required = true) |
| | | }) |
| | | @GetMapping("/chooseUseProId") |
| | | @AuthHandler |
| | | public Result chooseUseProId(Integer id, Integer userProId) { |
| | | return Result.success(inspectionService.chooseUseProId(id, userProId)); |
| | | } |
| | | |
| | | @ApiOperation("ä¿å设å¤id") |
| | | @GetMapping("/chooseEquipment") |
| | | @AuthHandler |
| | | public Result chooseEquipment(Integer id,Integer equipmentId){ |
| | | return Result.success(inspectionService.chooseEquipment(id, equipmentId)); |
| | | } |
| | | |
| | | @ApiOperation(value = "ä½åºæ£éªå") |
| | |
| | | @ApiImplicitParam(name = "id", value = "æ£éªåid", dataTypeClass = Integer.class, required = true) |
| | | }) |
| | | @PostMapping("/delInspect") |
| | | @AuthHandler |
| | | public Result delInspect(Integer id) { |
| | | return Result.success(inspectionService.delInspect(id)); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.IdWorker; |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.limslaboratory.annotation.AuthHandler; |
| | | import com.yuanchu.limslaboratory.enums.InterfaceType; |
| | | import com.yuanchu.limslaboratory.enums.MenuEnums; |
| | | import com.yuanchu.limslaboratory.pojo.LinkBasicInformation; |
| | | import com.yuanchu.limslaboratory.service.LinkBasicInformationService; |
| | | import com.yuanchu.limslaboratory.utils.MyUtil; |
| | | import com.yuanchu.limslaboratory.utils.RedisUtil; |
| | |
| | | return Result.success(map); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®idæ¥è¯¢Specifications表çName") |
| | | @GetMapping("/getSpecificationsName") |
| | | public Result<?> getSpecificationsName(String id){ |
| | | return Result.success(linkBasicInformationService.getSpecificationsName(id)); |
| | | } |
| | | |
| | | @ApiOperation("å é¤") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(name = "id", value = "å§ææ ·åid", dataTypeClass = Integer.class, required = true) |
| | | }) |
| | | @PostMapping("/delLink") |
| | | @AuthHandler(type = InterfaceType.DELETE,menuId = MenuEnums.commissionInspection,isAdd = true) |
| | | public Result<?> delLink(Integer id){ |
| | | linkBasicInformationService.delLink(id); |
| | | return Result.success("å 餿å!"); |
| | | } |
| | | |
| | | } |
| | |
| | | @Resource |
| | | ProductService productService; |
| | | |
| | | |
| | | |
| | | @ApiOperation("龿¥-->è·åæ ·ååç§°") |
| | | @GetMapping("/material") |
| | | @AuthHandler |
| | | public Result<?> getMaterialIdAndName(@RequestHeader("link") String link) { |
| | | String redisLink = RedisUtil.get("viewId").toString(); |
| | | if (linkBasicInformationService.isIfViewUUID(redisLink)){ |
| | |
| | | |
| | | @ApiOperation("龿¥-->è·åè§æ ¼åå·") |
| | | @GetMapping("/specification") |
| | | @AuthHandler |
| | | public Result<?> getSpecificationIdAndName(@RequestHeader("link") String link, String materialId) { |
| | | String redisLink = RedisUtil.get("viewId").toString(); |
| | | if (linkBasicInformationService.isIfViewUUID(redisLink)){ |
| | |
| | | @ApiImplicitParam(name = "modelId", value = "åå·id", dataTypeClass = Integer.class, required = true) |
| | | }) |
| | | @GetMapping("/chooseProject") |
| | | @AuthHandler |
| | | public Result<?> chooseProject(@RequestHeader("link") String link, Integer modelId) { |
| | | String redisLink = RedisUtil.get("viewId").toString(); |
| | | if (linkBasicInformationService.isIfViewUUID(redisLink)){ |
| | |
| | | |
| | | @ApiOperation("龿¥-->æ·»å å§ææ¥æ£ç³è¯·å") |
| | | @PostMapping("/addInspection") |
| | | @AuthHandler |
| | | public Result<?> addLinkBasicInformation(@RequestHeader("link") String link, @RequestBody LinkBasicInformation linkBasicInformation) { |
| | | String redisLink = RedisUtil.get("viewId").toString(); |
| | | if (linkBasicInformationService.isIfViewUUID(redisLink)){ |
| | |
| | | |
| | | @ApiOperation(value = "çæäºç»´ç æéçå¯ä¸ç ") |
| | | @GetMapping("/getViewUUID") |
| | | @AuthHandler |
| | | public Result<?> getViewUUID(int day){ |
| | | return Result.success("çææå",linkBasicInformationService.getViewUUID(day)); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ¥è¯¢äºç»´ç æéçå¯ä¸ç ") |
| | | @GetMapping("/selectViewUUID") |
| | | @AuthHandler |
| | | public Result<?> selectViewUUID(){ |
| | | return Result.success("æ¥è¯¢æå",linkBasicInformationService.selectViewUUID()); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ£éªå¯ä¸ç æ¯å¦ææ") |
| | | @GetMapping("/isIfViewUUID") |
| | | @AuthHandler |
| | | public Result<?> isIfViewUUID(String viewId){ |
| | | return Result.success("æ¥è¯¢æå",linkBasicInformationService.isIfViewUUID(viewId)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("è·åæ ·åä¿¡æ¯ä»¥åå§æä¿¡æ¯") |
| | | @GetMapping("/getContractsSampleInfo") |
| | | public Result<?> getContractsSampleInfo(String viewId){ |
| | | return Result.success(linkBasicInformationService.getContractsSampleInfo(viewId)); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.yuanchu.limslaboratory.pojo.LinkBasicInformation; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.yuanchu.limslaboratory.pojo.vo.InspectionVo; |
| | | import com.yuanchu.limslaboratory.pojo.vo.LinkBasicInformationVo; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | List<Map<String, Object>> selectLinkAll(); |
| | | |
| | | |
| | | LinkBasicInformation getLinkBasicInformation(@Param("uid")String uid); |
| | | |
| | | int deleteByID(Integer id); |
| | | } |
| | |
| | | */ |
| | | public interface LinkDetectionMapper extends MyBaseMapper<LinkDetection> { |
| | | |
| | | int deleteByLinkbasic(Integer id); |
| | | } |
| | |
| | | @ApiModelProperty(value = "姿夿³¨", example = "姿夿³¨YPBH123456789YPBH123456789YPBH123456789") |
| | | private String entrustRemarks; |
| | | |
| | | @ApiModelProperty(value = "æ£éªæ¶é´", hidden = true) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date insTime; |
| | | |
| | | @TableLogic(value = "1", delval = "0") |
| | | @ApiModelProperty(value = "é»è¾å é¤ æ£å¸¸>=1,å é¤<=0", hidden = true) |
| | | private Integer state; |
| | |
| | | @ApiModelProperty(value = "LinkBasicInformation对象Id", hidden = true) |
| | | private Integer linkBasicId; |
| | | |
| | | @TableLogic(value = "1", delval = "0") |
| | | |
| | | @ApiModelProperty(value = "é»è¾å é¤ æ£å¸¸>=1,å é¤<=0", hidden = true) |
| | | private Integer state; |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.limslaboratory.pojo.vo; |
| | | |
| | | import com.yuanchu.limslaboratory.pojo.LinkBasicInformation; |
| | | import com.yuanchu.limslaboratory.pojo.LinkDetection; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @Author å¼ å®¾ |
| | | * @Date 2023/8/29 |
| | | */ |
| | | @EqualsAndHashCode(callSuper = true) |
| | | @Data |
| | | public class LinkBasicInformationVo extends LinkBasicInformation implements Serializable{ |
| | | |
| | | /** |
| | | *æ ·åä¿¡æ¯ |
| | | */ |
| | | private List<LinkDetection> detectionList; |
| | | |
| | | |
| | | } |
| | |
| | | */ |
| | | String chooseUseProId(Integer id, Integer userProId); |
| | | |
| | | |
| | | /** |
| | | * ä¿åè®¾å¤ |
| | | * @param id |
| | | * @param equipmentId |
| | | * @return |
| | | */ |
| | | boolean chooseEquipment(Integer id, Integer equipmentId); |
| | | } |
| | | |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.limslaboratory.pojo.LinkBasicInformation; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.yuanchu.limslaboratory.pojo.Specifications; |
| | | import com.yuanchu.limslaboratory.pojo.vo.InspectionVo; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | |
| | | Map<String, String> selectViewUUID(); |
| | | |
| | | boolean isIfViewUUID(String uuid); |
| | | |
| | | LinkBasicInformation getContractsSampleInfo(String viewId); |
| | | |
| | | //æ ¹æ®å§ææ ·åidå é¤ |
| | | void delLink(Integer id); |
| | | |
| | | Specifications getSpecificationsName(String id); |
| | | } |
| | |
| | | package com.yuanchu.limslaboratory.service.impl; |
| | | |
| | | import cn.hutool.core.date.DateUtil; |
| | | import cn.hutool.core.lang.Snowflake; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | |
| | | RawMaterial rawMaterial = new RawMaterial(); |
| | | rawMaterial.setId(inspectionVo.getId()); |
| | | rawMaterial.setType(1); |
| | | rawMaterial.setInspectionDate(DateUtil.date()); |
| | | rawMaterial.setSurveyor(userMapper.selectById(id).getName()); |
| | | rawMaterialMapper.updateById(rawMaterial); |
| | | } |
| | |
| | | return "ä¿åæå!"; |
| | | } |
| | | |
| | | @Override |
| | | public boolean chooseEquipment(Integer id, Integer equipmentId) { |
| | | UpdateWrapper<InspectionProduct>inspectionProductUpdateWrapper=new UpdateWrapper<>(); |
| | | inspectionProductUpdateWrapper.lambda().set(InspectionProduct::getInstrumentId,equipmentId) |
| | | .eq(InspectionProduct::getId,id); |
| | | return inspectionProductMapper.update(null,inspectionProductUpdateWrapper)>0; |
| | | } |
| | | |
| | | /*æ ¹æ®æ ·ååç§°,æ ·åç¼å·,åå·è§æ ¼è·ååå·id*/ |
| | | private Integer getSpecificationId(String name, String mcode, String specification) { |
| | | //è·åç©æid |
| | | Material material = materialMapper.selectOne(Wrappers.<Material>query() |
| | | .eq("name", name) |
| | | .eq("code", mcode)); |
| | | if (Objects.isNull(material)){ |
| | | return null; |
| | | } |
| | | //è·åè§æ ¼åç§°ååå·åç§° |
| | | String[] split = specification.split("-"); |
| | | String stName = split[0]; |
| | |
| | | package com.yuanchu.limslaboratory.service.impl; |
| | | |
| | | 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.limslaboratory.mapper.LinkDetectionMapper; |
| | | import com.yuanchu.limslaboratory.mapper.SpecificationsMapper; |
| | | import com.yuanchu.limslaboratory.pojo.LinkBasicInformation; |
| | | import com.yuanchu.limslaboratory.mapper.LinkBasicInformationMapper; |
| | | import com.yuanchu.limslaboratory.pojo.LinkDetection; |
| | | import com.yuanchu.limslaboratory.pojo.Specifications; |
| | | import com.yuanchu.limslaboratory.service.LinkBasicInformationService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.limslaboratory.service.LinkDetectionService; |
| | |
| | | import com.yuanchu.limslaboratory.utils.RedisUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.*; |
| | |
| | | @Resource |
| | | private LinkBasicInformationMapper linkBasicInformationMapper; |
| | | |
| | | @Resource |
| | | private LinkDetectionMapper linkDetectionMapper; |
| | | |
| | | @Autowired |
| | | private LinkDetectionService linkDetectionService; |
| | | |
| | | @Autowired |
| | | private SpecificationsMapper specificationsMapperOn; |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public String addLinkBasicInformation(LinkBasicInformation linkBasicInformation) { |
| | | System.out.println(linkBasicInformation.getLinkDetectionList()); |
| | | QueryWrapper<LinkBasicInformation> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.lambda().select(LinkBasicInformation::getId).eq(LinkBasicInformation::getUid, linkBasicInformation.getUid()); |
| | | LinkBasicInformation linkBasicInformation1 = linkBasicInformationMapper.selectOne(queryWrapper); |
| | | Optional.ofNullable(linkBasicInformation1.getId()).ifPresent(l->{ |
| | | //æ§è¡å é¤ |
| | | linkDetectionMapper.deleteByLinkbasic(linkBasicInformation1.getId()); |
| | | linkBasicInformationMapper.deleteByID(linkBasicInformation1.getId()); |
| | | }); |
| | | //å§æç¼å· |
| | | String code = MyUtil.getTimeSixNumberCode("SL", "SL"); |
| | | linkBasicInformation.setEntrustCoding(code); |
| | |
| | | return uuid.equals(RedisUtil.get("viewId")); |
| | | } |
| | | |
| | | @Override |
| | | public LinkBasicInformation getContractsSampleInfo(String viewId) { |
| | | return linkBasicInformationMapper.getLinkBasicInformation(viewId); |
| | | } |
| | | |
| | | //æ ¹æ®å§ææ ·åå é¤ |
| | | @Override |
| | | public void delLink(Integer id) { |
| | | LinkDetection linkDetection = new LinkDetection(); |
| | | linkDetection.setId(id); |
| | | linkDetection.setState(0); |
| | | linkDetectionService.updateById(linkDetection); |
| | | } |
| | | |
| | | @Override |
| | | public Specifications getSpecificationsName(String id) { |
| | | QueryWrapper<Specifications>queryWrapper=new QueryWrapper<>(); |
| | | queryWrapper.lambda().select(Specifications::getName) |
| | | .eq(Specifications::getId,id) |
| | | .eq(Specifications::getState,1); |
| | | return specificationsMapperOn.selectOne(queryWrapper); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | for (LinkDetection linkDetection:linkDetectionList){ |
| | | linkDetection.setInspectionStatus(1); |
| | | linkDetection.setLinkBasicId(id); |
| | | linkDetection.setState(1); |
| | | } |
| | | linkDetectionMapper.insertBatchSomeColumn(linkDetectionList); |
| | | } |
| | |
| | | <select id="selectInspectsList" resultType="map"> |
| | | select i.id, |
| | | i.code icode, |
| | | type, |
| | | i.type type, |
| | | DATE_FORMAT(`form_time`,'%Y-%m-%d'), |
| | | supplier, |
| | | im.code mcode, |
| | |
| | | <?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.limslaboratory.mapper.LinkBasicInformationMapper"> |
| | | <delete id="deleteByID"> |
| | | delete from link_basic_information where id=#{id} |
| | | </delete> |
| | | <select id="getLinkBasicPage" resultType="map"> |
| | | SELECT l.`id`, l.`entrust_coding`, l.`entrusted`, d.`samples_number`, d.`sample_name`, |
| | | d.`specifications_models`, |
| | | SELECT d.`id`, l.`entrust_coding`, l.`entrusted`, d.`samples_number`, d.`sample_name`, |
| | | s.name specifications_models, |
| | | DATE_FORMAT(l.`inspection_time`,'%Y-%m-%d') inspectionTime, DATE_FORMAT(l.`completion_deadline`,'%Y-%m-%d') |
| | | completionDeadline, l.`contacts`, |
| | | DATE_FORMAT(d.`date_survey`,'%Y-%m-%d') dateSurvey, d.`inspection_status` |
| | | FROM link_basic_information l, link_detection d |
| | | DATE_FORMAT(d.`date_survey`,'%Y-%m-%d') dateSurvey, d.`inspection_status`, |
| | | DATE_FORMAT(l.`ins_time`,'%Y-%m-%d') insTime |
| | | FROM link_basic_information l, link_detection d,specifications s |
| | | WHERE l.`id` = d.`link_basic_id` |
| | | AND l.`state` = 1 |
| | | and s.id=d.`specifications_models` |
| | | AND d.`state` = 1 |
| | | and l.`state` = 1 |
| | | <if test="entrustCoding != null and entrustCoding != null"> |
| | | AND l.`entrust_coding` like concat('%', #{entrustCoding}, '%') |
| | | </if> |
| | |
| | | </select> |
| | | |
| | | <select id="selectLinkAll" resultType="java.util.Map"> |
| | | SELECT d.id , |
| | | DATE_FORMAT(l.`inspection_time`, '%Y-%m-%d') formTime, |
| | | SELECT d.id, |
| | | DATE_FORMAT(l.`inspection_time`, '%Y-%m-%d') formTime, |
| | | l.`entrusted` supplier, |
| | | d.`sample_number` mcode, |
| | | d.`sample_name` name, |
| | |
| | | AND l.`state` = 1 |
| | | and inspection_status = 1 |
| | | </select> |
| | | <select id="getLinkBasicInformation" resultMap="getLinkBasicInformationMap"> |
| | | SELECT lb.entrust_coding entrustCoding, |
| | | lb.contacts contacts, |
| | | lb.contact_number contactNumber, |
| | | lb.contact_address contactAddress, |
| | | lb.completion_deadline completionDeadline, |
| | | lb.inspection_time inspectionTime, |
| | | lb.sample_delivery_mode sampleDeliveryMode, |
| | | lb.sample_delivery_phone sampleDeliveryPhone, |
| | | lb.report_number reportNumber, |
| | | lb.entrust_remarks entrustRemarks, |
| | | lb.sample_sender sampleSender, |
| | | lb.entrusted entrusted, |
| | | lb.uid uid, |
| | | ld.id id, |
| | | ld.sample_number sampleNumber, |
| | | ld.sample_name sampleName, |
| | | ld.specifications_models specificationsModels, |
| | | ld.unit unit, |
| | | ld.experiment experiment, |
| | | ld.samples_number samplesNumber, |
| | | ld.remarks remarks |
| | | FROM link_basic_information lb left join |
| | | link_detection ld |
| | | on lb.id = ld.link_basic_id |
| | | where lb.uid = #{uid} |
| | | and lb.state = 1 |
| | | </select> |
| | | |
| | | <resultMap id="getLinkBasicInformationMap" type="com.yuanchu.limslaboratory.pojo.LinkBasicInformation"> |
| | | <result property="entrustCoding" column="entrustCoding"/> |
| | | <result property="contacts" column="contacts"/> |
| | | <result property="contactNumber" column="contactNumber"/> |
| | | <result property="contactAddress" column="contactAddress"/> |
| | | <result property="uid" column="uid"/> |
| | | <result property="completionDeadline" column="completionDeadline"/> |
| | | <result property="inspectionTime" column="inspectionTime"/> |
| | | <result property="sampleDeliveryMode" column="sampleDeliveryMode"/> |
| | | <result property="sampleDeliveryPhone" column="sampleDeliveryPhone"/> |
| | | <result property="sampleSender" column="sampleSender"/> |
| | | <result property="entrustRemarks" column="entrustRemarks"/> |
| | | <result property="reportNumber" column="reportNumber"/> |
| | | <result property="entrusted" column="entrusted"/> |
| | | <collection property="linkDetectionList" ofType="LinkDetection"> |
| | | <result property="id" column="id"/> |
| | | <result property="sampleNumber" column="sampleNumber"/> |
| | | <result property="sampleName" column="sampleName"/> |
| | | <result property="specificationsModels" column="specificationsModels"/> |
| | | <result property="unit" column="unit"/> |
| | | <result property="samplesNumber" column="samplesNumber"/> |
| | | <result property="remarks" column="remarks"/> |
| | | <result property="experiment" column="experiment"/> |
| | | </collection> |
| | | </resultMap> |
| | | </mapper> |
| | |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.yuanchu.limslaboratory.mapper.LinkDetectionMapper"> |
| | | |
| | | <delete id="deleteByLinkbasic"> |
| | | delete from link_detection where link_basic_id=#{id} |
| | | </delete> |
| | | </mapper> |
| | |
| | | specifications_models specifications, |
| | | unit, |
| | | quantity num, |
| | | surveyor, |
| | | type, |
| | | DATE_FORMAT(inspection_date, '%Y-%m-%d') startTime, |
| | | DATE_FORMAT(date_survey, '%Y-%m-%d') endTime, |
| | | DATE_FORMAT(create_time, '%Y-%m-%d') formTime |
| | | from lims_laboratory.raw_material |
| | | where state = 1 |
| | | and type = 0 |
| | | </select> |
| | | </mapper> |
| | |
| | | |
| | | //åé
-->éæ©è®¾å¤ |
| | | List<Map<String, Object>> chooseinstum(); |
| | | |
| | | List<Instrument> getInstrument(); |
| | | } |
| | |
| | | <if test="fatherName!=null and fatherName!=''"> |
| | | AND father_name = #{fatherName} |
| | | </if> |
| | | <if test="sonName!=null and sonName!=''"> |
| | | and son_name=#{sonName} |
| | | </if> |
| | | </select> |
| | | </mapper> |
| | |
| | | left join lims_laboratory.classify c on c.id = instrument.classify_id |
| | | where conditions in(1,5) |
| | | </select> |
| | | <select id="getInstrument" resultType="com.yuanchu.limslaboratory.pojo.Instrument"> |
| | | select id,equipment_name name from instrument where 1=1 and state=1 and conditions=5 |
| | | </select> |
| | | </mapper> |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.limslaboratory.pojo.Specifications; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | import java.util.Map; |
| | | import java.util.Objects; |
| | |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2023-07-11 |
| | | */ |
| | | @Repository |
| | | public interface SpecificationsMapper extends BaseMapper<Specifications> { |
| | | |
| | | Map<String, Object> selectSNameSNName(int materialId); |
| | |
| | | //throw new AuthException("400","æ æé"); |
| | | } |
| | | } else { |
| | | throw new AuthException("401", "ç»éè¿æ"); |
| | | throw new AuthException("401", "ç»éè¿æ!"); |
| | | } |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.limslaboratory.commandLineRunner; |
| | | |
| | | import com.yuanchu.limslaboratory.annotation.AuthHandler; |
| | | import com.yuanchu.limslaboratory.mapper.MenuMapper; |
| | | import com.yuanchu.limslaboratory.mapper.RoleManageMapper; |
| | | import com.yuanchu.limslaboratory.utils.ArrayListUtil; |
| | | import com.yuanchu.limslaboratory.utils.MyClassUtil; |
| | | import com.yuanchu.limslaboratory.utils.SpringUtil; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.SneakyThrows; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.aspectj.lang.reflect.MethodSignature; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.boot.CommandLineRunner; |
| | | import org.springframework.core.annotation.AnnotationUtils; |
| | | import org.springframework.core.annotation.Order; |
| | | import org.springframework.core.io.Resource; |
| | | import org.springframework.core.io.support.PathMatchingResourcePatternResolver; |
| | | import org.springframework.core.io.support.ResourcePatternResolver; |
| | | import org.springframework.core.type.classreading.CachingMetadataReaderFactory; |
| | | import org.springframework.core.type.classreading.MetadataReader; |
| | | import org.springframework.core.type.classreading.MetadataReaderFactory; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.lang.reflect.Method; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * @Author å¼ å®¾ |
| | | * @Date 2023/8/28 |
| | | */ |
| | | @Component |
| | | @Order(1) |
| | | @Slf4j |
| | | public class ResolutionRequestsCommandLineRunner implements CommandLineRunner { |
| | | |
| | | @Autowired |
| | | private RoleManageMapper roleManageMapper; |
| | | |
| | | @SneakyThrows |
| | | @Override |
| | | public void run(String... args) throws Exception { |
| | | log.info("容å¨çæä¹åæ§è¡"); |
| | | List<Class<?>> classList = MyClassUtil.getClassList("com.yuanchu.limslaboratory.controller"); |
| | | List<Map<String, String>> requestListInfo = new ArrayList<Map<String, String>>(); |
| | | classList.stream().forEach(c -> { |
| | | Method[] methods = c.getMethods(); |
| | | //å»æå¯¹è±¡æ¹æ³ |
| | | List<Method> methodList = Arrays.stream(methods) |
| | | .filter(m -> !"notify".equals(m.getName()) && !"getClass".equals(m.getName()) |
| | | && !"hashCode".equals(m.getName()) && !"toString".equals(m.getName()) |
| | | && !"equals".equals(m.getName()) && !"wait".equals(m.getName()) && !"notifyAll".equals(m.getName())) |
| | | .collect(Collectors.toList()); |
| | | |
| | | for (int i = 0; i < methodList.size(); i++) { |
| | | Method method = methodList.get(i); |
| | | boolean annotationPresent = method.isAnnotationPresent(AuthHandler.class); |
| | | if (annotationPresent&&method.getAnnotation(AuthHandler.class).isAdd()) { |
| | | //è·åç±»ä¸è¯·æ±å°å |
| | | RequestMapping annotation = c.getAnnotation(RequestMapping.class); |
| | | StringBuilder builder = new StringBuilder(); |
| | | String apiInfo = null; |
| | | builder.append(annotation.value()[0]); |
| | | //è·åæ¹æ³ä¸æ³¨è§£ |
| | | if (method.isAnnotationPresent(PostMapping.class)) { |
| | | PostMapping post = method.getAnnotation(PostMapping.class); |
| | | builder.append(post.value()[0]); |
| | | } |
| | | if (method.isAnnotationPresent(GetMapping.class)) { |
| | | GetMapping get = method.getAnnotation(GetMapping.class); |
| | | builder.append(get.value()[0]); |
| | | } |
| | | if (method.isAnnotationPresent(DeleteMapping.class)) { |
| | | DeleteMapping delete = method.getAnnotation(DeleteMapping.class); |
| | | builder.append(delete.value()[0]); |
| | | } |
| | | if (method.isAnnotationPresent(PutMapping.class)) { |
| | | PutMapping put = method.getAnnotation(PutMapping.class); |
| | | builder.append(put.value()[0]); |
| | | } |
| | | if (method.isAnnotationPresent(ApiOperation.class)) { |
| | | ApiOperation api = method.getAnnotation(ApiOperation.class); |
| | | apiInfo = api.value(); |
| | | } |
| | | Map<String, String> map = new HashMap<String, String>(); |
| | | AuthHandler auth = method.getAnnotation(AuthHandler.class); |
| | | map.put("menuId", String.valueOf(auth.menuId().getId())); |
| | | map.put("type",String.valueOf(auth.type().getNum())); |
| | | map.put("url", builder.toString()); |
| | | map.put("name", apiInfo); |
| | | requestListInfo.add(map); |
| | | } |
| | | } |
| | | }); |
| | | List<Map<String, String>> allInterfaces = roleManageMapper.getAllInterfaces(); |
| | | List<Map<String, String>> differentMaps = requestListInfo.stream() |
| | | .filter(map1 -> allInterfaces.stream() |
| | | .map(map2 -> map2.get("url")) // è·åæå®é®çå¼ |
| | | .noneMatch(value2 -> value2.equals(map1.get("url"))) // æ¥æ¾ä¸åçå¼ |
| | | ).collect(Collectors.toList()); |
| | | if(differentMaps.size()>0){ |
| | | |
| | | int insertInterfaceList = roleManageMapper.insertInterfaceList(differentMaps); |
| | | if (insertInterfaceList>0) log.info(String.valueOf(differentMaps));log.info("æ°å¢æ¥å£æåï¼"); |
| | | }else { |
| | | log.info("æ éå¢å æ°çæ¥å£ï¼"); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | # redis访é®å¯ç ï¼é»è®¤ä¸ºç©ºï¼ |
| | | password: null |
| | | # redisè¿æ¥è¶
æ¶æ¶é´ï¼å使¯«ç§ï¼ |
| | | timeout: 500 |
| | | timeout: 1000 |
| | | # redisè¿æ¥æ± é
ç½® |
| | | pool: |
| | | # æå¤§å¯ç¨è¿æ¥æ°ï¼é»è®¤ä¸º8ï¼è´æ°è¡¨ç¤ºæ éï¼ |
| | |
| | | package com.yuanchu.limslaboratory.controller; |
| | | |
| | | import com.yuanchu.limslaboratory.annotation.AuthHandler; |
| | | import com.yuanchu.limslaboratory.enums.InterfaceType; |
| | | import com.yuanchu.limslaboratory.enums.MenuEnums; |
| | | import com.yuanchu.limslaboratory.pojo.dto.GetAllRoleAndMenuByConditionPageDto; |
| | | import com.yuanchu.limslaboratory.pojo.dto.RoleInfoDto; |
| | | import com.yuanchu.limslaboratory.pojo.dto.UpdateRoleMenuDto; |
| | |
| | | public Result<?> getRoleAndMenuByRole(Long roleId){ |
| | | return Result.success(roleManagerService.getRoleAndMenuByRole(roleId)); |
| | | } |
| | | |
| | | @AuthHandler(type = InterfaceType.SELECT,menuId = MenuEnums.role,isAdd = true) |
| | | @ApiOperation("æµè¯çæ") |
| | | @GetMapping("/test") |
| | | public Result<?> test(Long roleId){ |
| | | return Result.success(null); |
| | | } |
| | | } |
| | |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @Author å¼ å®¾ |
| | |
| | | |
| | | List<Menu> getMenuList(); |
| | | |
| | | List<Map<String, Object>> getMenuNameAndId(); |
| | | |
| | | } |
| | |
| | | Map<String, Object>selctInterFaceType(String url); |
| | | |
| | | Map<String, Long> hasUrl(String type, String menuId, String roleId); |
| | | |
| | | List<Map<String, String>>getAllInterfaces(); |
| | | |
| | | int insertInterfaceList(@Param("interfaceList") List<Map<String, String>>interfaceList); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.limslaboratory.pojo.dto; |
| | | |
| | | import com.yuanchu.limslaboratory.utils.JsonUtil; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @Author å¼ å®¾ |
| | | * @Date 2023/8/28 |
| | | */ |
| | | @Component |
| | | public class MapHandlerRoleDto { |
| | | public static String comparingBySupplier(Object o){ |
| | | Map map= JsonUtil.jsonToPojo(JsonUtil.jsonToString(o),Map.class); |
| | | return String.valueOf(map.get("url")); |
| | | } |
| | | } |
| | |
| | | import com.yuanchu.limslaboratory.service.RoleManagerService; |
| | | import com.yuanchu.limslaboratory.utils.JsonUtil; |
| | | import com.yuanchu.limslaboratory.utils.MyUtil; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | |
| | | * @Date 2023/8/23 |
| | | */ |
| | | @Service |
| | | @Slf4j |
| | | public class RoleManagerServiceImpl implements RoleManagerService { |
| | | |
| | | @Resource |
| | |
| | | ,createTime |
| | | )); |
| | | }); |
| | | if(roleMenuList.size()<1){ |
| | | roleMenuList.add(new RoleMenu(null,nextId,39L,false,false,false,false,createTime)); |
| | | } |
| | | //roleMenuAddList.forEach(System.out::println); |
| | | int i = roleManageMapper.insertBatchRoleMenu(roleMenuList); |
| | | return insert>0&&i>0; |
| | |
| | | String type=null; |
| | | Map<String, Object> stringIntegerMap = roleManageMapper.selctInterFaceType(url); |
| | | if(Objects.isNull(stringIntegerMap)){ |
| | | log.warn("没æ====ã"+url+"请æ±èµæº"); |
| | | throw new AuthException("403","没æè¯¥èµæº"); |
| | | } |
| | | String of = String.valueOf(stringIntegerMap.get("type")); |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> getUserNameAndId() { |
| | | public List<Map<String, Object>> |
| | | getUserNameAndId() { |
| | | LambdaQueryWrapper<User> wrapper = new LambdaQueryWrapper<>(); |
| | | wrapper.select(User::getId, User::getName).eq(User::getType,1); |
| | | return userMapper.selectMaps(wrapper); |
| | |
| | | <mapper namespace="com.yuanchu.limslaboratory.mapper.MenuMapper"> |
| | | |
| | | <select id="getMenuList" resultType="com.yuanchu.limslaboratory.pojo.Menu"> |
| | | select id,name,parent_id parentId |
| | | select id, name, parent_id parentId |
| | | from menu |
| | | where state =1 |
| | | where state = 1 |
| | | and id != 39 |
| | | and parent_id != 39 |
| | | </select> |
| | | <select id="getMenuNameAndId" resultType="map"> |
| | | select url, id, name |
| | | from menu |
| | | where state = 1 |
| | | </select> |
| | | </mapper> |
| | |
| | | #{createTime} |
| | | ) |
| | | </insert> |
| | | <insert id="insertInterfaceList"> |
| | | insert |
| | | interface_info (id,name,url,menu_id,type,state) |
| | | values |
| | | <foreach collection="interfaceList" item="m" separator=","> |
| | | (#{m.id},#{m.name},#{m.url},#{m.menuId},#{m.type},1) |
| | | </foreach> |
| | | </insert> |
| | | <update id="updateRoleState"> |
| | | UPDATE role |
| | | SET state = 0 |
| | |
| | | and menu_id = #{menuId} |
| | | and ${type} = 1 |
| | | </select> |
| | | <select id="getAllInterfaces" resultType="java.util.Map"> |
| | | select name, url |
| | | from interface_info |
| | | </select> |
| | | <resultMap id="roleAndMenuById" type="com.yuanchu.limslaboratory.pojo.dto.RoleAndMenuDto"> |
| | | <result property="roleName" column="roleName"/> |
| | | <result property="createTime" column="createTime"/> |
| | |
| | | select id, name |
| | | from lims_laboratory.user |
| | | where job_state!=0 |
| | | and type=1 |
| | | </select> |
| | | </mapper> |