24 changed files with 500 additions and 99 deletions
-
55src/main/java/com/iflytop/handacid/app/controller/AuditRecordController.java
-
44src/main/java/com/iflytop/handacid/app/controller/ChannelController.java
-
48src/main/java/com/iflytop/handacid/app/controller/FormulationController.java
-
55src/main/java/com/iflytop/handacid/app/controller/ReceiveRecordController.java
-
16src/main/java/com/iflytop/handacid/app/controller/SolutionController.java
-
11src/main/java/com/iflytop/handacid/common/mapper/AuditRecordMapper.java
-
11src/main/java/com/iflytop/handacid/common/mapper/ChannelMapper.java
-
11src/main/java/com/iflytop/handacid/common/mapper/FormulationMapper.java
-
11src/main/java/com/iflytop/handacid/common/mapper/ReceiveRecordMapper.java
-
4src/main/java/com/iflytop/handacid/common/mapper/SolutionMapper.java
-
26src/main/java/com/iflytop/handacid/common/model/entity/AuditRecord.java
-
20src/main/java/com/iflytop/handacid/common/model/entity/Channel.java
-
26src/main/java/com/iflytop/handacid/common/model/entity/Formulation.java
-
27src/main/java/com/iflytop/handacid/common/model/entity/ReceiveRecord.java
-
4src/main/java/com/iflytop/handacid/common/model/entity/Solution.java
-
14src/main/java/com/iflytop/handacid/common/service/AuditRecordService.java
-
14src/main/java/com/iflytop/handacid/common/service/ChannelService.java
-
14src/main/java/com/iflytop/handacid/common/service/FormulationService.java
-
14src/main/java/com/iflytop/handacid/common/service/ReceiveRecordService.java
-
6src/main/java/com/iflytop/handacid/common/service/SolutionService.java
@ -0,0 +1,55 @@ |
|||||
|
package com.iflytop.handacid.app.controller; |
||||
|
|
||||
|
import com.iflytop.handacid.common.model.entity.AuditRecord; |
||||
|
import com.iflytop.handacid.common.service.AuditRecordService; |
||||
|
import io.swagger.v3.oas.annotations.Operation; |
||||
|
import io.swagger.v3.oas.annotations.tags.Tag; |
||||
|
import lombok.RequiredArgsConstructor; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
import java.util.List; |
||||
|
/** |
||||
|
* 审计 |
||||
|
*/ |
||||
|
@Tag(name = "审计") |
||||
|
@RestController |
||||
|
@RequestMapping("/api/audit-record") |
||||
|
@RequiredArgsConstructor |
||||
|
@Slf4j |
||||
|
public class AuditRecordController { |
||||
|
@Autowired |
||||
|
private AuditRecordService auditRecordService; |
||||
|
|
||||
|
@GetMapping |
||||
|
@Operation(summary = "获取list数据") |
||||
|
public List<AuditRecord> getAll() { |
||||
|
return auditRecordService.list(); |
||||
|
} |
||||
|
|
||||
|
@GetMapping("/{id}") |
||||
|
@Operation(summary = "根据ID获取记录") |
||||
|
public AuditRecord getById(@PathVariable Integer id) { |
||||
|
return auditRecordService.getById(id); |
||||
|
} |
||||
|
|
||||
|
@PostMapping |
||||
|
@Operation(summary = "增加记录") |
||||
|
public boolean create(@RequestBody AuditRecord auditRecord) { |
||||
|
return auditRecordService.save(auditRecord); |
||||
|
} |
||||
|
|
||||
|
@PutMapping |
||||
|
@Operation(summary = "修改记录") |
||||
|
public boolean update(@RequestBody AuditRecord auditRecord) { |
||||
|
return auditRecordService.updateById(auditRecord); |
||||
|
} |
||||
|
|
||||
|
@DeleteMapping("/{id}") |
||||
|
@Operation(summary = "删除记录") |
||||
|
public boolean delete(@PathVariable Integer id) { |
||||
|
return auditRecordService.removeById(id); |
||||
|
} |
||||
|
} |
||||
|
|
@ -0,0 +1,44 @@ |
|||||
|
package com.iflytop.handacid.app.controller; |
||||
|
|
||||
|
import com.iflytop.handacid.common.model.entity.Channel; |
||||
|
import com.iflytop.handacid.common.service.ChannelService; |
||||
|
import io.swagger.v3.oas.annotations.Operation; |
||||
|
import io.swagger.v3.oas.annotations.tags.Tag; |
||||
|
import lombok.RequiredArgsConstructor; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
import java.util.List; |
||||
|
/** |
||||
|
* 通道 |
||||
|
*/ |
||||
|
@Tag(name = "通道") |
||||
|
@RestController |
||||
|
@RequestMapping("/api/channel") |
||||
|
@RequiredArgsConstructor |
||||
|
@Slf4j |
||||
|
public class ChannelController { |
||||
|
@Autowired |
||||
|
private ChannelService channelService; |
||||
|
|
||||
|
@GetMapping |
||||
|
@Operation(summary = "获取list数据") |
||||
|
public List<Channel> getAll() { |
||||
|
return channelService.list(); |
||||
|
} |
||||
|
|
||||
|
@GetMapping("/{id}") |
||||
|
@Operation(summary = "根据ID获取记录") |
||||
|
public Channel getById(@PathVariable Integer id) { |
||||
|
return channelService.getById(id); |
||||
|
} |
||||
|
|
||||
|
@PutMapping |
||||
|
@Operation(summary = "修改记录") |
||||
|
public boolean update(@RequestBody Channel channel) { |
||||
|
return channelService.updateById(channel); |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
@ -0,0 +1,48 @@ |
|||||
|
package com.iflytop.handacid.app.controller; |
||||
|
|
||||
|
import com.iflytop.handacid.common.model.entity.Formulation; |
||||
|
import com.iflytop.handacid.common.service.FormulationService; |
||||
|
import io.swagger.v3.oas.annotations.Operation; |
||||
|
import io.swagger.v3.oas.annotations.tags.Tag; |
||||
|
import lombok.RequiredArgsConstructor; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
import java.util.List; |
||||
|
/** |
||||
|
* 配方 |
||||
|
*/ |
||||
|
@Tag(name = "配方") |
||||
|
@RestController |
||||
|
@RequestMapping("/api/formulation") |
||||
|
@RequiredArgsConstructor |
||||
|
@Slf4j |
||||
|
public class FormulationController { |
||||
|
@Autowired |
||||
|
private FormulationService formulationService; |
||||
|
|
||||
|
@GetMapping |
||||
|
@Operation(summary = "获取List数据") |
||||
|
public List<Formulation> getAll() { |
||||
|
return formulationService.list(); |
||||
|
} |
||||
|
|
||||
|
@GetMapping("/{id}") |
||||
|
@Operation(summary = "根据ID获取") |
||||
|
public Formulation getById(@PathVariable Integer id) { |
||||
|
return formulationService.getById(id); |
||||
|
} |
||||
|
|
||||
|
@PostMapping |
||||
|
@Operation(summary = "创建配方") |
||||
|
public boolean create(@RequestBody Formulation formulation) { |
||||
|
return formulationService.save(formulation); |
||||
|
} |
||||
|
@DeleteMapping("/{id}") |
||||
|
@Operation(summary = "删除配方") |
||||
|
public boolean delete(@PathVariable Integer id) { |
||||
|
return formulationService.removeById(id); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,55 @@ |
|||||
|
package com.iflytop.handacid.app.controller; |
||||
|
|
||||
|
import com.iflytop.handacid.common.model.entity.ReceiveRecord; |
||||
|
import com.iflytop.handacid.common.service.ReceiveRecordService; |
||||
|
import io.swagger.v3.oas.annotations.Operation; |
||||
|
import io.swagger.v3.oas.annotations.tags.Tag; |
||||
|
import lombok.RequiredArgsConstructor; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
import java.util.List; |
||||
|
/** |
||||
|
* 领取 |
||||
|
*/ |
||||
|
@Tag(name = "领取记录") |
||||
|
@RestController |
||||
|
@RequestMapping("/api/receive-record") |
||||
|
@RequiredArgsConstructor |
||||
|
@Slf4j |
||||
|
public class ReceiveRecordController { |
||||
|
@Autowired |
||||
|
private ReceiveRecordService receiveRecordService; |
||||
|
|
||||
|
@GetMapping |
||||
|
@Operation(summary = "获取List数据") |
||||
|
public List<ReceiveRecord> getAll() { |
||||
|
return receiveRecordService.list(); |
||||
|
} |
||||
|
|
||||
|
@GetMapping("/{id}") |
||||
|
@Operation(summary = "根据ID获取") |
||||
|
public ReceiveRecord getById(@PathVariable Integer id) { |
||||
|
return receiveRecordService.getById(id); |
||||
|
} |
||||
|
|
||||
|
@PostMapping |
||||
|
@Operation(summary = "新增记录") |
||||
|
public boolean create(@RequestBody ReceiveRecord receiveRecord) { |
||||
|
return receiveRecordService.save(receiveRecord); |
||||
|
} |
||||
|
|
||||
|
@PutMapping |
||||
|
@Operation(summary = "修改记录") |
||||
|
public boolean update(@RequestBody ReceiveRecord receiveRecord) { |
||||
|
return receiveRecordService.updateById(receiveRecord); |
||||
|
} |
||||
|
|
||||
|
@DeleteMapping("/{id}") |
||||
|
@Operation(summary = "删除记录") |
||||
|
public boolean delete(@PathVariable Integer id) { |
||||
|
return receiveRecordService.removeById(id); |
||||
|
} |
||||
|
} |
||||
|
|
@ -0,0 +1,11 @@ |
|||||
|
package com.iflytop.handacid.common.mapper; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
import com.iflytop.handacid.common.model.entity.AuditRecord; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
/** |
||||
|
* 审计记录置持久层接口 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface AuditRecordMapper extends BaseMapper<AuditRecord> { |
||||
|
} |
@ -0,0 +1,11 @@ |
|||||
|
package com.iflytop.handacid.common.mapper; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
import com.iflytop.handacid.common.model.entity.Channel; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
/** |
||||
|
* 通道持久层接口 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface ChannelMapper extends BaseMapper<Channel> { |
||||
|
} |
@ -0,0 +1,11 @@ |
|||||
|
package com.iflytop.handacid.common.mapper; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
import com.iflytop.handacid.common.model.entity.Formulation; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
/** |
||||
|
* 配方持久层接口 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface FormulationMapper extends BaseMapper<Formulation> { |
||||
|
} |
@ -0,0 +1,11 @@ |
|||||
|
package com.iflytop.handacid.common.mapper; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
import com.iflytop.handacid.common.model.entity.ReceiveRecord; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
/** |
||||
|
* 领取记录持久层接口 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface ReceiveRecordMapper extends BaseMapper<ReceiveRecord> { |
||||
|
} |
@ -0,0 +1,26 @@ |
|||||
|
package com.iflytop.handacid.common.model.entity; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.*; |
||||
|
import com.iflytop.handacid.common.base.BaseEntity; |
||||
|
import io.swagger.v3.oas.annotations.media.Schema; |
||||
|
import lombok.Data; |
||||
|
import lombok.EqualsAndHashCode; |
||||
|
|
||||
|
@EqualsAndHashCode(callSuper = true) |
||||
|
@Data |
||||
|
@TableName("audit_record") |
||||
|
@Schema(description = "审计记录") |
||||
|
public class AuditRecord extends BaseEntity { |
||||
|
@Schema(description = "用户ID") |
||||
|
private Integer userId; |
||||
|
@Schema(description = "用户名称") |
||||
|
private String userName; |
||||
|
@Schema(description = "酸液ID") |
||||
|
private Integer solutionId; |
||||
|
@Schema(description = "酸液名称") |
||||
|
private String solutionName; |
||||
|
@Schema(description = "通道ID") |
||||
|
private Integer channelId; |
||||
|
@Schema(description = "加液量") |
||||
|
private String volume; |
||||
|
} |
@ -0,0 +1,20 @@ |
|||||
|
package com.iflytop.handacid.common.model.entity; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.*; |
||||
|
import com.iflytop.handacid.common.base.BaseEntity; |
||||
|
import io.swagger.v3.oas.annotations.media.Schema; |
||||
|
import lombok.Data; |
||||
|
import lombok.EqualsAndHashCode; |
||||
|
|
||||
|
@EqualsAndHashCode(callSuper = true) |
||||
|
@Data |
||||
|
@TableName("channel") |
||||
|
@Schema(description = "通道") |
||||
|
public class Channel extends BaseEntity { |
||||
|
@Schema(description = "名称") |
||||
|
private String name; |
||||
|
@Schema(description = "酸液ID") |
||||
|
private Integer solutionId; |
||||
|
|
||||
|
} |
||||
|
|
@ -0,0 +1,26 @@ |
|||||
|
package com.iflytop.handacid.common.model.entity; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
import com.iflytop.handacid.common.base.BaseEntity; |
||||
|
import io.swagger.v3.oas.annotations.media.Schema; |
||||
|
import lombok.Data; |
||||
|
import lombok.EqualsAndHashCode; |
||||
|
|
||||
|
@TableName("formulation") |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper = true) |
||||
|
@Schema(description = "配方") |
||||
|
public class Formulation extends BaseEntity { |
||||
|
@Schema(description = "名称") |
||||
|
private String name; |
||||
|
@Schema(description = "酸液ID") |
||||
|
private Integer solutionId; |
||||
|
@Schema(description = "酸液名称") |
||||
|
private String solutionName; |
||||
|
@Schema(description = "浓度") |
||||
|
private String concentration; |
||||
|
@Schema(description = "系数") |
||||
|
private String scale; |
||||
|
@Schema(description = "转数") |
||||
|
private String revolutions; |
||||
|
} |
@ -0,0 +1,27 @@ |
|||||
|
package com.iflytop.handacid.common.model.entity; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.*; |
||||
|
import com.iflytop.handacid.common.base.BaseEntity; |
||||
|
import io.swagger.v3.oas.annotations.media.Schema; |
||||
|
import lombok.Data; |
||||
|
import lombok.EqualsAndHashCode; |
||||
|
|
||||
|
|
||||
|
@TableName("receive_record") |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper = true) |
||||
|
@Schema(description = "领取记录") |
||||
|
public class ReceiveRecord extends BaseEntity { |
||||
|
@Schema(description = "用户ID") |
||||
|
private Integer userId; |
||||
|
@Schema(description = "用户名称") |
||||
|
private String userName; |
||||
|
@Schema(description = "酸液ID") |
||||
|
private Integer solutionId; |
||||
|
@Schema(description = "酸液名称") |
||||
|
private String solutionName; |
||||
|
@Schema(description = "通道ID") |
||||
|
private Integer channelId; |
||||
|
@Schema(description = "申请量") |
||||
|
private String volume; |
||||
|
} |
@ -0,0 +1,14 @@ |
|||||
|
package com.iflytop.handacid.common.service; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
|
import com.iflytop.handacid.common.mapper.AuditRecordMapper; |
||||
|
import com.iflytop.handacid.common.model.entity.AuditRecord; |
||||
|
import lombok.RequiredArgsConstructor; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
/** |
||||
|
* 审计记录接口服务 |
||||
|
*/ |
||||
|
@Service |
||||
|
@RequiredArgsConstructor |
||||
|
public class AuditRecordService extends ServiceImpl<AuditRecordMapper, AuditRecord> { |
||||
|
} |
@ -0,0 +1,14 @@ |
|||||
|
package com.iflytop.handacid.common.service; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
|
import com.iflytop.handacid.common.mapper.ChannelMapper; |
||||
|
import com.iflytop.handacid.common.model.entity.Channel; |
||||
|
import lombok.RequiredArgsConstructor; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
/** |
||||
|
* 通道接口服务 |
||||
|
*/ |
||||
|
@Service |
||||
|
@RequiredArgsConstructor |
||||
|
public class ChannelService extends ServiceImpl<ChannelMapper, Channel> { |
||||
|
} |
@ -0,0 +1,14 @@ |
|||||
|
package com.iflytop.handacid.common.service; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
|
import com.iflytop.handacid.common.mapper.FormulationMapper; |
||||
|
import com.iflytop.handacid.common.model.entity.Formulation; |
||||
|
import lombok.RequiredArgsConstructor; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
/** |
||||
|
* 配方接口服务 |
||||
|
*/ |
||||
|
@Service |
||||
|
@RequiredArgsConstructor |
||||
|
public class FormulationService extends ServiceImpl<FormulationMapper, Formulation> { |
||||
|
} |
@ -0,0 +1,14 @@ |
|||||
|
package com.iflytop.handacid.common.service; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
|
import com.iflytop.handacid.common.mapper.ReceiveRecordMapper; |
||||
|
import com.iflytop.handacid.common.model.entity.ReceiveRecord; |
||||
|
import lombok.RequiredArgsConstructor; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
/** |
||||
|
* 领取记录接口服务 |
||||
|
*/ |
||||
|
@Service |
||||
|
@RequiredArgsConstructor |
||||
|
public class ReceiveRecordService extends ServiceImpl<ReceiveRecordMapper, ReceiveRecord> { |
||||
|
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue