新购模块
This commit is contained in:
parent
a0ea2c351e
commit
6f16907941
|
|
@ -0,0 +1,85 @@
|
||||||
|
package com.bonus.purchase.controller;
|
||||||
|
import com.bonus.common.core.domain.ResultBean;
|
||||||
|
import com.bonus.common.core.web.controller.BaseController;
|
||||||
|
import com.bonus.common.core.web.page.TableDataInfo;
|
||||||
|
import com.bonus.purchase.domain.BpmPurchaseInfo;
|
||||||
|
import com.bonus.purchase.service.impl.BpmPurchaseInfoService;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新购到货验收表bpm_purchase_info(bpm_purchase_info)表控制层
|
||||||
|
*
|
||||||
|
* @author 阮世耀
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/bpm_purchase_info")
|
||||||
|
public class BpmPurchaseInfoController extends BaseController {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 服务对象
|
||||||
|
*/
|
||||||
|
@Autowired
|
||||||
|
private BpmPurchaseInfoService bpmPurchaseInfoService;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询数据
|
||||||
|
*/
|
||||||
|
@GetMapping(value = "/list")
|
||||||
|
public TableDataInfo getList(BpmPurchaseInfo bpmPurchaseInfo) {
|
||||||
|
startPage();
|
||||||
|
List<BpmPurchaseInfo> list = this.bpmPurchaseInfoService.selectAll();
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过主键查询单条数据
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 单条数据
|
||||||
|
*/
|
||||||
|
@GetMapping("{id}")
|
||||||
|
public ResultBean<BpmPurchaseInfo> queryById(@PathVariable("id") Integer id) {
|
||||||
|
return ResultBean.success(this.bpmPurchaseInfoService.selectByPrimaryKey(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增数据
|
||||||
|
*
|
||||||
|
* @param bpmPurchaseInfo 实体
|
||||||
|
* @return 新增结果
|
||||||
|
*/
|
||||||
|
@PostMapping(value = "/add")
|
||||||
|
public ResultBean< Boolean> add(@RequestBody BpmPurchaseInfo bpmPurchaseInfo) {
|
||||||
|
this.bpmPurchaseInfoService.insertSelective(bpmPurchaseInfo);
|
||||||
|
return ResultBean.success(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑数据
|
||||||
|
*
|
||||||
|
* @param bpmPurchaseInfo 实体
|
||||||
|
* @return 编辑结果
|
||||||
|
*/
|
||||||
|
@PutMapping(value = "/update")
|
||||||
|
public ResultBean< Boolean> edit(@RequestBody BpmPurchaseInfo bpmPurchaseInfo) {
|
||||||
|
this.bpmPurchaseInfoService.updateByPrimaryKeySelective(bpmPurchaseInfo);
|
||||||
|
return ResultBean.success(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除数据
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 删除是否成功
|
||||||
|
*/
|
||||||
|
@PostMapping(value = "/delete/{id}")
|
||||||
|
public ResultBean< Boolean> deleteById(@PathVariable("id") Integer id) {
|
||||||
|
this.bpmPurchaseInfoService.deleteByPrimaryKey(id);
|
||||||
|
return ResultBean.success(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,143 @@
|
||||||
|
package com.bonus.purchase.domain;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*@PackagePath: com.bonus.purchase
|
||||||
|
*@author : 阮世耀
|
||||||
|
*@CreateTime: 2024-08-19 16:31
|
||||||
|
*@Description: 描述
|
||||||
|
*@version : 1.0
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* 新购到货验收表bpm_purchase_info
|
||||||
|
*/
|
||||||
|
@ApiModel(description="新购到货验收表bpm_purchase_info")
|
||||||
|
@Data
|
||||||
|
public class BpmPurchaseInfo implements Serializable {
|
||||||
|
/**
|
||||||
|
* id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="id")
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 任务id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="任务id")
|
||||||
|
private Integer taskId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 规格id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="规格id")
|
||||||
|
private Integer typeId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 采购数量按整型存储,按1000做倍数
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="采购数量按整型存储,按1000做倍数")
|
||||||
|
private Integer purchaseNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 验收数量按整型存储,按1000做倍数
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="验收数量按整型存储,按1000做倍数")
|
||||||
|
private Integer checkNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 采购价(含税)按整型存储,按100做倍数
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="采购价(含税)按整型存储,按100做倍数")
|
||||||
|
private Integer purchasePrice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 采购价(不含税)按整型存储,按100做倍数
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="采购价(不含税)按整型存储,按100做倍数")
|
||||||
|
private Integer notaxPrice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 税率
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="税率")
|
||||||
|
private Integer taxRate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 供应商id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="供应商id")
|
||||||
|
private Integer supplierId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出厂日期
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="出厂日期")
|
||||||
|
private Date productDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="状态")
|
||||||
|
private Byte status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 绑定数量100倍数
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="绑定数量100倍数")
|
||||||
|
private Integer bindNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 入库数量100倍数
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="入库数量100倍数")
|
||||||
|
private Integer inputNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新人
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="更新人")
|
||||||
|
private String updater;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="更新时间")
|
||||||
|
private String updateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核人
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="审核人")
|
||||||
|
private String auditor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="审核时间")
|
||||||
|
private String auditTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1启用0未启用
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="1启用0未启用")
|
||||||
|
private Byte isActive;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="备注")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件路径需讨论
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="文件路径需讨论")
|
||||||
|
private String fileUrl;
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,67 @@
|
||||||
|
package com.bonus.purchase.mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.bonus.purchase.domain.BpmPurchaseInfo;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*@PackagePath: com.bonus.purchase
|
||||||
|
*@author : 阮世耀
|
||||||
|
*@CreateTime: 2024-08-19 16:31
|
||||||
|
*@Description: 描述
|
||||||
|
*@version : 1.0
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface BpmPurchaseInfoMapper {
|
||||||
|
|
||||||
|
List<BpmPurchaseInfo> selectAll();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* delete by primary key
|
||||||
|
* @param id primaryKey
|
||||||
|
* @return deleteCount
|
||||||
|
*/
|
||||||
|
int deleteByPrimaryKey(Integer id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* insert record to table
|
||||||
|
* @param record the record
|
||||||
|
* @return insert count
|
||||||
|
*/
|
||||||
|
int insert(BpmPurchaseInfo record);
|
||||||
|
|
||||||
|
int insertOrUpdate(BpmPurchaseInfo record);
|
||||||
|
|
||||||
|
int insertOrUpdateSelective(BpmPurchaseInfo record);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* insert record to table selective
|
||||||
|
* @param record the record
|
||||||
|
* @return insert count
|
||||||
|
*/
|
||||||
|
int insertSelective(BpmPurchaseInfo record);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* select by primary key
|
||||||
|
* @param id primary key
|
||||||
|
* @return object by primary key
|
||||||
|
*/
|
||||||
|
BpmPurchaseInfo selectByPrimaryKey(Integer id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* update record selective
|
||||||
|
* @param record the updated record
|
||||||
|
* @return update count
|
||||||
|
*/
|
||||||
|
int updateByPrimaryKeySelective(BpmPurchaseInfo record);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* update record
|
||||||
|
* @param record the updated record
|
||||||
|
* @return update count
|
||||||
|
*/
|
||||||
|
int updateByPrimaryKey(BpmPurchaseInfo record);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,71 @@
|
||||||
|
package com.bonus.purchase.service.impl;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.bonus.purchase.mapper.BpmPurchaseInfoMapper;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
|
import com.bonus.purchase.domain.BpmPurchaseInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*@PackagePath: com.bonus.purchase
|
||||||
|
*@author : 阮世耀
|
||||||
|
*@CreateTime: 2024-08-19 16:31
|
||||||
|
*@Description: 描述
|
||||||
|
*@version : 1.0
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class BpmPurchaseInfoService{
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private BpmPurchaseInfoMapper bpmPurchaseInfoMapper;
|
||||||
|
|
||||||
|
|
||||||
|
public int deleteByPrimaryKey(Integer id) {
|
||||||
|
return bpmPurchaseInfoMapper.deleteByPrimaryKey(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public int insert(BpmPurchaseInfo record) {
|
||||||
|
return bpmPurchaseInfoMapper.insert(record);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public int insertOrUpdate(BpmPurchaseInfo record) {
|
||||||
|
return bpmPurchaseInfoMapper.insertOrUpdate(record);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public int insertOrUpdateSelective(BpmPurchaseInfo record) {
|
||||||
|
return bpmPurchaseInfoMapper.insertOrUpdateSelective(record);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public int insertSelective(BpmPurchaseInfo record) {
|
||||||
|
return bpmPurchaseInfoMapper.insertSelective(record);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public BpmPurchaseInfo selectByPrimaryKey(Integer id) {
|
||||||
|
return bpmPurchaseInfoMapper.selectByPrimaryKey(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public int updateByPrimaryKeySelective(BpmPurchaseInfo record) {
|
||||||
|
return bpmPurchaseInfoMapper.updateByPrimaryKeySelective(record);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public int updateByPrimaryKey(BpmPurchaseInfo record) {
|
||||||
|
return bpmPurchaseInfoMapper.updateByPrimaryKey(record);
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<BpmPurchaseInfo> selectAll(){
|
||||||
|
return bpmPurchaseInfoMapper.selectAll();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,550 @@
|
||||||
|
<?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.bonus.purchase.mapper.BpmPurchaseInfoMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="com.bonus.purchase.domain.BpmPurchaseInfo">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
<!--@Table bpm_purchase_info-->
|
||||||
|
<id column="id" jdbcType="INTEGER" property="id" />
|
||||||
|
<result column="task_id" jdbcType="INTEGER" property="taskId" />
|
||||||
|
<result column="type_id" jdbcType="INTEGER" property="typeId" />
|
||||||
|
<result column="purchase_num" jdbcType="INTEGER" property="purchaseNum" />
|
||||||
|
<result column="check_num" jdbcType="INTEGER" property="checkNum" />
|
||||||
|
<result column="purchase_price" jdbcType="INTEGER" property="purchasePrice" />
|
||||||
|
<result column="notax_price" jdbcType="INTEGER" property="notaxPrice" />
|
||||||
|
<result column="tax_rate" jdbcType="INTEGER" property="taxRate" />
|
||||||
|
<result column="supplier_id" jdbcType="INTEGER" property="supplierId" />
|
||||||
|
<result column="product_date" jdbcType="TIMESTAMP" property="productDate" />
|
||||||
|
<result column="status" jdbcType="TINYINT" property="status" />
|
||||||
|
<result column="bind_num" jdbcType="INTEGER" property="bindNum" />
|
||||||
|
<result column="input_num" jdbcType="INTEGER" property="inputNum" />
|
||||||
|
<result column="updater" jdbcType="VARCHAR" property="updater" />
|
||||||
|
<result column="update_time" jdbcType="VARCHAR" property="updateTime" />
|
||||||
|
<result column="auditor" jdbcType="VARCHAR" property="auditor" />
|
||||||
|
<result column="audit_time" jdbcType="VARCHAR" property="auditTime" />
|
||||||
|
<result column="is_active" jdbcType="TINYINT" property="isActive" />
|
||||||
|
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
||||||
|
<result column="file_url" jdbcType="VARCHAR" property="fileUrl" />
|
||||||
|
</resultMap>
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
id, task_id, type_id, purchase_num, check_num, purchase_price, notax_price, tax_rate,
|
||||||
|
supplier_id, product_date, `status`, bind_num, input_num, updater, update_time, auditor,
|
||||||
|
audit_time, is_active, remark, file_url
|
||||||
|
</sql>
|
||||||
|
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
select
|
||||||
|
<include refid="Base_Column_List" />
|
||||||
|
from bpm_purchase_info
|
||||||
|
where id = #{id,jdbcType=INTEGER}
|
||||||
|
</select>
|
||||||
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
delete from bpm_purchase_info
|
||||||
|
where id = #{id,jdbcType=INTEGER}
|
||||||
|
</delete>
|
||||||
|
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.bonus.purchase.domain.BpmPurchaseInfo" useGeneratedKeys="true">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
insert into bpm_purchase_info (task_id, type_id, purchase_num,
|
||||||
|
check_num, purchase_price, notax_price,
|
||||||
|
tax_rate, supplier_id, product_date,
|
||||||
|
`status`, bind_num, input_num,
|
||||||
|
updater, update_time, auditor,
|
||||||
|
audit_time, is_active, remark,
|
||||||
|
file_url)
|
||||||
|
values (#{taskId,jdbcType=INTEGER}, #{typeId,jdbcType=INTEGER}, #{purchaseNum,jdbcType=INTEGER},
|
||||||
|
#{checkNum,jdbcType=INTEGER}, #{purchasePrice,jdbcType=INTEGER}, #{notaxPrice,jdbcType=INTEGER},
|
||||||
|
#{taxRate,jdbcType=INTEGER}, #{supplierId,jdbcType=INTEGER}, #{productDate,jdbcType=TIMESTAMP},
|
||||||
|
#{status,jdbcType=TINYINT}, #{bindNum,jdbcType=INTEGER}, #{inputNum,jdbcType=INTEGER},
|
||||||
|
#{updater,jdbcType=VARCHAR}, #{updateTime,jdbcType=VARCHAR}, #{auditor,jdbcType=VARCHAR},
|
||||||
|
#{auditTime,jdbcType=VARCHAR}, #{isActive,jdbcType=TINYINT}, #{remark,jdbcType=VARCHAR},
|
||||||
|
#{fileUrl,jdbcType=VARCHAR})
|
||||||
|
</insert>
|
||||||
|
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.bonus.purchase.domain.BpmPurchaseInfo" useGeneratedKeys="true">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
insert into bpm_purchase_info
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="taskId != null">
|
||||||
|
task_id,
|
||||||
|
</if>
|
||||||
|
<if test="typeId != null">
|
||||||
|
type_id,
|
||||||
|
</if>
|
||||||
|
<if test="purchaseNum != null">
|
||||||
|
purchase_num,
|
||||||
|
</if>
|
||||||
|
<if test="checkNum != null">
|
||||||
|
check_num,
|
||||||
|
</if>
|
||||||
|
<if test="purchasePrice != null">
|
||||||
|
purchase_price,
|
||||||
|
</if>
|
||||||
|
<if test="notaxPrice != null">
|
||||||
|
notax_price,
|
||||||
|
</if>
|
||||||
|
<if test="taxRate != null">
|
||||||
|
tax_rate,
|
||||||
|
</if>
|
||||||
|
<if test="supplierId != null">
|
||||||
|
supplier_id,
|
||||||
|
</if>
|
||||||
|
<if test="productDate != null">
|
||||||
|
product_date,
|
||||||
|
</if>
|
||||||
|
<if test="status != null">
|
||||||
|
`status`,
|
||||||
|
</if>
|
||||||
|
<if test="bindNum != null">
|
||||||
|
bind_num,
|
||||||
|
</if>
|
||||||
|
<if test="inputNum != null">
|
||||||
|
input_num,
|
||||||
|
</if>
|
||||||
|
<if test="updater != null and updater != ''">
|
||||||
|
updater,
|
||||||
|
</if>
|
||||||
|
<if test="updateTime != null and updateTime != ''">
|
||||||
|
update_time,
|
||||||
|
</if>
|
||||||
|
<if test="auditor != null and auditor != ''">
|
||||||
|
auditor,
|
||||||
|
</if>
|
||||||
|
<if test="auditTime != null and auditTime != ''">
|
||||||
|
audit_time,
|
||||||
|
</if>
|
||||||
|
<if test="isActive != null">
|
||||||
|
is_active,
|
||||||
|
</if>
|
||||||
|
<if test="remark != null and remark != ''">
|
||||||
|
remark,
|
||||||
|
</if>
|
||||||
|
<if test="fileUrl != null and fileUrl != ''">
|
||||||
|
file_url,
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="taskId != null">
|
||||||
|
#{taskId,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="typeId != null">
|
||||||
|
#{typeId,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="purchaseNum != null">
|
||||||
|
#{purchaseNum,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="checkNum != null">
|
||||||
|
#{checkNum,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="purchasePrice != null">
|
||||||
|
#{purchasePrice,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="notaxPrice != null">
|
||||||
|
#{notaxPrice,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="taxRate != null">
|
||||||
|
#{taxRate,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="supplierId != null">
|
||||||
|
#{supplierId,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="productDate != null">
|
||||||
|
#{productDate,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="status != null">
|
||||||
|
#{status,jdbcType=TINYINT},
|
||||||
|
</if>
|
||||||
|
<if test="bindNum != null">
|
||||||
|
#{bindNum,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="inputNum != null">
|
||||||
|
#{inputNum,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="updater != null and updater != ''">
|
||||||
|
#{updater,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="updateTime != null and updateTime != ''">
|
||||||
|
#{updateTime,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="auditor != null and auditor != ''">
|
||||||
|
#{auditor,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="auditTime != null and auditTime != ''">
|
||||||
|
#{auditTime,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="isActive != null">
|
||||||
|
#{isActive,jdbcType=TINYINT},
|
||||||
|
</if>
|
||||||
|
<if test="remark != null and remark != ''">
|
||||||
|
#{remark,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="fileUrl != null and fileUrl != ''">
|
||||||
|
#{fileUrl,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
<update id="updateByPrimaryKeySelective" parameterType="com.bonus.purchase.domain.BpmPurchaseInfo">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
update bpm_purchase_info
|
||||||
|
<set>
|
||||||
|
<if test="taskId != null">
|
||||||
|
task_id = #{taskId,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="typeId != null">
|
||||||
|
type_id = #{typeId,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="purchaseNum != null">
|
||||||
|
purchase_num = #{purchaseNum,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="checkNum != null">
|
||||||
|
check_num = #{checkNum,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="purchasePrice != null">
|
||||||
|
purchase_price = #{purchasePrice,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="notaxPrice != null">
|
||||||
|
notax_price = #{notaxPrice,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="taxRate != null">
|
||||||
|
tax_rate = #{taxRate,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="supplierId != null">
|
||||||
|
supplier_id = #{supplierId,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="productDate != null">
|
||||||
|
product_date = #{productDate,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="status != null">
|
||||||
|
`status` = #{status,jdbcType=TINYINT},
|
||||||
|
</if>
|
||||||
|
<if test="bindNum != null">
|
||||||
|
bind_num = #{bindNum,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="inputNum != null">
|
||||||
|
input_num = #{inputNum,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="updater != null and updater != ''">
|
||||||
|
updater = #{updater,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="updateTime != null and updateTime != ''">
|
||||||
|
update_time = #{updateTime,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="auditor != null and auditor != ''">
|
||||||
|
auditor = #{auditor,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="auditTime != null and auditTime != ''">
|
||||||
|
audit_time = #{auditTime,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="isActive != null">
|
||||||
|
is_active = #{isActive,jdbcType=TINYINT},
|
||||||
|
</if>
|
||||||
|
<if test="remark != null and remark != ''">
|
||||||
|
remark = #{remark,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="fileUrl != null and fileUrl != ''">
|
||||||
|
file_url = #{fileUrl,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
</set>
|
||||||
|
where id = #{id,jdbcType=INTEGER}
|
||||||
|
</update>
|
||||||
|
<update id="updateByPrimaryKey" parameterType="com.bonus.purchase.domain.BpmPurchaseInfo">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
update bpm_purchase_info
|
||||||
|
set task_id = #{taskId,jdbcType=INTEGER},
|
||||||
|
type_id = #{typeId,jdbcType=INTEGER},
|
||||||
|
purchase_num = #{purchaseNum,jdbcType=INTEGER},
|
||||||
|
check_num = #{checkNum,jdbcType=INTEGER},
|
||||||
|
purchase_price = #{purchasePrice,jdbcType=INTEGER},
|
||||||
|
notax_price = #{notaxPrice,jdbcType=INTEGER},
|
||||||
|
tax_rate = #{taxRate,jdbcType=INTEGER},
|
||||||
|
supplier_id = #{supplierId,jdbcType=INTEGER},
|
||||||
|
product_date = #{productDate,jdbcType=TIMESTAMP},
|
||||||
|
`status` = #{status,jdbcType=TINYINT},
|
||||||
|
bind_num = #{bindNum,jdbcType=INTEGER},
|
||||||
|
input_num = #{inputNum,jdbcType=INTEGER},
|
||||||
|
updater = #{updater,jdbcType=VARCHAR},
|
||||||
|
update_time = #{updateTime,jdbcType=VARCHAR},
|
||||||
|
auditor = #{auditor,jdbcType=VARCHAR},
|
||||||
|
audit_time = #{auditTime,jdbcType=VARCHAR},
|
||||||
|
is_active = #{isActive,jdbcType=TINYINT},
|
||||||
|
remark = #{remark,jdbcType=VARCHAR},
|
||||||
|
file_url = #{fileUrl,jdbcType=VARCHAR}
|
||||||
|
where id = #{id,jdbcType=INTEGER}
|
||||||
|
</update>
|
||||||
|
<insert id="insertOrUpdate" keyColumn="id" keyProperty="id" parameterType="com.bonus.purchase.domain.BpmPurchaseInfo" useGeneratedKeys="true">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
insert into bpm_purchase_info
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="id != null">
|
||||||
|
id,
|
||||||
|
</if>
|
||||||
|
task_id,
|
||||||
|
type_id,
|
||||||
|
purchase_num,
|
||||||
|
check_num,
|
||||||
|
purchase_price,
|
||||||
|
notax_price,
|
||||||
|
tax_rate,
|
||||||
|
supplier_id,
|
||||||
|
product_date,
|
||||||
|
`status`,
|
||||||
|
bind_num,
|
||||||
|
input_num,
|
||||||
|
updater,
|
||||||
|
update_time,
|
||||||
|
auditor,
|
||||||
|
audit_time,
|
||||||
|
is_active,
|
||||||
|
remark,
|
||||||
|
file_url,
|
||||||
|
</trim>
|
||||||
|
values
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="id != null">
|
||||||
|
#{id,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
#{taskId,jdbcType=INTEGER},
|
||||||
|
#{typeId,jdbcType=INTEGER},
|
||||||
|
#{purchaseNum,jdbcType=INTEGER},
|
||||||
|
#{checkNum,jdbcType=INTEGER},
|
||||||
|
#{purchasePrice,jdbcType=INTEGER},
|
||||||
|
#{notaxPrice,jdbcType=INTEGER},
|
||||||
|
#{taxRate,jdbcType=INTEGER},
|
||||||
|
#{supplierId,jdbcType=INTEGER},
|
||||||
|
#{productDate,jdbcType=TIMESTAMP},
|
||||||
|
#{status,jdbcType=TINYINT},
|
||||||
|
#{bindNum,jdbcType=INTEGER},
|
||||||
|
#{inputNum,jdbcType=INTEGER},
|
||||||
|
#{updater,jdbcType=VARCHAR},
|
||||||
|
#{updateTime,jdbcType=VARCHAR},
|
||||||
|
#{auditor,jdbcType=VARCHAR},
|
||||||
|
#{auditTime,jdbcType=VARCHAR},
|
||||||
|
#{isActive,jdbcType=TINYINT},
|
||||||
|
#{remark,jdbcType=VARCHAR},
|
||||||
|
#{fileUrl,jdbcType=VARCHAR},
|
||||||
|
</trim>
|
||||||
|
on duplicate key update
|
||||||
|
<trim suffixOverrides=",">
|
||||||
|
<if test="id != null">
|
||||||
|
id = #{id,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
task_id = #{taskId,jdbcType=INTEGER},
|
||||||
|
type_id = #{typeId,jdbcType=INTEGER},
|
||||||
|
purchase_num = #{purchaseNum,jdbcType=INTEGER},
|
||||||
|
check_num = #{checkNum,jdbcType=INTEGER},
|
||||||
|
purchase_price = #{purchasePrice,jdbcType=INTEGER},
|
||||||
|
notax_price = #{notaxPrice,jdbcType=INTEGER},
|
||||||
|
tax_rate = #{taxRate,jdbcType=INTEGER},
|
||||||
|
supplier_id = #{supplierId,jdbcType=INTEGER},
|
||||||
|
product_date = #{productDate,jdbcType=TIMESTAMP},
|
||||||
|
`status` = #{status,jdbcType=TINYINT},
|
||||||
|
bind_num = #{bindNum,jdbcType=INTEGER},
|
||||||
|
input_num = #{inputNum,jdbcType=INTEGER},
|
||||||
|
updater = #{updater,jdbcType=VARCHAR},
|
||||||
|
update_time = #{updateTime,jdbcType=VARCHAR},
|
||||||
|
auditor = #{auditor,jdbcType=VARCHAR},
|
||||||
|
audit_time = #{auditTime,jdbcType=VARCHAR},
|
||||||
|
is_active = #{isActive,jdbcType=TINYINT},
|
||||||
|
remark = #{remark,jdbcType=VARCHAR},
|
||||||
|
file_url = #{fileUrl,jdbcType=VARCHAR},
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
<insert id="insertOrUpdateSelective" keyColumn="id" keyProperty="id" parameterType="com.bonus.purchase.domain.BpmPurchaseInfo" useGeneratedKeys="true">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
insert into bpm_purchase_info
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="id != null">
|
||||||
|
id,
|
||||||
|
</if>
|
||||||
|
<if test="taskId != null">
|
||||||
|
task_id,
|
||||||
|
</if>
|
||||||
|
<if test="typeId != null">
|
||||||
|
type_id,
|
||||||
|
</if>
|
||||||
|
<if test="purchaseNum != null">
|
||||||
|
purchase_num,
|
||||||
|
</if>
|
||||||
|
<if test="checkNum != null">
|
||||||
|
check_num,
|
||||||
|
</if>
|
||||||
|
<if test="purchasePrice != null">
|
||||||
|
purchase_price,
|
||||||
|
</if>
|
||||||
|
<if test="notaxPrice != null">
|
||||||
|
notax_price,
|
||||||
|
</if>
|
||||||
|
<if test="taxRate != null">
|
||||||
|
tax_rate,
|
||||||
|
</if>
|
||||||
|
<if test="supplierId != null">
|
||||||
|
supplier_id,
|
||||||
|
</if>
|
||||||
|
<if test="productDate != null">
|
||||||
|
product_date,
|
||||||
|
</if>
|
||||||
|
<if test="status != null">
|
||||||
|
`status`,
|
||||||
|
</if>
|
||||||
|
<if test="bindNum != null">
|
||||||
|
bind_num,
|
||||||
|
</if>
|
||||||
|
<if test="inputNum != null">
|
||||||
|
input_num,
|
||||||
|
</if>
|
||||||
|
<if test="updater != null and updater != ''">
|
||||||
|
updater,
|
||||||
|
</if>
|
||||||
|
<if test="updateTime != null and updateTime != ''">
|
||||||
|
update_time,
|
||||||
|
</if>
|
||||||
|
<if test="auditor != null and auditor != ''">
|
||||||
|
auditor,
|
||||||
|
</if>
|
||||||
|
<if test="auditTime != null and auditTime != ''">
|
||||||
|
audit_time,
|
||||||
|
</if>
|
||||||
|
<if test="isActive != null">
|
||||||
|
is_active,
|
||||||
|
</if>
|
||||||
|
<if test="remark != null and remark != ''">
|
||||||
|
remark,
|
||||||
|
</if>
|
||||||
|
<if test="fileUrl != null and fileUrl != ''">
|
||||||
|
file_url,
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
values
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="id != null">
|
||||||
|
#{id,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="taskId != null">
|
||||||
|
#{taskId,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="typeId != null">
|
||||||
|
#{typeId,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="purchaseNum != null">
|
||||||
|
#{purchaseNum,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="checkNum != null">
|
||||||
|
#{checkNum,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="purchasePrice != null">
|
||||||
|
#{purchasePrice,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="notaxPrice != null">
|
||||||
|
#{notaxPrice,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="taxRate != null">
|
||||||
|
#{taxRate,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="supplierId != null">
|
||||||
|
#{supplierId,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="productDate != null">
|
||||||
|
#{productDate,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="status != null">
|
||||||
|
#{status,jdbcType=TINYINT},
|
||||||
|
</if>
|
||||||
|
<if test="bindNum != null">
|
||||||
|
#{bindNum,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="inputNum != null">
|
||||||
|
#{inputNum,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="updater != null and updater != ''">
|
||||||
|
#{updater,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="updateTime != null and updateTime != ''">
|
||||||
|
#{updateTime,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="auditor != null and auditor != ''">
|
||||||
|
#{auditor,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="auditTime != null and auditTime != ''">
|
||||||
|
#{auditTime,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="isActive != null">
|
||||||
|
#{isActive,jdbcType=TINYINT},
|
||||||
|
</if>
|
||||||
|
<if test="remark != null and remark != ''">
|
||||||
|
#{remark,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="fileUrl != null and fileUrl != ''">
|
||||||
|
#{fileUrl,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
on duplicate key update
|
||||||
|
<trim suffixOverrides=",">
|
||||||
|
<if test="id != null">
|
||||||
|
id = #{id,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="taskId != null">
|
||||||
|
task_id = #{taskId,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="typeId != null">
|
||||||
|
type_id = #{typeId,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="purchaseNum != null">
|
||||||
|
purchase_num = #{purchaseNum,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="checkNum != null">
|
||||||
|
check_num = #{checkNum,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="purchasePrice != null">
|
||||||
|
purchase_price = #{purchasePrice,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="notaxPrice != null">
|
||||||
|
notax_price = #{notaxPrice,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="taxRate != null">
|
||||||
|
tax_rate = #{taxRate,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="supplierId != null">
|
||||||
|
supplier_id = #{supplierId,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="productDate != null">
|
||||||
|
product_date = #{productDate,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="status != null">
|
||||||
|
`status` = #{status,jdbcType=TINYINT},
|
||||||
|
</if>
|
||||||
|
<if test="bindNum != null">
|
||||||
|
bind_num = #{bindNum,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="inputNum != null">
|
||||||
|
input_num = #{inputNum,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="updater != null and updater != ''">
|
||||||
|
updater = #{updater,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="updateTime != null and updateTime != ''">
|
||||||
|
update_time = #{updateTime,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="auditor != null and auditor != ''">
|
||||||
|
auditor = #{auditor,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="auditTime != null and auditTime != ''">
|
||||||
|
audit_time = #{auditTime,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="isActive != null">
|
||||||
|
is_active = #{isActive,jdbcType=TINYINT},
|
||||||
|
</if>
|
||||||
|
<if test="remark != null and remark != ''">
|
||||||
|
remark = #{remark,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="fileUrl != null and fileUrl != ''">
|
||||||
|
file_url = #{fileUrl,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<!--by syruan on 2024-08-19-->
|
||||||
|
<select id="selectAll" resultMap="BaseResultMap">
|
||||||
|
select
|
||||||
|
<include refid="Base_Column_List"/>
|
||||||
|
from bpm_purchase_info
|
||||||
|
</select>
|
||||||
|
</mapper>
|
||||||
Loading…
Reference in New Issue