1. 耗材相关
This commit is contained in:
parent
0cbd18453c
commit
8980190dd5
|
|
@ -0,0 +1,39 @@
|
|||
package com.chushang.inspection.terminal;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.chushang.common.mybatis.base.BaseEntity;
|
||||
import java.util.Date;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @auther: zhao
|
||||
* @date: 2024/6/21 11:47
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper=true)
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@TableName(value = "consumable_details")
|
||||
public class ConsumableDetails extends BaseEntity {
|
||||
@TableField(value = "detail_id")
|
||||
private Long detailId;
|
||||
|
||||
@TableField(value = "dept_id")
|
||||
private Long deptId;
|
||||
|
||||
@TableField(value = "total_id")
|
||||
private Long totalId;
|
||||
|
||||
@TableField(value = "inbound_and_outbound_type")
|
||||
private Integer inboundAndOutboundType;
|
||||
|
||||
@TableField(value = "quantity")
|
||||
private Integer quantity;
|
||||
}
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
package com.chushang.inspection.terminal;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.chushang.common.mybatis.base.BaseEntity;
|
||||
import java.util.Date;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @auther: zhao
|
||||
* @date: 2024/6/21 11:47
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper=true)
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@TableName(value = "consumables_total")
|
||||
public class ConsumablesTotal extends BaseEntity {
|
||||
@TableId(value = "total_id", type = IdType.ASSIGN_ID)
|
||||
private Long totalId;
|
||||
|
||||
@TableField(value = "dept_id")
|
||||
private Long deptId;
|
||||
|
||||
@TableField(value = "`type`")
|
||||
private Integer type;
|
||||
|
||||
@TableField(value = "`source`")
|
||||
private Integer source;
|
||||
|
||||
@TableField(value = "total")
|
||||
private Long total;
|
||||
|
||||
@TableField(value = "remark")
|
||||
private String remark;
|
||||
|
||||
@TableField(value = "task_id")
|
||||
private Long taskId;
|
||||
}
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
package com.chushang.inspection.terminal.controller;
|
||||
import com.chushang.inspection.terminal.ConsumableDetails;
|
||||
import com.chushang.inspection.terminal.service.ConsumableDetailsService;
|
||||
import com.chushang.inspection.terminal.service.impl.ConsumableDetailsServiceImpl;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* (consumable_details)表控制层
|
||||
*
|
||||
* @author xxxxx
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/consumable_details")
|
||||
public class ConsumableDetailsController {
|
||||
/**
|
||||
* 服务对象
|
||||
*/
|
||||
@Resource
|
||||
ConsumableDetailsService consumableDetailsService;
|
||||
|
||||
/**
|
||||
* 通过主键查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 单条数据
|
||||
*/
|
||||
@GetMapping("selectOne")
|
||||
public ConsumableDetails selectOne(Integer id) {
|
||||
return consumableDetailsService.getById(id);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
package com.chushang.inspection.terminal.controller;
|
||||
import com.chushang.inspection.terminal.ConsumablesTotal;
|
||||
import com.chushang.inspection.terminal.service.ConsumablesTotalService;
|
||||
import com.chushang.inspection.terminal.service.impl.ConsumablesTotalServiceImpl;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* (consumables_total)表控制层
|
||||
*
|
||||
* @author xxxxx
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/consumables_total")
|
||||
public class ConsumablesTotalController {
|
||||
/**
|
||||
* 服务对象
|
||||
*/
|
||||
@Resource
|
||||
ConsumablesTotalService consumablesTotalService;
|
||||
|
||||
/**
|
||||
* 通过主键查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 单条数据
|
||||
*/
|
||||
@GetMapping("selectOne")
|
||||
public ConsumablesTotal selectOne(Integer id) {
|
||||
return consumablesTotalService.getById(id);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
package com.chushang.inspection.terminal.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.chushang.inspection.terminal.ConsumableDetails;
|
||||
|
||||
/**
|
||||
* @auther: zhao
|
||||
* @date: 2024/6/21 11:47
|
||||
*/
|
||||
public interface ConsumableDetailsMapper extends BaseMapper<ConsumableDetails> {
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
package com.chushang.inspection.terminal.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.chushang.inspection.terminal.ConsumablesTotal;
|
||||
|
||||
/**
|
||||
* @auther: zhao
|
||||
* @date: 2024/6/21 11:47
|
||||
*/
|
||||
public interface ConsumablesTotalMapper extends BaseMapper<ConsumablesTotal> {
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
package com.chushang.inspection.terminal.service;
|
||||
|
||||
import com.chushang.inspection.terminal.ConsumableDetails;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
/**
|
||||
* @auther: zhao
|
||||
* @date: 2024/6/21 11:47
|
||||
*/
|
||||
public interface ConsumableDetailsService extends IService<ConsumableDetails>{
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
package com.chushang.inspection.terminal.service;
|
||||
|
||||
import com.chushang.inspection.terminal.ConsumablesTotal;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
/**
|
||||
* @auther: zhao
|
||||
* @date: 2024/6/21 11:47
|
||||
*/
|
||||
public interface ConsumablesTotalService extends IService<ConsumablesTotal>{
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package com.chushang.inspection.terminal.service.impl;
|
||||
|
||||
import com.chushang.inspection.terminal.service.ConsumableDetailsService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.chushang.inspection.terminal.mapper.ConsumableDetailsMapper;
|
||||
import com.chushang.inspection.terminal.ConsumableDetails;
|
||||
/**
|
||||
* @auther: zhao
|
||||
* @date: 2024/6/21 11:47
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class ConsumableDetailsServiceImpl extends ServiceImpl<ConsumableDetailsMapper, ConsumableDetails> implements ConsumableDetailsService {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package com.chushang.inspection.terminal.service.impl;
|
||||
|
||||
import com.chushang.inspection.terminal.service.ConsumablesTotalService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.chushang.inspection.terminal.ConsumablesTotal;
|
||||
import com.chushang.inspection.terminal.mapper.ConsumablesTotalMapper;
|
||||
/**
|
||||
* @auther: zhao
|
||||
* @date: 2024/6/21 11:47
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class ConsumablesTotalServiceImpl extends ServiceImpl<ConsumablesTotalMapper, ConsumablesTotal> implements ConsumablesTotalService {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
<?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.chushang.inspection.terminal.mapper.ConsumableDetailsMapper">
|
||||
<resultMap id="BaseResultMap" type="com.chushang.inspection.terminal.ConsumableDetails">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table consumable_details-->
|
||||
<result column="detail_id" jdbcType="BIGINT" property="detailId" />
|
||||
<result column="dept_id" jdbcType="BIGINT" property="deptId" />
|
||||
<result column="total_id" jdbcType="BIGINT" property="totalId" />
|
||||
<result column="inbound_and_outbound_type" jdbcType="TINYINT" property="inboundAndOutboundType" />
|
||||
<result column="quantity" jdbcType="INTEGER" property="quantity" />
|
||||
<result column="version" jdbcType="BIGINT" property="version" />
|
||||
<result column="del_state" jdbcType="BOOLEAN" property="delState" />
|
||||
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="update_by" jdbcType="VARCHAR" property="updateBy" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
detail_id, dept_id, total_id, inbound_and_outbound_type, quantity, version, del_state,
|
||||
create_by, create_time, update_by, update_time
|
||||
</sql>
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
<?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.chushang.inspection.terminal.mapper.ConsumablesTotalMapper">
|
||||
<resultMap id="BaseResultMap" type="com.chushang.inspection.terminal.ConsumablesTotal">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table consumables_total-->
|
||||
<result column="total_id" jdbcType="BIGINT" property="totalId" />
|
||||
<result column="dept_id" jdbcType="BIGINT" property="deptId" />
|
||||
<result column="type" jdbcType="TINYINT" property="type" />
|
||||
<result column="source" jdbcType="TINYINT" property="source" />
|
||||
<result column="total" jdbcType="BIGINT" property="total" />
|
||||
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
||||
<result column="task_id" jdbcType="BIGINT" property="taskId" />
|
||||
<result column="version" jdbcType="BIGINT" property="version" />
|
||||
<result column="del_state" jdbcType="BOOLEAN" property="delState" />
|
||||
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="update_by" jdbcType="VARCHAR" property="updateBy" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
total_id, dept_id, `type`, `source`, total, remark, task_id, version, del_state,
|
||||
create_by, create_time, update_by, update_time
|
||||
</sql>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue