初定 第一版
This commit is contained in:
parent
2bc72469a0
commit
7c21dfe8e1
@ -19,7 +19,7 @@ public class CodeGenerator {
|
||||
|
||||
@Test
|
||||
public void test(){
|
||||
mybatisPlusGenerator(new String[]{"inspection_sheet"});
|
||||
mybatisPlusGenerator(new String[]{"unit"});
|
||||
}
|
||||
|
||||
public static void mybatisPlusGenerator(String[] include){
|
||||
|
@ -31,7 +31,7 @@ import java.util.Map;
|
||||
* 单位 表 前端控制器
|
||||
*
|
||||
* @author why
|
||||
* @since 2022-06-30
|
||||
* @since 2023-01-12
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/code/unit")
|
||||
@ -68,26 +68,26 @@ public class UnitController {
|
||||
@ApiOperation("保存")
|
||||
@LogOperation("保存")
|
||||
@PreAuthorize("@ex.hasAuthority('code:unit:save')")
|
||||
public Result save(@RequestBody UnitDTO dto){
|
||||
public Result<Long> save(@RequestBody UnitDTO dto){
|
||||
//效验数据
|
||||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
|
||||
|
||||
unitService.save(dto);
|
||||
|
||||
return new Result();
|
||||
return new Result<Long>().ok(dto.getId());
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@ApiOperation("修改")
|
||||
@LogOperation("修改")
|
||||
@PreAuthorize("@ex.hasAuthority('code:unit:update')")
|
||||
public Result update(@RequestBody UnitDTO dto){
|
||||
public Result<Long> update(@RequestBody UnitDTO dto){
|
||||
//效验数据
|
||||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
|
||||
|
||||
unitService.update(dto);
|
||||
|
||||
return new Result();
|
||||
return new Result<Long>().ok(dto.getId());
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
|
@ -14,7 +14,7 @@ import java.math.BigDecimal;
|
||||
* 单位 表
|
||||
*
|
||||
* @author why
|
||||
* @since 2022-06-30
|
||||
* @since 2023-01-12
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "单位 表DTO对象")
|
||||
@ -23,8 +23,8 @@ public class UnitDTO implements Serializable {
|
||||
|
||||
|
||||
|
||||
@ApiModelProperty(value = "ID")
|
||||
private BigDecimal id;
|
||||
@ApiModelProperty(value = "")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "单位 名")
|
||||
private String name;
|
||||
@ -33,19 +33,19 @@ public class UnitDTO implements Serializable {
|
||||
private String code;
|
||||
|
||||
@ApiModelProperty(value = "单位类型,1 可计数,2 不可计数")
|
||||
private BigDecimal type;
|
||||
private Integer type;
|
||||
|
||||
@ApiModelProperty(value = "1 可用,0 不可用")
|
||||
private BigDecimal status;
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty(value = "删除标志,是否有效:1 可用 0不可用")
|
||||
private BigDecimal valid;
|
||||
private Integer valid;
|
||||
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private BigDecimal creatorId;
|
||||
@ApiModelProperty(value = "")
|
||||
private Long creatorId;
|
||||
|
||||
@ApiModelProperty(value = "创建人姓名")
|
||||
private String creatorName;
|
||||
@ -53,8 +53,8 @@ public class UnitDTO implements Serializable {
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private BigDecimal updaterId;
|
||||
@ApiModelProperty(value = "")
|
||||
private Long updaterId;
|
||||
|
||||
@ApiModelProperty(value = "更新人姓名")
|
||||
private String updaterName;
|
||||
@ -63,6 +63,6 @@ public class UnitDTO implements Serializable {
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
@ApiModelProperty(value = "版本号")
|
||||
private BigDecimal version;
|
||||
private Integer version;
|
||||
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
package com.cnbm.generator.code.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
@ -13,7 +13,7 @@ import lombok.Data;
|
||||
* </p>
|
||||
*
|
||||
* @author why
|
||||
* @since 2022-06-30
|
||||
* @since 2023-01-12
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "Unit对象", description = "单位 表")
|
||||
@ -21,8 +21,7 @@ public class Unit implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("ID")
|
||||
private BigDecimal id;
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("单位 名")
|
||||
private String name;
|
||||
@ -31,19 +30,19 @@ public class Unit implements Serializable {
|
||||
private String code;
|
||||
|
||||
@ApiModelProperty("单位类型,1 可计数,2 不可计数")
|
||||
private BigDecimal type;
|
||||
private Integer type;
|
||||
|
||||
@ApiModelProperty("1 可用,0 不可用")
|
||||
private BigDecimal status;
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty("删除标志,是否有效:1 可用 0不可用")
|
||||
private BigDecimal valid;
|
||||
@TableLogic
|
||||
private Integer valid;
|
||||
|
||||
@ApiModelProperty("创建人")
|
||||
private BigDecimal creatorId;
|
||||
private Long creatorId;
|
||||
|
||||
@ApiModelProperty("创建人姓名")
|
||||
private String creatorName;
|
||||
@ -51,8 +50,7 @@ public class Unit implements Serializable {
|
||||
@ApiModelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@ApiModelProperty("更新人")
|
||||
private BigDecimal updaterId;
|
||||
private Long updaterId;
|
||||
|
||||
@ApiModelProperty("更新人姓名")
|
||||
private String updaterName;
|
||||
@ -61,7 +59,7 @@ public class Unit implements Serializable {
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
@ApiModelProperty("版本号")
|
||||
private BigDecimal version;
|
||||
private Integer version;
|
||||
|
||||
|
||||
}
|
||||
|
@ -12,37 +12,37 @@ import java.util.Date;
|
||||
* 单位 表
|
||||
*
|
||||
* @author why
|
||||
* @since 2022-06-30
|
||||
* @since 2023-01-12
|
||||
*/
|
||||
@Data
|
||||
public class UnitExcel {
|
||||
@Excel(name = "ID")
|
||||
private BigDecimal id;
|
||||
@Excel(name = "")
|
||||
private Long id;
|
||||
@Excel(name = "单位 名")
|
||||
private String name;
|
||||
@Excel(name = "单位 编码")
|
||||
private String code;
|
||||
@Excel(name = "单位类型,1 可计数,2 不可计数")
|
||||
private BigDecimal type;
|
||||
private Integer type;
|
||||
@Excel(name = "1 可用,0 不可用")
|
||||
private BigDecimal status;
|
||||
private Integer status;
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
@Excel(name = "删除标志,是否有效:1 可用 0不可用")
|
||||
private BigDecimal valid;
|
||||
@Excel(name = "创建人")
|
||||
private BigDecimal creatorId;
|
||||
private Integer valid;
|
||||
@Excel(name = "")
|
||||
private Long creatorId;
|
||||
@Excel(name = "创建人姓名")
|
||||
private String creatorName;
|
||||
@Excel(name = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
@Excel(name = "更新人")
|
||||
private BigDecimal updaterId;
|
||||
@Excel(name = "")
|
||||
private Long updaterId;
|
||||
@Excel(name = "更新人姓名")
|
||||
private String updaterName;
|
||||
@Excel(name = "更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
@Excel(name = "版本号")
|
||||
private BigDecimal version;
|
||||
private Integer version;
|
||||
|
||||
}
|
@ -8,7 +8,7 @@ import org.apache.ibatis.annotations.Mapper;
|
||||
* 单位 表
|
||||
*
|
||||
* @author why
|
||||
* @since 2022-06-30
|
||||
* @since 2023-01-12
|
||||
*/
|
||||
@Mapper
|
||||
public interface UnitMapper extends BaseDao<Unit> {
|
||||
|
@ -1,5 +1,21 @@
|
||||
<?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.cnbm.generator.code.mapper.UnitMapper">
|
||||
<resultMap type="com.cnbm.generator.code.entity.Unit" id="UnitMap">
|
||||
<id column="id" property="id" />
|
||||
<id column="name" property="name" />
|
||||
<id column="code" property="code" />
|
||||
<id column="type" property="type" />
|
||||
<id column="status" property="status" />
|
||||
<id column="remark" property="remark" />
|
||||
<id column="valid" property="valid" />
|
||||
<id column="creator_id" property="creatorId" />
|
||||
<id column="creator_name" property="creatorName" />
|
||||
<id column="create_time" property="createTime" />
|
||||
<id column="updater_id" property="updaterId" />
|
||||
<id column="updater_name" property="updaterName" />
|
||||
<id column="update_time" property="updateTime" />
|
||||
<id column="version" property="version" />
|
||||
</resultMap>
|
||||
|
||||
</mapper>
|
||||
|
@ -8,7 +8,7 @@ import com.cnbm.generator.code.entity.Unit;
|
||||
* 单位 表
|
||||
*
|
||||
* @author why
|
||||
* @since 2022-06-30
|
||||
* @since 2023-01-12
|
||||
*/
|
||||
public interface IUnitService extends CrudService<Unit, UnitDTO> {
|
||||
|
||||
|
@ -15,7 +15,7 @@ import java.util.Map;
|
||||
* 单位 表
|
||||
*
|
||||
* @author why
|
||||
* @since 2022-06-30
|
||||
* @since 2023-01-12
|
||||
*/
|
||||
@Service
|
||||
public class UnitServiceImpl extends CrudServiceImpl<UnitMapper, Unit, UnitDTO> implements IUnitService {
|
||||
|
@ -120,7 +120,7 @@ public enum InfluxClient {
|
||||
}else {
|
||||
point = Point.measurement(measurement)
|
||||
.addTag("transationId", event.getTransationId()==null ? "" : event.getTransationId())
|
||||
.addTag("inspectionSheetId", event.getInspectionSheetId())
|
||||
.addTag("inspectionSheetId", event.getInspectionSheetId()==null ? "" : event.getInspectionSheetId())
|
||||
|
||||
// .addTag("batchNum", event.getBatchNum())
|
||||
.addTag("sampleNumber", event.getSampleNumber())
|
||||
|
Loading…
Reference in New Issue
Block a user