2024-04-29 自定义注解,给每个接口加上自定义注解
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.annotation.ValueAuth; |
| | | import com.yuanchu.mom.annotation.ValueClassify; |
| | | import com.yuanchu.mom.dto.PageTestObjectDto; |
| | | import com.yuanchu.mom.pojo.Product; |
| | | import com.yuanchu.mom.pojo.StructureItemParameter; |
| | |
| | | private CapacityScopeService capacityScopeService; |
| | | |
| | | private ProductService productService; |
| | | |
| | | @ValueClassify("è½åèå´") |
| | | @ApiOperation(value = "è½åèå´-è·åé¡¹ç®æ£éªåæ°å表") |
| | | @PostMapping("/selectItemParameterList") |
| | | public Result selectItemParameterList(@RequestBody Map<String, Object> data) throws Exception { |
| | |
| | | StructureItemParameter itemParameter = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), StructureItemParameter.class); |
| | | return Result.success(capacityScopeService.selectItemParameterList(page, itemParameter)); |
| | | } |
| | | |
| | | @ValueClassify("è½åèå´") |
| | | @ApiOperation(value = "è½åèå´-æ·»å é¡¹ç®æ£éªåæ°") |
| | | @PostMapping("/addItemParameter") |
| | | public Result addItemParameter(@RequestBody StructureItemParameter itemParameter) { |
| | | return Result.success(capacityScopeService.addItemParameter(itemParameter)); |
| | | } |
| | | |
| | | @ValueClassify(value="è½åèå´") |
| | | @ApiOperation(value = "è½åèå´-å é¤é¡¹ç®æ£éªåæ°") |
| | | @PostMapping("/delItemParameter") |
| | | public Result<?> delItemParameter(Integer id) { |
| | | return Result.success(capacityScopeService.delItemParameter(id)); |
| | | } |
| | | |
| | | @ValueClassify(value="è½åèå´") |
| | | @ApiOperation(value = "è½åèå´-ä¿®æ¹é¡¹ç®æ£éªåæ°") |
| | | @PostMapping("/upItemParameter") |
| | | public Result<?> upItemParameter(@RequestBody StructureItemParameter itemParameter) { |
| | | return Result.success(capacityScopeService.upItemParameter(itemParameter)); |
| | | } |
| | | |
| | | @ValueClassify(value="è½åèå´") |
| | | @ApiOperation(value = "è½åèå´-è·åæ£éªå¯¹è±¡") |
| | | @PostMapping("/selectTestObjectList") |
| | | public Result selectTestObjectList(@RequestBody Map<String, Object> data) throws Exception { |
| | |
| | | PageTestObjectDto pageTestObjectDto = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), PageTestObjectDto.class); |
| | | return Result.success(capacityScopeService.selectTestObjectList(page, pageTestObjectDto)); |
| | | } |
| | | |
| | | @ValueClassify(value="è½åèå´") |
| | | @ApiOperation(value = "è½åèå´-æ·»å æ£éªå¯¹è±¡") |
| | | @PostMapping("/addTestObject") |
| | | public Result addTestObject(@RequestBody StructureTestObject testObject) { |
| | | return Result.success(capacityScopeService.addTestObject(testObject)); |
| | | } |
| | | |
| | | @ValueClassify(value="è½åèå´") |
| | | @ApiOperation(value = "è½åèå´-å 餿£éªå¯¹è±¡") |
| | | @PostMapping("/delTestObject") |
| | | public Result<?> delTestObject(Integer id) { |
| | | return Result.success(capacityScopeService.delTestObject(id)); |
| | | } |
| | | |
| | | @ValueClassify(value="è½åèå´") |
| | | @ApiOperation(value = "è½åèå´-ä¿®æ¹æ£éªå¯¹è±¡") |
| | | @PostMapping("/upTestObject") |
| | | public Result upTestObject(@RequestBody StructureTestObject testObject) { |
| | |
| | | public Result selectTestObjectByName() { |
| | | return Result.success(capacityScopeService.selectTestObjectByName()); |
| | | } |
| | | |
| | | @ValueClassify(value="è½åèå´") |
| | | @ApiOperation(value = "è½åèå´-设å¤éé¢éæ©æ£éªé¡¹ç®(æ å½¢ç»æ)") |
| | | @PostMapping("/getInsProduction") |
| | | public Result getInsProduction(){ |
| | | return Result.success(capacityScopeService.getInsProduction()); |
| | | } |
| | | |
| | | @ValueClassify(value="è½åèå´") |
| | | @ApiOperation(value = "ç»´æ¤æ£éªå¯¹è±¡ç产å") |
| | | @PostMapping("/selectProductListByObjectId") |
| | | public Result selectProductListByObjectId(@RequestBody Map<String, Object> data) throws Exception { |
| | |
| | | return Result.success(productService.selectProductListByObjectId(page, product)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "æ·»å 产å") |
| | | @PostMapping("/addProduct") |
| | | @ValueAuth |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.annotation.ValueAuth; |
| | | import com.yuanchu.mom.annotation.ValueClassify; |
| | | import com.yuanchu.mom.pojo.Certification; |
| | | import com.yuanchu.mom.pojo.Device; |
| | | import com.yuanchu.mom.service.CertificationService; |
| | |
| | | public class CertificationController { |
| | | |
| | | private CertificationService certificationService; |
| | | |
| | | @ValueClassify("å®éªå®¤èµè´¨") |
| | | @ApiOperation(value = "èµè´¨è¯´æ-æ¥è¯¢èµè´¨æç»å表") |
| | | @PostMapping("/getCertificationDetail") |
| | | public Result getCertificationDetail(@RequestBody Map<String, Object> data) throws Exception { |
| | | System.out.println(data); |
| | | Page page = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("page")), Page.class); |
| | | Certification certification = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), Certification.class); |
| | | return Result.success(certificationService.getCertificationDetail(page, certification)); |
| | | } |
| | | |
| | | @ValueClassify("å®éªå®¤èµè´¨") |
| | | @ApiOperation(value = "èµè´¨è¯´æ-æ·»å èµè´¨æç»å表") |
| | | @PostMapping("/addCertificationDetail") |
| | | public Result addCertificationDetail(@RequestBody Certification certification) { |
| | | return Result.success(certificationService.addCertificationDetail(certification)); |
| | | } |
| | | |
| | | @ValueClassify("å®éªå®¤èµè´¨") |
| | | @ApiOperation(value = "èµè´¨è¯´æ-å é¤èµè´¨æç»å表") |
| | | @PostMapping("/delCertificationDetail") |
| | | public Result<?> delCertificationDetail( String ids) { |
| | |
| | | package com.yuanchu.mom.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.annotation.ValueClassify; |
| | | import com.yuanchu.mom.dto.UserDto; |
| | | import com.yuanchu.mom.dto.UserPageDto; |
| | | import com.yuanchu.mom.pojo.Department; |
| | |
| | | public class DepartmentController { |
| | | |
| | | DepartmentService departmentService; |
| | | |
| | | @ValueClassify("人åæç»") |
| | | @ApiOperation(value = "人åæç»-æ·»å é¨é¨") |
| | | @PostMapping("/addDepartment") |
| | | public Result addDepartment(@RequestBody Department department) { |
| | | return Result.success(departmentService.addDepartment(department)); |
| | | } |
| | | |
| | | @ValueClassify("人åæç»") |
| | | @ApiOperation(value = "人åæç»-è·åé¨é¨æ ") |
| | | @GetMapping("/selectDepartment") |
| | | public Result selectDepartment() { |
| | | return Result.success(departmentService.selectDepartment()); |
| | | } |
| | | |
| | | @ValueClassify("人åæç»") |
| | | @ApiOperation(value = "人åæç»-å é¤é¨é¨") |
| | | @PostMapping("/delDepartment") |
| | | public Result delDepartment(Integer id) { |
| | | return Result.success(departmentService.delDepartment(id)); |
| | | } |
| | | |
| | | @ValueClassify("人åæç»") |
| | | @ApiOperation(value = "人åæç»-æ ¹æ®éæ©çæ å±ç¤ºç¸å
³ç人å") |
| | | @PostMapping("/showUserById") |
| | | public Result showUserById(@RequestBody Map<String, Object> data) throws Exception { |
| | |
| | | UserDto user = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), UserDto.class); |
| | | return Result.success(departmentService.showUserById(page, user)); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | import cn.hutool.core.lang.UUID; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.annotation.ValueAuth; |
| | | import com.yuanchu.mom.annotation.ValueClassify; |
| | | import com.yuanchu.mom.dto.DeviceDto; |
| | | import com.yuanchu.mom.pojo.Device; |
| | | import com.yuanchu.mom.service.DeviceService; |
| | |
| | | |
| | | @Value("${file.path}") |
| | | private String filePath; |
| | | |
| | | @ValueClassify("设å¤å·¥å
·æç»") |
| | | @ApiOperation(value = "æ¥è¯¢è®¾å¤è¯¦æ
å表") |
| | | @PostMapping("/selectDeviceParameter") |
| | | public Result selectDeviceParameter(@RequestBody Map<String, Object> data) throws Exception { |
| | |
| | | DeviceDto itemParameter = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), DeviceDto.class); |
| | | return Result.success(deviceService.selectDeviceParameter(page, itemParameter)); |
| | | } |
| | | |
| | | @ValueClassify("设å¤å·¥å
·æç»") |
| | | @ApiOperation(value = "æ·»å 设å¤è¯¦æ
åæ°") |
| | | @PostMapping("/addDeviceParameter") |
| | | public Result addDeviceParameter(@RequestBody Device itemParameter) { |
| | | return Result.success(deviceService.addDeviceParameter(itemParameter)); |
| | | } |
| | | |
| | | @ValueClassify("设å¤å·¥å
·æç»") |
| | | @ApiOperation(value = "å é¤è®¾å¤è¯¦æ
åæ°") |
| | | @PostMapping("/delDeviceParameter") |
| | | public Result<?> delDeviceParameter(Integer id) { |
| | | return Result.success(deviceService.delDeviceParameter(id)); |
| | | } |
| | | |
| | | @ValueClassify("设å¤å·¥å
·æç»") |
| | | @ApiOperation(value = "ä¿®æ¹è®¾å¤è¯¦æ
åæ°") |
| | | @PostMapping("/upDeviceParameter") |
| | | public Result<?> upDeviceParameter(@RequestBody Device itemParameter) { |
| | |
| | | import cn.hutool.core.lang.UUID; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.annotation.ValueAuth; |
| | | import com.yuanchu.mom.annotation.ValueClassify; |
| | | import com.yuanchu.mom.pojo.Laboratory; |
| | | import com.yuanchu.mom.service.LaboratoryService; |
| | | import com.yuanchu.mom.utils.JackSonUtil; |
| | |
| | | |
| | | @Resource |
| | | private LaboratoryService laboratoryService; |
| | | |
| | | @ValueClassify("åºææè®¾æ½") |
| | | @ApiOperation(value = "æ¥è¯¢å®éªå®¤ç®¡çå表") |
| | | @PostMapping("/selectItemParameter") |
| | | public Result selectItemParameter(@RequestBody Map<String, Object> data) throws Exception { |
| | |
| | | Laboratory itemParameter = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), Laboratory.class); |
| | | return Result.success(laboratoryService.selectItemParameter(page, itemParameter)); |
| | | } |
| | | |
| | | @ValueClassify("åºææè®¾æ½") |
| | | @ApiOperation(value = "æ·»å å®éªå®¤åæ°") |
| | | @PostMapping("/addParameter") |
| | | public Result addParameter(@RequestBody Laboratory itemParameter) { |
| | | return Result.success(laboratoryService.addParameter(itemParameter)); |
| | | } |
| | | |
| | | @ValueClassify("åºææè®¾æ½") |
| | | @ApiOperation(value = "å é¤å®éªå®¤åæ°") |
| | | @PostMapping("/delParameter") |
| | | public Result<?> delParameter(Integer id) { |
| | | return Result.success(laboratoryService.delParameter(id)); |
| | | } |
| | | |
| | | @ValueClassify("åºææè®¾æ½") |
| | | @ApiOperation(value = "ä¿®æ¹å®éªå®¤åæ°") |
| | | @PostMapping("/upParameter") |
| | | public Result<?> upParameter(@RequestBody Laboratory itemParameter) { |
| | |
| | | package com.yuanchu.mom.controller; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.annotation.ValueClassify; |
| | | import com.yuanchu.mom.pojo.Laboratory; |
| | | import com.yuanchu.mom.pojo.Seal; |
| | | import com.yuanchu.mom.service.SealService; |
| | |
| | | |
| | | @ApiOperation(value = "å é¤å°ç« ") |
| | | @PostMapping("/deleteSeal") |
| | | |
| | | public Result deleteSeal(@RequestBody Integer id) { |
| | | return Result.success(sealService.delSeal(id)); |
| | | } |
| | | @ValueClassify("åºææè®¾æ½") |
| | | @ApiOperation(value = "æ·»å å°ç« åæ°") |
| | | @PostMapping("/addSeal") |
| | | public Result addSeal(@RequestBody Seal seal) { |
| | |
| | | } |
| | | |
| | | } |
| | | |
| | | @ApiOperation(value = "ä¿®æ¹å°ç« åæ°") |
| | | @PostMapping("/upSeal") |
| | | public Result upSeal(@RequestBody Seal seal){ |
| | | return Result.success(sealService.upSeal(seal)); |
| | | } |
| | | @ValueClassify("åºææè®¾æ½") |
| | | @ApiOperation(value="æ¥è¯¢å°ç« å表") |
| | | @PostMapping("/selectSeal") |
| | | public Result selectSeal(@RequestBody Map<String, Object> data) throws Exception { |
| | | System.out.println(data); |
| | | Page page = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("page")), Page.class); |
| | | Seal seal = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), Seal.class); |
| | | return Result.success(sealService.selectSeal(page,seal)); |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.annotation.ValueAuth; |
| | | import com.yuanchu.mom.annotation.ValueClassify; |
| | | import com.yuanchu.mom.pojo.StandardMethod; |
| | | import com.yuanchu.mom.pojo.StructureItemParameter; |
| | | import com.yuanchu.mom.service.StandardMethodService; |
| | |
| | | public class StandardMethodController { |
| | | |
| | | private StandardMethodService standardMethodService; |
| | | |
| | | @ValueClassify("å®éªå®¤çæ£æµè½åæ¡£æ¡") |
| | | @ApiOperation(value = "è·åæ åæ¹æ³å表") |
| | | @PostMapping("/selectStandardMethodList") |
| | | public Result selectStandardMethodList(@RequestBody Map<String, Object> data) throws Exception { |
| | |
| | | public Result selectStandardMethods(){ |
| | | return Result.success(standardMethodService.selectStandardMethods()); |
| | | } |
| | | |
| | | @ValueClassify("å®éªå®¤çæ£æµè½åæ¡£æ¡") |
| | | @ApiOperation(value = "æ·»å æ åæ¹æ³") |
| | | @PostMapping("/addStandardMethod") |
| | | public Result addStandardMethod(@RequestBody StandardMethod standardMethod) { |
| | | return Result.success(standardMethodService.addStandardMethod(standardMethod)); |
| | | } |
| | | |
| | | @ValueClassify("å®éªå®¤çæ£æµè½åæ¡£æ¡") |
| | | @ApiOperation(value = "å 餿 åæ¹æ³") |
| | | @PostMapping("/delStandardMethod") |
| | | public Result<?> delStandardMethod(Integer id) { |
| | | return Result.success(standardMethodService.delStandardMethod(id)); |
| | | } |
| | | |
| | | @ValueClassify("å®éªå®¤çæ£æµè½åæ¡£æ¡") |
| | | @ApiOperation(value = "ä¿®æ¹æ åæ¹æ³") |
| | | @PostMapping("/upStandardMethod") |
| | | public Result<?> upStandardMethod(@RequestBody StandardMethod standardMethod) { |
| | |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | |
| | | @ApiModelProperty(value = "å®éªå®¤id") |
| | | private Integer labId; |
| | | |
| | |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("head", PrintChina.printChina(Seal.class)); |
| | | map.put("body", sealMapper.selectSeal(page, QueryWrappers.queryWrappers(seal))); |
| | | |
| | | return map; |
| | | } |
| | | @Override |
| | |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.yuanchu.mom.mapper.SealMapper"> |
| | | <select id="selectSeal" resultType="com.yuanchu.mom.pojo.Seal"> |
| | | select l.id,s.lab_id,l.laboratory_name ,s.address, s.type as type,s.create_time |
| | | select l.id,s.lab_id,l.laboratory_name ,s.address, s.type as Type,s.create_time |
| | | from seal s LEFT JOIN laboratory l on s.lab_id=l.id |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | |
| | | |
| | | <select id="selectStandardMethodList" resultType="com.yuanchu.mom.pojo.StandardMethod"> |
| | | select * from ( |
| | | select sm.id, |
| | | sm.code, |
| | | sm.name, |
| | | sm.structure_test_object_id, |
| | | sto.specimen_name sample_type, |
| | | sm.remark, |
| | | u1.name create_user_name, |
| | | sm.create_time, |
| | | u2.name update_user_name, |
| | | sm.update_time, |
| | | sm.is_product, |
| | | sm.field, |
| | | sm.name_en, |
| | | sm.is_use, |
| | | sm.qualification_id |
| | | from standard_method sm |
| | | left join user u1 on sm.create_user = u1.id |
| | | left join user u2 on sm.update_user = u2.id |
| | | left join structure_test_object sto on sm.structure_test_object_id = sto.id |
| | | ) a |
| | | select sm.id, |
| | | sm.code, |
| | | sm.name, |
| | | sm.structure_test_object_id, |
| | | sto.specimen_name sample_type, |
| | | sm.remark, |
| | | u1.name create_user_name, |
| | | sm.create_time, |
| | | u2.name update_user_name, |
| | | sm.update_time, |
| | | sm.is_product, |
| | | sm.field, |
| | | sm.name_en, |
| | | sm.is_use, |
| | | sm.qualification_id |
| | | from standard_method sm |
| | | left join user u1 on sm.create_user = u1.id |
| | | left join user u2 on sm.update_user = u2.id |
| | | left join structure_test_object sto on sm.structure_test_object_id = sto.id |
| | | ) a |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.annotation; |
| | | |
| | | import java.lang.annotation.Retention; |
| | | import java.lang.annotation.RetentionPolicy; |
| | | |
| | | @Retention(RetentionPolicy.RUNTIME) |
| | | public @interface ValueClassify { |
| | | String value() default ""; |
| | | } |
| | |
| | | package com.yuanchu.mom.common; |
| | | |
| | | import com.yuanchu.mom.annotation.ValueAuth; |
| | | import com.yuanchu.mom.annotation.ValueClassify; |
| | | import com.yuanchu.mom.mapper.AuthMapper; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.boot.autoconfigure.freemarker.FreeMarkerAutoConfiguration; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.web.context.WebApplicationContext; |
| | | import org.springframework.web.method.HandlerMethod; |
| | |
| | | |
| | | import javax.annotation.PostConstruct; |
| | | import javax.annotation.Resource; |
| | | import java.lang.reflect.Method; |
| | | import java.util.Map; |
| | | |
| | | @Component |
| | |
| | | for (HandlerMethod value : methodMap.values()) { |
| | | ApiOperation annotation = value.getMethodAnnotation(ApiOperation.class); |
| | | ValueAuth valueAuth = value.getMethodAnnotation(ValueAuth.class); |
| | | if (valueAuth==null){ |
| | | if (annotation != null) { |
| | | ValueClassify valueClassify = value.getMethodAnnotation(ValueClassify.class); |
| | | if (valueAuth == null) { |
| | | if (valueClassify !=null) { |
| | | String type = valueClassify.value(); |
| | | String remark = annotation.value(); |
| | | String type = "ä¿®æ¹"; |
| | | if (remark.contains("è·å")||remark.contains("æ¥è¯¢")){ |
| | | type = "æ¥è¯¢"; |
| | | } else if(remark.contains("å é¤")){ |
| | | type = "å é¤"; |
| | | } else if(remark.contains("æ·»å ")||remark.contains("æ°å¢")||remark.contains("认é¢")){ |
| | | type = "æ·»å "; |
| | | } else if(remark.contains("导å
¥")){ |
| | | type = "导å
¥"; |
| | | } else if(remark.contains("导åº")){ |
| | | type = "导åº"; |
| | | } |
| | | try { |
| | | authMapper.insertPower(value.getMethod().getName(), remark, type); |
| | | }catch (Exception e){ |
| | | System.err.println(value.getMethod()); |
| | | authMapper.insertPower(value.getMethod().getName(),remark,type); |
| | | }else{ |
| | | if (annotation != null) { |
| | | String remark = annotation.value(); |
| | | String type = "ä¿®æ¹"; |
| | | if (remark.contains("è·å") || remark.contains("æ¥è¯¢")) { |
| | | type = "æ¥è¯¢"; |
| | | } else if (remark.contains("å é¤")) { |
| | | type = "å é¤"; |
| | | } else if (remark.contains("æ·»å ") || remark.contains("æ°å¢") || remark.contains("认é¢")) { |
| | | type = "æ·»å "; |
| | | } else if (remark.contains("导å
¥")) { |
| | | type = "导å
¥"; |
| | | } else if (remark.contains("导åº")) { |
| | | type = "导åº"; |
| | | } |
| | | try { |
| | | authMapper.insertPower(value.getMethod().getName(), remark, type); |
| | | } catch (Exception e) { |
| | | System.err.println(value.getMethod()); |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | System.out.println("********************æéèå宿********************"); |
| | | } |
| | | System.out.println("********************æéèå宿********************"); |
| | | } |
| | | |
| | | @PostConstruct |
| | | public void pingStart() { |
| | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.annotation.ValueAuth; |
| | | import com.yuanchu.mom.annotation.ValueClassify; |
| | | import com.yuanchu.mom.dto.CostStatisticsDto; |
| | | import com.yuanchu.mom.dto.SampleOrderDto; |
| | | import com.yuanchu.mom.dto.SampleProductDto; |
| | |
| | | private InsOrderTemplateService insOrderTemplateService; |
| | | |
| | | //è·åæ£éªä¸åæ°æ® |
| | | @ValueClassify("æ£éªä¸å") |
| | | @ApiOperation(value = "æ¥è¯¢æ£éªä¸åæ°æ®") |
| | | @PostMapping("/selectInsOrderParameter") |
| | | public Result selectInsOrderParameter(@RequestBody Map<String, Object> data) throws Exception { |
| | |
| | | SampleOrderDto sampleOrderDto = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), SampleOrderDto.class); |
| | | return Result.success(insOrderService.selectInsOrderParameter(page, sampleOrderDto)); |
| | | } |
| | | |
| | | @ValueClassify("æ£éªä¸å") |
| | | @ApiOperation(value = "æ£éªåé
") |
| | | @PostMapping("/upInsOrder") |
| | | public Result<?> upInsOrder(Integer orderId, Integer sampleId, String appointed, Integer userId) { |
| | | return Result.success(insOrderService.upInsOrder(orderId, sampleId, appointed, userId)); |
| | | } |
| | | |
| | | @ValueClassify("æ£éªä¸å") |
| | | @ApiOperation(value = "æ·»å æ£éªä¸åæ°æ®") |
| | | @PostMapping("/addInsOrder") |
| | | public Result<?> addInsOrder(@RequestBody Map<String, Object> map) { |
| | |
| | | public Result<?> getInsOrder(Integer orderId) { |
| | | return Result.success(insOrderService.getInsOrder(orderId)); |
| | | } |
| | | |
| | | @ValueClassify("æ£éªä¸å") |
| | | @ApiOperation(value = "å®¡æ ¸æ£éªåè¿è¡ç¶æä¿®æ¹") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "id", value = "æ£éªåid", dataTypeClass = Integer.class), |
| | |
| | | public Result<?> upInsOrderOfState(@RequestBody InsOrder insOrder) { |
| | | return Result.success(insOrderService.upInsOrderOfState(insOrder)); |
| | | } |
| | | |
| | | @ValueClassify("æ£éªä¸å") |
| | | @ApiOperation(value = "æ·»å æ£éªå模æ¿") |
| | | @PostMapping("/addInsOrderTemplate") |
| | | public Result<?> addInsOrderTemplate(@RequestBody InsOrderTemplate insOrderTemplate) { |
| | |
| | | SampleProductDto2 sampleProductDto = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), SampleProductDto2.class); |
| | | return Result.success(insOrderService.selectSampleAndProductByOrderId(page, sampleProductDto)); |
| | | } |
| | | |
| | | @ValueClassify("è´¹ç¨ç»è®¡") |
| | | @ApiOperation(value = "è´¹ç¨ç»è®¡") |
| | | @PostMapping("/costStatistics") |
| | | public Result<?> costStatistics(@RequestBody Map<String, Object> data) throws Exception { |
| | |
| | | CostStatisticsDto costStatisticsDto = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), CostStatisticsDto.class); |
| | | return Result.success(insOrderService.costStatistics(page, costStatisticsDto)); |
| | | } |
| | | @ValueClassify("æ ·åç¼ºé·ææ°") |
| | | @ApiOperation(value = "æ ·åç¼ºé·ææ°", tags = "æ ·åç¼ºé·ææ°") |
| | | @PostMapping("/selectSampleDefects") |
| | | public Result selectSampleDefects(Integer size, Integer current, String inspectionItems, String orderNumber) { |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.annotation.ValueAuth; |
| | | import com.yuanchu.mom.annotation.ValueClassify; |
| | | import com.yuanchu.mom.dto.InsOrderPlanDTO; |
| | | import com.yuanchu.mom.service.InsOrderPlanService; |
| | | import com.yuanchu.mom.utils.JackSonUtil; |
| | |
| | | |
| | | private InsOrderPlanService insOrderPlanService; |
| | | |
| | | @ValueClassify("æ£éªä»»å¡") |
| | | @ApiOperation(value = "è·åæ£éªä»»å¡å表") |
| | | @PostMapping("/selectInsOrderPlanList") |
| | | public Result selectInsOrderPlanList(@RequestBody Map<String, Object> data) throws Exception { |
| | |
| | | InsOrderPlanDTO insOrderPlanDTO = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), InsOrderPlanDTO.class); |
| | | return Result.success(insOrderPlanService.selectInsOrderPlanList(page, insOrderPlanDTO)); |
| | | } |
| | | |
| | | @ValueClassify("æ£éªä»»å¡") |
| | | @ApiOperation(value = "认é¢ä»»å¡è®¡å") |
| | | @PostMapping("/claimInsOrderPlan") |
| | | public Result claimInsOrderPlan(@RequestBody InsOrderPlanDTO data) { |
| | | return Result.success(insOrderPlanService.claimInsOrderPlan(data)); |
| | | } |
| | | |
| | | @ValueClassify("æ£éªä»»å¡") |
| | | @ApiOperation(value = "æ§è¡æ£éªæä½") |
| | | @PostMapping("/doInsOrder") |
| | | public Result<?> doInsOrder(Integer id, String laboratory) { |
| | | return Result.success(insOrderPlanService.doInsOrder(id, laboratory)); |
| | | } |
| | | |
| | | @ValueClassify("æ£éªä»»å¡") |
| | | @ApiOperation(value = "ä»»å¡äº¤æ¥") |
| | | @PostMapping("/upPlanUser") |
| | | public Result<?> upPlanUser(Integer userId, Integer orderId) { |
| | | return Result.success(insOrderPlanService.upPlanUser(userId, orderId)); |
| | | } |
| | | |
| | | @ValueClassify("æ£éªä»»å¡") |
| | | @ApiOperation(value = "夿 ¸æ£éªä»»å¡") |
| | | @PostMapping("/verifyPlan") |
| | | public Result<?> verifyPlan(Integer orderId, String laboratory, Integer type, String tell) { |
| | | return Result.success(insOrderPlanService.verifyPlan(orderId, laboratory, type, tell)); |
| | | } |
| | | |
| | | @ValueClassify("æ£éªä»»å¡") |
| | | @ApiOperation(value = "æ£éªä»»å¡æäº¤") |
| | | @PostMapping("/submitPlan") |
| | | public Result<?> submitPlan(Integer orderId, String laboratory) { |
| | |
| | | package com.yuanchu.mom.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.annotation.ValueAuth; |
| | | import com.yuanchu.mom.annotation.ValueClassify; |
| | | import com.yuanchu.mom.dto.ReportPageDto; |
| | | import com.yuanchu.mom.exception.ErrorException; |
| | | import com.yuanchu.mom.service.InsReportService; |
| | |
| | | |
| | | @Value("${wordUrl}") |
| | | private String wordUrl; |
| | | |
| | | @ValueClassify("æ¥åç¼å¶") |
| | | @ApiOperation(value = "æ¥è¯¢æ£éªæ¥åæ°æ®") |
| | | @PostMapping("/pageInsReport") |
| | | public Result pageInsReport(@RequestBody Map<String, Object> data) throws Exception { |
| | |
| | | |
| | | @ApiOperation(value = "æ¥åä¸ä¼ ") |
| | | @PostMapping("/inReport") |
| | | @ValueAuth |
| | | public Result inReport(MultipartFile file, Integer id) { |
| | | String urlString; |
| | | String pathName; |
| | |
| | | throw new ErrorException("æä»¶ä¸ä¼ 失败"); |
| | | } |
| | | } |
| | | |
| | | @ValueClassify("æ¥åç¼å¶") |
| | | @ApiOperation(value = "æ¥åè¿å") |
| | | @PostMapping("/upReportUrl") |
| | | public Result upReportUrl(Integer id) { |
| | | return Result.success(insReportService.upReportUrl(id)); |
| | | } |
| | | |
| | | @ValueClassify("æ¥åç¼å¶") |
| | | @ApiOperation(value = "æ¥åå¨çº¿ç¼å¶") |
| | | @GetMapping("/upReportFile") |
| | | public Result upReportFile() { |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ValueClassify("æ¥åç¼å¶") |
| | | @ApiOperation(value = "æäº¤") |
| | | @PostMapping("/writeReport") |
| | | public Result writeReport(Integer id) { |
| | | return Result.success(insReportService.writeReport(id)); |
| | | } |
| | | |
| | | @ValueClassify("æ¥åç¼å¶") |
| | | @ApiOperation(value = "å®¡æ ¸") |
| | | @PostMapping("/examineReport") |
| | | public Result examineReport(Integer id, Integer isExamine, String examineTell) { |
| | | return Result.success(insReportService.examineReport(id, isExamine, examineTell)); |
| | | } |
| | | |
| | | @ValueClassify("æ¥åç¼å¶") |
| | | @ApiOperation(value = "æ¹å") |
| | | @PostMapping("/ratifyReport") |
| | | public Result ratifyReport(Integer id, Integer isRatify, String ratifyTell) { |
| | |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.annotation.ValueClassify; |
| | | import com.yuanchu.mom.dto.SampleOrderDto; |
| | | import com.yuanchu.mom.service.ReportService; |
| | | import com.yuanchu.mom.utils.JackSonUtil; |
| | |
| | | public class ReportController { |
| | | |
| | | private ReportService reportService; |
| | | |
| | | @ValueClassify("个人é¦é¡µ") |
| | | @ApiOperation(value = "æ¯æ¥ä¸å¡ç»è®¡") |
| | | @GetMapping("/businessStatisticsByDay") |
| | | public Result businessStatisticsByDay(){ |
| | | return Result.success(reportService.businessStatisticsByDay()); |
| | | } |
| | | |
| | | @ValueClassify("个人é¦é¡µ") |
| | | @ApiOperation(value = "æ£æµé¡¹ç®ç»è®¡") |
| | | @GetMapping("/testProductByDay") |
| | | public Result testProductByDay(){ |
| | | return Result.success(reportService.testProductByDay()); |
| | | } |
| | | |
| | | @ValueClassify("个人é¦é¡µ") |
| | | @ApiOperation(value = "é¦é¡µ-->æ¥åä»»å¡å¾") |
| | | @GetMapping("/calendarWorkByWeek") |
| | | public Result calendarWorkByWeek(){ |
| | | return Result.success(reportService.calendarWorkByWeek()); |
| | | } |
| | | |
| | | @ValueClassify("个人é¦é¡µ") |
| | | @ApiOperation(value = "é¦é¡µ-->æ·»å æ¥ç¨") |
| | | @PostMapping("/addSchedule") |
| | | public Result addSchedule(String time, String text){ |
| | | return Result.success(reportService.addSchedule(time,text)); |
| | | } |
| | | |
| | | @ValueClassify("个人é¦é¡µ") |
| | | @ApiOperation(value = "é¦é¡µ-->æçæ¥ç¨") |
| | | @PostMapping("/ScheduleByMe") |
| | | public Result ScheduleByMe(String date){ |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.annotation.ValueAuth; |
| | | import com.yuanchu.mom.annotation.ValueClassify; |
| | | import com.yuanchu.mom.pojo.StandardTemplate; |
| | | import com.yuanchu.mom.service.StandardTemplateService; |
| | | import com.yuanchu.mom.utils.JackSonUtil; |
| | |
| | | public class StandardTemplateController { |
| | | |
| | | private StandardTemplateService standardTemplateService; |
| | | |
| | | @ValueClassify("åå§è®°å½æ¨¡æ¿") |
| | | @ApiOperation(value = "è·ååå§è®°å½æ¨¡æ¿å表") |
| | | @PostMapping("/selectStandardTemplatePageList") |
| | | public Result selectStandardTemplatePageList(@RequestBody Map<String, Object> data) throws Exception { |
| | |
| | | StandardTemplate standardTemplate = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), StandardTemplate.class); |
| | | return Result.success(standardTemplateService.selectStandardTemplatePageList(page, standardTemplate)); |
| | | } |
| | | |
| | | @ValueClassify("åå§è®°å½æ¨¡æ¿") |
| | | @ApiOperation(value = "æ·»å åå§è®°å½æ¨¡æ¿") |
| | | @PostMapping("/addStandardTemplate") |
| | | public Result addStandardTemplate(@RequestBody StandardTemplate standardTemplate) { |
| | | return Result.success(standardTemplateService.addStandardTemplate(standardTemplate)); |
| | | } |
| | | |
| | | @ValueClassify("åå§è®°å½æ¨¡æ¿") |
| | | @ApiOperation(value = "ä¿®æ¹åå§è®°å½æ¨¡æ¿") |
| | | @PostMapping("/upStandardTemplate") |
| | | public Result<?> upStandardTemplate(@RequestBody StandardTemplate standardTemplate) { |
| | | return Result.success(standardTemplateService.upStandardTemplate(standardTemplate)); |
| | | } |
| | | |
| | | @ValueClassify("åå§è®°å½æ¨¡æ¿") |
| | | @ApiOperation(value = "å é¤åå§è®°å½æ¨¡æ¿") |
| | | @PostMapping("/delStandardTemplate") |
| | | public Result<?> delStandardTemplate(Integer id) { |
| | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.yuanchu.mom.annotation.ValueAuth; |
| | | import com.yuanchu.mom.annotation.ValueClassify; |
| | | import com.yuanchu.mom.pojo.InsSample; |
| | | import com.yuanchu.mom.pojo.StandardProductList; |
| | | import com.yuanchu.mom.pojo.StandardTree; |
| | |
| | | private StandardMethodListService standardMethodListService; |
| | | |
| | | private StandardProductListService standardProductListService; |
| | | |
| | | @ValueClassify("æ ååº") |
| | | @ApiOperation(value = "è·åæ åæ ") |
| | | @GetMapping("/selectStandardTreeList") |
| | | public Result selectStandardTreeList(){ |
| | | return Result.success(standardTreeService.selectStandardTreeList()); |
| | | } |
| | | |
| | | @ValueClassify("æ ååº") |
| | | @ApiOperation(value = "æ·»å æ åæ ") |
| | | @PostMapping("/addStandardTree") |
| | | public Result addStandardTree(@RequestBody StandardTree standardTree){ |
| | | return Result.success(standardTreeService.addStandardTree(standardTree)); |
| | | } |
| | | |
| | | @ValueClassify("æ ååº") |
| | | @ApiOperation(value = "ç»æ åæ æ·»å æ£éªæ å") |
| | | @PostMapping("/addStandardMethodList") |
| | | public Result addStandardMethodList(String tree, Integer standardId){ |
| | |
| | | public Result selectsStandardMethodByFLSSM(String tree){ |
| | | return Result.success(standardMethodListService.selectsStandardMethodByFLSSM(tree)); |
| | | } |
| | | |
| | | @ValueClassify("æ ååº") |
| | | @ApiOperation(value = "ä¿®æ¹æ ååºä¸çè¦æ±å¼") |
| | | @PostMapping("/upStandardProductList") |
| | | public Result upStandardProductList(@RequestBody StandardProductList list){ |
| | | return Result.success(standardProductListService.upStandardProductList(list)); |
| | | } |
| | | |
| | | @ValueClassify("æ ååº") |
| | | @ApiOperation(value = "å 餿 åæ ä¸çæ£éªæ å") |
| | | @PostMapping("/delStandardMethodByFLSSM") |
| | | public Result delStandardMethodByFLSSM(Integer id){ |
| | | return Result.success(standardMethodListService.delStandardMethodByFLSSM(id)); |
| | | } |
| | | |
| | | @ValueClassify("æ ååº") |
| | | @ApiOperation(value = "å 餿 åæ ä¸çæ£éªé¡¹ç®") |
| | | @PostMapping("/delStandardProductByIds") |
| | | public Result delStandardProductByIds(String ids){ |
| | | JSONArray lists = JSON.parseArray(ids); |
| | | return Result.success(standardProductListService.delStandardProduct(lists)); |
| | | } |
| | | |
| | | @ValueClassify("æ ååº") |
| | | @ApiOperation(value = "æ°å¢æ åæ ä¸çæ£éªé¡¹ç®") |
| | | @PostMapping("/addStandardProduct") |
| | | public Result addStandardProduct(String ids, String tree){ |
| | | return Result.success(standardTreeService.addStandardProduct(ids, tree)); |
| | | } |
| | | |
| | | @ValueClassify("æ ååº") |
| | | @ApiOperation(value = "å 餿 åæ çå±çº§") |
| | | @PostMapping("/delStandardTree") |
| | | public Result delStandardTree(String tree){ |
| | |
| | | package com.yuanchu.mom.controller; |
| | | |
| | | import com.yuanchu.mom.annotation.ValueAuth; |
| | | import com.yuanchu.mom.annotation.ValueClassify; |
| | | import com.yuanchu.mom.pojo.Warehouse; |
| | | import com.yuanchu.mom.pojo.WarehouseShelf; |
| | | import com.yuanchu.mom.service.WarehouseService; |
| | |
| | | public class WarehouseController { |
| | | |
| | | private WarehouseService warehouseService; |
| | | |
| | | @ValueClassify("æ ·å管ç") |
| | | @PostMapping("/addWarehouse") |
| | | @ApiOperation("æ·»å ä»åº") |
| | | public Result addWarehouse(String name) { |
| | | return Result.success(warehouseService.addWarehouse(name)); |
| | | } |
| | | |
| | | @ValueClassify("æ ·å管ç") |
| | | @GetMapping("/selectWarehouse") |
| | | @ApiOperation("æ¥è¯¢ä»åº") |
| | | public Result selectWarehouse() { |
| | | return Result.success(warehouseService.selectWarehouse()); |
| | | } |
| | | |
| | | @ValueClassify("æ ·å管ç") |
| | | @PostMapping("/addShelf") |
| | | @ApiOperation("æ·»å è´§æ¶") |
| | | @ApiImplicitParams({ |
| | |
| | | public Result addShelf(@RequestBody WarehouseShelf warehouseShelf) { |
| | | return Result.success(warehouseService.addShelf(warehouseShelf)); |
| | | } |
| | | |
| | | @ValueClassify("æ ·å管ç") |
| | | @PostMapping("/delWarehouse") |
| | | @ApiOperation("å é¤ä»åº") |
| | | public Result delWarehouse(Integer id) { |
| | | return Result.success(warehouseService.delWarehouse(id)); |
| | | } |
| | | |
| | | @ValueClassify("æ ·å管ç") |
| | | @PostMapping("/upWarehouse") |
| | | @ApiOperation("ä¿®æ¹ä»åº") |
| | | public Result upWarehouse(@RequestBody Warehouse warehouse) { |
| | | return Result.success(warehouseService.upWarehouse(warehouse)); |
| | | } |
| | | |
| | | @ValueClassify("æ ·å管ç") |
| | | @PostMapping("/delShelf") |
| | | @ApiOperation("å é¤è´§æ¶") |
| | | public Result delShelf(Integer id) { |
| | | return Result.success(warehouseService.delShelf(id)); |
| | | } |
| | | |
| | | @ValueClassify("æ ·å管ç") |
| | | @PostMapping("/upShelf") |
| | | @ApiOperation("ä¿®æ¹è´§æ¶") |
| | | public Result upShelf(@RequestBody WarehouseShelf warehouseShelf) { |
| | | return Result.success(warehouseService.upShelf(warehouseShelf)); |
| | | } |
| | | |
| | | @ValueClassify("æ ·å管ç") |
| | | @GetMapping("/getWarehouse") |
| | | @ApiOperation("æ¥è¯¢è´§æ¶ä¸çåæ¾ä¿¡æ¯") |
| | | @ValueAuth |
| | | public Result getWarehouse(Integer shelfId) { |
| | | return Result.success(warehouseService.getWarehouse(shelfId)); |
| | | } |
| | | |
| | | @ValueClassify("æ ·å管ç") |
| | | @PostMapping("/inWarehouse") |
| | | @ApiOperation("æ ·åå
¥åº") |
| | | public Result inWarehouse(String trees, String sampleCode) { |
| | | return Result.success(warehouseService.inWarehouse(trees, sampleCode)); |
| | | } |
| | | |
| | | @ValueClassify("æ ·å管ç") |
| | | @PostMapping("/outWarehouse") |
| | | @ApiOperation("æ ·ååºåº") |
| | | public Result outWarehouse(String sampleCode) { |
| | | return Result.success(warehouseService.outWarehouse(sampleCode)); |
| | | } |
| | | |
| | | @ValueClassify("æ ·å管ç") |
| | | @PostMapping("/getSampleRecord") |
| | | @ApiOperation("æ¥è¯¢æ ·å详ç»è®°å½") |
| | | public Result getSampleRecord(Integer id) { |
| | | return Result.success(warehouseService.getSampleRecord(id)); |
| | | } |
| | | |
| | | @ValueClassify("æ ·å管ç") |
| | | @PostMapping("/searchSampleId") |
| | | @ApiOperation("éè¿æ ·åç¼å·è¿è¡æ£ç´¢") |
| | | public Result searchSampleId(String sampleCode) { |
| | | return Result.success(warehouseService.searchSampleId(sampleCode)); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.annotation.ValueAuth; |
| | | import com.yuanchu.mom.annotation.ValueClassify; |
| | | import com.yuanchu.mom.dto.RolePowerDto; |
| | | import com.yuanchu.mom.pojo.Enums; |
| | | import com.yuanchu.mom.service.EnumService; |
| | |
| | | |
| | | private EnumService enumService; |
| | | |
| | | @ValueClassify("æ°æ®åå
¸") |
| | | @ApiOperation(value = "è·åæä¸¾å表") |
| | | @PostMapping("/selectEnumList") |
| | | public Result selectEnumList(@RequestBody Map<String, Object> data) throws Exception { |
| | |
| | | Enums enums = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), Enums.class); |
| | | return Result.success(enumService.selectEnumList(page, enums)); |
| | | } |
| | | |
| | | @ValueClassify("æ°æ®åå
¸") |
| | | @ApiOperation(value = "æ·»å æä¸¾") |
| | | @PostMapping("/addEnum") |
| | | public Result addEnum(@RequestBody Enums enums) { |
| | | return Result.success(enumService.addEnum(enums)); |
| | | } |
| | | |
| | | @ValueClassify("æ°æ®åå
¸") |
| | | @ApiOperation(value = "ä¿®æ¹æä¸¾") |
| | | @PostMapping("/upEnum") |
| | | public Result<?> upEnum(@RequestBody Enums enums) { |
| | | return Result.success(enumService.upEnum(enums)); |
| | | } |
| | | |
| | | @ValueClassify("æ°æ®åå
¸") |
| | | @ApiOperation(value = "å 餿䏾") |
| | | @PostMapping("/delEnum") |
| | | public Result<?> delEnum(Integer id) { |
| | | return Result.success(enumService.delEnum(id)); |
| | | } |
| | | |
| | | @ValueClassify("æ°æ®åå
¸") |
| | | @ApiOperation(value = "éè¿åç±»æ¥è¯¢æä¸¾") |
| | | @PostMapping("/selectEnumByCategory") |
| | | @ValueAuth |
| | | public Result<?> selectEnumByCategory(String category){ |
| | | return Result.success(enumService.selectEnumByCategory(category)); |
| | | } |
| | | |
| | | @ValueClassify("æ°æ®åå
¸") |
| | | @ApiOperation(value = "è·åæ°æ®åå
¸çåç±»") |
| | | @PostMapping("/getDic") |
| | | public Result<?> getDic(){ |
| | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.annotation.ValueAuth; |
| | | import com.yuanchu.mom.annotation.ValueClassify; |
| | | import com.yuanchu.mom.dto.RolePowerDto; |
| | | import com.yuanchu.mom.pojo.Role; |
| | | import com.yuanchu.mom.service.PowerService; |
| | |
| | | private RoleService roleService; |
| | | |
| | | private PowerService powerService; |
| | | |
| | | @ValueClassify("è§è²ç®¡ç") |
| | | @ApiOperation(value = "è·åè§è²å表æä¸¾") |
| | | @GetMapping("/selectRoleList") |
| | | public Result selectRoleList(){ |
| | | return Result.success(roleService.selectList()); |
| | | } |
| | | |
| | | |
| | | @ValueClassify("è§è²ç®¡ç") |
| | | @ApiOperation(value = "è·åè§è²å表") |
| | | @PostMapping("/selectRoleLists") |
| | | public Result selectRoleLists(@RequestBody Map<String, Object> data) throws Exception { |
| | |
| | | Role role = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), Role.class); |
| | | return Result.success(roleService.selectUserList(page, role)); |
| | | } |
| | | |
| | | @ValueClassify("è§è²ç®¡ç") |
| | | @ApiOperation(value = "å é¤è§è²å表") |
| | | @PostMapping("/delRole") |
| | | public Result delRole(Integer id){ |
| | | return Result.success(roleService.delRole(id)); |
| | | } |
| | | |
| | | @ValueClassify("è§è²ç®¡ç") |
| | | @ApiOperation(value = "éè¿è§è²idæ¥è¯¢æéå表") |
| | | @PostMapping("/selectPowerByRoleId") |
| | | public Result<?> selectPowerByRoleId(Integer id) { |
| | | return Result.success(powerService.selectPowerByRoleId(id)); |
| | | } |
| | | |
| | | @ValueClassify("è§è²ç®¡ç") |
| | | @ApiOperation(value = "è·åèå") |
| | | @GetMapping("/selectMenuList") |
| | | @ValueAuth |
| | | public Result<?> selectMenuList() { |
| | | return Result.success(roleService.selectMenuList()); |
| | | } |
| | | |
| | | @ValueClassify("è§è²ç®¡ç") |
| | | @ApiOperation(value = "æ·»å è§è²") |
| | | @PostMapping("/addRole") |
| | | public Result<?> addRole(String str) { |
| | | RolePowerDto powers = JSON.parseObject(str, RolePowerDto.class); |
| | | return Result.success(roleService.addRole(powers)); |
| | | } |
| | | |
| | | @ValueClassify("è§è²ç®¡ç") |
| | | @ApiOperation(value = "ä¿®æ¹è§è²ä¿¡æ¯") |
| | | @PostMapping("/upRole") |
| | | public Result<?> upRole(String str) { |
| | |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.annotation.ValueClassify; |
| | | import com.yuanchu.mom.pojo.PageSystemLogDto; |
| | | import com.yuanchu.mom.service.SystemLogService; |
| | | import com.yuanchu.mom.utils.JackSonUtil; |
| | |
| | | public class SystemLogController { |
| | | |
| | | private SystemLogService systemLogService; |
| | | |
| | | @ValueClassify("ç³»ç»æ¥å¿") |
| | | @ApiOperation(value = "è·åç³»ç»æ¥å¿å表") |
| | | @PostMapping("/selectSystemLogList") |
| | | public Result selectSystemLogList(@RequestBody Map<String, Object> data) throws Exception { |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.annotation.ValueAuth; |
| | | import com.yuanchu.mom.annotation.ValueClassify; |
| | | import com.yuanchu.mom.dto.Custom; |
| | | import com.yuanchu.mom.dto.UserPageDto; |
| | | import com.yuanchu.mom.pojo.User; |
| | |
| | | } |
| | | return Result.fail(map.get("info")); |
| | | } |
| | | |
| | | @ValueClassify("ç¨æ·ç®¡ç") |
| | | @ApiOperation(value = "è·åç¨æ·å表") |
| | | @PostMapping("/selectUserList") |
| | | public Result selectUserList(@RequestBody Map<String, Object> data) throws Exception { |
| | |
| | | UserPageDto user = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), UserPageDto.class); |
| | | return Result.success(userService.selectUserList(page, user)); |
| | | } |
| | | |
| | | @ValueClassify("ç¨æ·ç®¡ç") |
| | | @ApiOperation(value = "ä¿®æ¹ç¨æ·ä¿¡æ¯") |
| | | @PostMapping("/updateUser") |
| | | public Result<?> updateUser(@RequestBody User user) { |
| | |
| | | else user.setPassword(DigestUtils.md5DigestAsHex(user.getPassword().getBytes())); |
| | | return Result.success(userService.updateUser(user)); |
| | | } |
| | | |
| | | @ValueClassify("ç¨æ·ç®¡ç") |
| | | @ApiOperation(value = "æ·»å ç¨æ·ä¿¡æ¯") |
| | | @PostMapping("/addUser") |
| | | public Result<?> addUser(@RequestBody User user) { |
| | |
| | | public Result<?> getUserMenu() { |
| | | return Result.success(userService.getUserMenu()); |
| | | } |
| | | |
| | | @ValueClassify("ç¨æ·ç®¡ç") |
| | | @ApiOperation(value = "è·å客æ·å表") |
| | | @PostMapping("/selectCustomPageList") |
| | | public Result selectCustomPageList(@RequestBody Map<String, Object> data) throws Exception { |
| | |
| | | Custom custom = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), Custom.class); |
| | | return Result.success(customService.selectCustomPageList(page, custom)); |
| | | } |
| | | |
| | | @ValueClassify("ç¨æ·ç®¡ç") |
| | | @ApiOperation(value = "å é¤å®¢æ·ä¿¡æ¯") |
| | | @PostMapping("/delCustomById") |
| | | public Result<?> delCustomById(Integer id) { |
| | | return Result.success(customService.delCustomById(id)); |
| | | } |
| | | |
| | | @ValueClassify("ç¨æ·ç®¡ç") |
| | | @ApiOperation(value = "æ°å¢å®¢æ·ä¿¡æ¯") |
| | | @PostMapping("/addCustom") |
| | | public Result<?> addCustom(@RequestBody Custom custom) { |