给序列号增加入库单价字段
This commit is contained in:
@@ -781,6 +781,7 @@ CREATE TABLE `jsh_serial_number` (
|
|||||||
`depot_id` bigint(20) DEFAULT NULL COMMENT '仓库id',
|
`depot_id` bigint(20) DEFAULT NULL COMMENT '仓库id',
|
||||||
`serial_number` varchar(64) DEFAULT NULL COMMENT '序列号',
|
`serial_number` varchar(64) DEFAULT NULL COMMENT '序列号',
|
||||||
`is_sell` varchar(1) DEFAULT '0' COMMENT '是否卖出,0未卖出,1卖出',
|
`is_sell` varchar(1) DEFAULT '0' COMMENT '是否卖出,0未卖出,1卖出',
|
||||||
|
`in_price` decimal(24,6) NULL DEFAULT NULL COMMENT '入库单价' ,
|
||||||
`remark` varchar(1024) DEFAULT NULL COMMENT '备注',
|
`remark` varchar(1024) DEFAULT NULL COMMENT '备注',
|
||||||
`delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除',
|
`delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除',
|
||||||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||||||
@@ -796,9 +797,9 @@ CREATE TABLE `jsh_serial_number` (
|
|||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Records of jsh_serial_number
|
-- Records of jsh_serial_number
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
INSERT INTO `jsh_serial_number` VALUES ('105', '586', '14', '12312323423223', '0', 'abab', '0', '2019-12-28 12:14:39', '63', '2020-07-21 00:30:32', '63', null, null, '63');
|
INSERT INTO `jsh_serial_number` VALUES ('105', '586', '14', '12312323423223', '0', null, 'abab', '0', '2019-12-28 12:14:39', '63', '2020-07-21 00:30:32', '63', null, null, '63');
|
||||||
INSERT INTO `jsh_serial_number` VALUES ('108', '586', '14', '3215952626621201', '0', '', '0', '2020-07-21 00:31:02', '63', '2020-07-21 00:31:02', '63', null, null, '63');
|
INSERT INTO `jsh_serial_number` VALUES ('108', '586', '14', '3215952626621201', '0', null, '', '0', '2020-07-21 00:31:02', '63', '2020-07-21 00:31:02', '63', null, null, '63');
|
||||||
INSERT INTO `jsh_serial_number` VALUES ('109', '586', '14', '3215952626621202', '0', '', '0', '2020-07-21 00:31:02', '63', '2020-07-21 00:31:02', '63', null, null, '63');
|
INSERT INTO `jsh_serial_number` VALUES ('109', '586', '14', '3215952626621202', '0', null, '', '0', '2020-07-21 00:31:02', '63', '2020-07-21 00:31:02', '63', null, null, '63');
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Table structure for jsh_supplier
|
-- Table structure for jsh_supplier
|
||||||
|
|||||||
@@ -1546,4 +1546,11 @@ update jsh_person set type='销售员' where type='业务员';
|
|||||||
-- by jishenghua
|
-- by jishenghua
|
||||||
-- 给系统参数表增加出入库管理启用标记,开启后,采购入库、采购退货、销售出库、销售退货单据都会经过出入库流程,适合有独立仓库的场景。
|
-- 给系统参数表增加出入库管理启用标记,开启后,采购入库、采购退货、销售出库、销售退货单据都会经过出入库流程,适合有独立仓库的场景。
|
||||||
-- --------------------------------------------------------
|
-- --------------------------------------------------------
|
||||||
alter table jsh_system_config add in_out_manage_flag varchar(1) DEFAULT '0' COMMENT '出入库管理启用标记,0未启用,1启用' after over_link_bill_flag;
|
alter table jsh_system_config add in_out_manage_flag varchar(1) DEFAULT '0' COMMENT '出入库管理启用标记,0未启用,1启用' after over_link_bill_flag;
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
-- 时间 2024年4月8日
|
||||||
|
-- by jishenghua
|
||||||
|
-- 给序列号表里面增加入库单价字段
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
alter table jsh_serial_number add in_price decimal(24,6) DEFAULT NULL COMMENT '入库单价' after is_sell;
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.jsh.erp.datasource.entities;
|
package com.jsh.erp.datasource.entities;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
public class SerialNumber {
|
public class SerialNumber {
|
||||||
@@ -13,6 +14,8 @@ public class SerialNumber {
|
|||||||
|
|
||||||
private String isSell;
|
private String isSell;
|
||||||
|
|
||||||
|
private BigDecimal inPrice;
|
||||||
|
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
private String deleteFlag;
|
private String deleteFlag;
|
||||||
@@ -71,6 +74,14 @@ public class SerialNumber {
|
|||||||
this.isSell = isSell == null ? null : isSell.trim();
|
this.isSell = isSell == null ? null : isSell.trim();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public BigDecimal getInPrice() {
|
||||||
|
return inPrice;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setInPrice(BigDecimal inPrice) {
|
||||||
|
this.inPrice = inPrice;
|
||||||
|
}
|
||||||
|
|
||||||
public String getRemark() {
|
public String getRemark() {
|
||||||
return remark;
|
return remark;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.jsh.erp.datasource.entities;
|
package com.jsh.erp.datasource.entities;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -425,6 +426,66 @@ public class SerialNumberExample {
|
|||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Criteria andInPriceIsNull() {
|
||||||
|
addCriterion("in_price is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andInPriceIsNotNull() {
|
||||||
|
addCriterion("in_price is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andInPriceEqualTo(BigDecimal value) {
|
||||||
|
addCriterion("in_price =", value, "inPrice");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andInPriceNotEqualTo(BigDecimal value) {
|
||||||
|
addCriterion("in_price <>", value, "inPrice");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andInPriceGreaterThan(BigDecimal value) {
|
||||||
|
addCriterion("in_price >", value, "inPrice");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andInPriceGreaterThanOrEqualTo(BigDecimal value) {
|
||||||
|
addCriterion("in_price >=", value, "inPrice");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andInPriceLessThan(BigDecimal value) {
|
||||||
|
addCriterion("in_price <", value, "inPrice");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andInPriceLessThanOrEqualTo(BigDecimal value) {
|
||||||
|
addCriterion("in_price <=", value, "inPrice");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andInPriceIn(List<BigDecimal> values) {
|
||||||
|
addCriterion("in_price in", values, "inPrice");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andInPriceNotIn(List<BigDecimal> values) {
|
||||||
|
addCriterion("in_price not in", values, "inPrice");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andInPriceBetween(BigDecimal value1, BigDecimal value2) {
|
||||||
|
addCriterion("in_price between", value1, value2, "inPrice");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andInPriceNotBetween(BigDecimal value1, BigDecimal value2) {
|
||||||
|
addCriterion("in_price not between", value1, value2, "inPrice");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
public Criteria andRemarkIsNull() {
|
public Criteria andRemarkIsNull() {
|
||||||
addCriterion("remark is null");
|
addCriterion("remark is null");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
|
|||||||
@@ -455,8 +455,12 @@ public class DepotItemService {
|
|||||||
int operNum = rowObj.getInteger("operNumber");
|
int operNum = rowObj.getInteger("operNumber");
|
||||||
if(snArray.length == operNum) {
|
if(snArray.length == operNum) {
|
||||||
Long depotId = rowObj.getLong("depotId");
|
Long depotId = rowObj.getLong("depotId");
|
||||||
|
BigDecimal inPrice = BigDecimal.ZERO;
|
||||||
|
if (StringUtil.isExist(rowObj.get("unitPrice"))) {
|
||||||
|
inPrice = rowObj.getBigDecimal("unitPrice");
|
||||||
|
}
|
||||||
serialNumberService.addSerialNumberByBill(depotHead.getType(), depotHead.getSubType(),
|
serialNumberService.addSerialNumberByBill(depotHead.getType(), depotHead.getSubType(),
|
||||||
depotHead.getNumber(), materialExtend.getMaterialId(), depotId, depotItem.getSnList());
|
depotHead.getNumber(), materialExtend.getMaterialId(), depotId, inPrice, depotItem.getSnList());
|
||||||
} else {
|
} else {
|
||||||
throw new BusinessRunTimeException(ExceptionConstants.DEPOT_HEAD_SN_NUMBERE_FAILED_CODE,
|
throw new BusinessRunTimeException(ExceptionConstants.DEPOT_HEAD_SN_NUMBERE_FAILED_CODE,
|
||||||
String.format(ExceptionConstants.DEPOT_HEAD_SN_NUMBERE_FAILED_MSG, barCode));
|
String.format(ExceptionConstants.DEPOT_HEAD_SN_NUMBERE_FAILED_MSG, barCode));
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ import org.springframework.web.context.request.ServletRequestAttributes;
|
|||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -352,7 +353,7 @@ public class SerialNumberService {
|
|||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addSerialNumberByBill(String type, String subType, String inBillNo, Long materialId, Long depotId, String snList) throws Exception {
|
public void addSerialNumberByBill(String type, String subType, String inBillNo, Long materialId, Long depotId, BigDecimal inPrice, String snList) throws Exception {
|
||||||
//录入序列号的时候不能和库里面的重复-入库
|
//录入序列号的时候不能和库里面的重复-入库
|
||||||
if ((BusinessConstants.SUB_TYPE_PURCHASE.equals(subType) ||
|
if ((BusinessConstants.SUB_TYPE_PURCHASE.equals(subType) ||
|
||||||
BusinessConstants.SUB_TYPE_OTHER.equals(subType) ||
|
BusinessConstants.SUB_TYPE_OTHER.equals(subType) ||
|
||||||
@@ -374,6 +375,7 @@ public class SerialNumberService {
|
|||||||
serialNumber.setMaterialId(materialId);
|
serialNumber.setMaterialId(materialId);
|
||||||
serialNumber.setDepotId(depotId);
|
serialNumber.setDepotId(depotId);
|
||||||
serialNumber.setSerialNumber(sn);
|
serialNumber.setSerialNumber(sn);
|
||||||
|
serialNumber.setInPrice(inPrice);
|
||||||
Date date = new Date();
|
Date date = new Date();
|
||||||
serialNumber.setCreateTime(date);
|
serialNumber.setCreateTime(date);
|
||||||
serialNumber.setUpdateTime(date);
|
serialNumber.setUpdateTime(date);
|
||||||
|
|||||||
@@ -1,353 +0,0 @@
|
|||||||
<?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.jsh.erp.datasource.mappers.SerialNumberMapper">
|
|
||||||
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.SerialNumber">
|
|
||||||
<id column="id" jdbcType="BIGINT" property="id" />
|
|
||||||
<result column="material_id" jdbcType="BIGINT" property="materialId" />
|
|
||||||
<result column="depot_id" jdbcType="BIGINT" property="depotId" />
|
|
||||||
<result column="serial_number" jdbcType="VARCHAR" property="serialNumber" />
|
|
||||||
<result column="is_sell" jdbcType="VARCHAR" property="isSell" />
|
|
||||||
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
|
||||||
<result column="delete_flag" jdbcType="VARCHAR" property="deleteFlag" />
|
|
||||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
|
||||||
<result column="creator" jdbcType="BIGINT" property="creator" />
|
|
||||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
|
||||||
<result column="updater" jdbcType="BIGINT" property="updater" />
|
|
||||||
<result column="in_bill_no" jdbcType="VARCHAR" property="inBillNo" />
|
|
||||||
<result column="out_bill_no" jdbcType="VARCHAR" property="outBillNo" />
|
|
||||||
<result column="tenant_id" jdbcType="BIGINT" property="tenantId" />
|
|
||||||
</resultMap>
|
|
||||||
<sql id="Example_Where_Clause">
|
|
||||||
<where>
|
|
||||||
<foreach collection="oredCriteria" item="criteria" separator="or">
|
|
||||||
<if test="criteria.valid">
|
|
||||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
|
||||||
<foreach collection="criteria.criteria" item="criterion">
|
|
||||||
<choose>
|
|
||||||
<when test="criterion.noValue">
|
|
||||||
and ${criterion.condition}
|
|
||||||
</when>
|
|
||||||
<when test="criterion.singleValue">
|
|
||||||
and ${criterion.condition} #{criterion.value}
|
|
||||||
</when>
|
|
||||||
<when test="criterion.betweenValue">
|
|
||||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
|
||||||
</when>
|
|
||||||
<when test="criterion.listValue">
|
|
||||||
and ${criterion.condition}
|
|
||||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
|
||||||
#{listItem}
|
|
||||||
</foreach>
|
|
||||||
</when>
|
|
||||||
</choose>
|
|
||||||
</foreach>
|
|
||||||
</trim>
|
|
||||||
</if>
|
|
||||||
</foreach>
|
|
||||||
</where>
|
|
||||||
</sql>
|
|
||||||
<sql id="Update_By_Example_Where_Clause">
|
|
||||||
<where>
|
|
||||||
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
|
||||||
<if test="criteria.valid">
|
|
||||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
|
||||||
<foreach collection="criteria.criteria" item="criterion">
|
|
||||||
<choose>
|
|
||||||
<when test="criterion.noValue">
|
|
||||||
and ${criterion.condition}
|
|
||||||
</when>
|
|
||||||
<when test="criterion.singleValue">
|
|
||||||
and ${criterion.condition} #{criterion.value}
|
|
||||||
</when>
|
|
||||||
<when test="criterion.betweenValue">
|
|
||||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
|
||||||
</when>
|
|
||||||
<when test="criterion.listValue">
|
|
||||||
and ${criterion.condition}
|
|
||||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
|
||||||
#{listItem}
|
|
||||||
</foreach>
|
|
||||||
</when>
|
|
||||||
</choose>
|
|
||||||
</foreach>
|
|
||||||
</trim>
|
|
||||||
</if>
|
|
||||||
</foreach>
|
|
||||||
</where>
|
|
||||||
</sql>
|
|
||||||
<sql id="Base_Column_List">
|
|
||||||
id, material_id, depot_id, serial_number, is_sell, remark, delete_flag, create_time,
|
|
||||||
creator, update_time, updater, in_bill_no, out_bill_no, tenant_id
|
|
||||||
</sql>
|
|
||||||
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.SerialNumberExample" resultMap="BaseResultMap">
|
|
||||||
select
|
|
||||||
<if test="distinct">
|
|
||||||
distinct
|
|
||||||
</if>
|
|
||||||
<include refid="Base_Column_List" />
|
|
||||||
from jsh_serial_number
|
|
||||||
<if test="_parameter != null">
|
|
||||||
<include refid="Example_Where_Clause" />
|
|
||||||
</if>
|
|
||||||
<if test="orderByClause != null">
|
|
||||||
order by ${orderByClause}
|
|
||||||
</if>
|
|
||||||
</select>
|
|
||||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
|
||||||
select
|
|
||||||
<include refid="Base_Column_List" />
|
|
||||||
from jsh_serial_number
|
|
||||||
where id = #{id,jdbcType=BIGINT}
|
|
||||||
</select>
|
|
||||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
|
||||||
delete from jsh_serial_number
|
|
||||||
where id = #{id,jdbcType=BIGINT}
|
|
||||||
</delete>
|
|
||||||
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.SerialNumberExample">
|
|
||||||
delete from jsh_serial_number
|
|
||||||
<if test="_parameter != null">
|
|
||||||
<include refid="Example_Where_Clause" />
|
|
||||||
</if>
|
|
||||||
</delete>
|
|
||||||
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.SerialNumber">
|
|
||||||
insert into jsh_serial_number (id, material_id, depot_id,
|
|
||||||
serial_number, is_sell, remark,
|
|
||||||
delete_flag, create_time, creator,
|
|
||||||
update_time, updater, in_bill_no,
|
|
||||||
out_bill_no, tenant_id)
|
|
||||||
values (#{id,jdbcType=BIGINT}, #{materialId,jdbcType=BIGINT}, #{depotId,jdbcType=BIGINT},
|
|
||||||
#{serialNumber,jdbcType=VARCHAR}, #{isSell,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR},
|
|
||||||
#{deleteFlag,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{creator,jdbcType=BIGINT},
|
|
||||||
#{updateTime,jdbcType=TIMESTAMP}, #{updater,jdbcType=BIGINT}, #{inBillNo,jdbcType=VARCHAR},
|
|
||||||
#{outBillNo,jdbcType=VARCHAR}, #{tenantId,jdbcType=BIGINT})
|
|
||||||
</insert>
|
|
||||||
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.SerialNumber">
|
|
||||||
insert into jsh_serial_number
|
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="id != null">
|
|
||||||
id,
|
|
||||||
</if>
|
|
||||||
<if test="materialId != null">
|
|
||||||
material_id,
|
|
||||||
</if>
|
|
||||||
<if test="depotId != null">
|
|
||||||
depot_id,
|
|
||||||
</if>
|
|
||||||
<if test="serialNumber != null">
|
|
||||||
serial_number,
|
|
||||||
</if>
|
|
||||||
<if test="isSell != null">
|
|
||||||
is_sell,
|
|
||||||
</if>
|
|
||||||
<if test="remark != null">
|
|
||||||
remark,
|
|
||||||
</if>
|
|
||||||
<if test="deleteFlag != null">
|
|
||||||
delete_flag,
|
|
||||||
</if>
|
|
||||||
<if test="createTime != null">
|
|
||||||
create_time,
|
|
||||||
</if>
|
|
||||||
<if test="creator != null">
|
|
||||||
creator,
|
|
||||||
</if>
|
|
||||||
<if test="updateTime != null">
|
|
||||||
update_time,
|
|
||||||
</if>
|
|
||||||
<if test="updater != null">
|
|
||||||
updater,
|
|
||||||
</if>
|
|
||||||
<if test="inBillNo != null">
|
|
||||||
in_bill_no,
|
|
||||||
</if>
|
|
||||||
<if test="outBillNo != null">
|
|
||||||
out_bill_no,
|
|
||||||
</if>
|
|
||||||
<if test="tenantId != null">
|
|
||||||
tenant_id,
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="id != null">
|
|
||||||
#{id,jdbcType=BIGINT},
|
|
||||||
</if>
|
|
||||||
<if test="materialId != null">
|
|
||||||
#{materialId,jdbcType=BIGINT},
|
|
||||||
</if>
|
|
||||||
<if test="depotId != null">
|
|
||||||
#{depotId,jdbcType=BIGINT},
|
|
||||||
</if>
|
|
||||||
<if test="serialNumber != null">
|
|
||||||
#{serialNumber,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="isSell != null">
|
|
||||||
#{isSell,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="remark != null">
|
|
||||||
#{remark,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="deleteFlag != null">
|
|
||||||
#{deleteFlag,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="createTime != null">
|
|
||||||
#{createTime,jdbcType=TIMESTAMP},
|
|
||||||
</if>
|
|
||||||
<if test="creator != null">
|
|
||||||
#{creator,jdbcType=BIGINT},
|
|
||||||
</if>
|
|
||||||
<if test="updateTime != null">
|
|
||||||
#{updateTime,jdbcType=TIMESTAMP},
|
|
||||||
</if>
|
|
||||||
<if test="updater != null">
|
|
||||||
#{updater,jdbcType=BIGINT},
|
|
||||||
</if>
|
|
||||||
<if test="inBillNo != null">
|
|
||||||
#{inBillNo,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="outBillNo != null">
|
|
||||||
#{outBillNo,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="tenantId != null">
|
|
||||||
#{tenantId,jdbcType=BIGINT},
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
</insert>
|
|
||||||
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.SerialNumberExample" resultType="java.lang.Long">
|
|
||||||
select count(*) from jsh_serial_number
|
|
||||||
<if test="_parameter != null">
|
|
||||||
<include refid="Example_Where_Clause" />
|
|
||||||
</if>
|
|
||||||
</select>
|
|
||||||
<update id="updateByExampleSelective" parameterType="map">
|
|
||||||
update jsh_serial_number
|
|
||||||
<set>
|
|
||||||
<if test="record.id != null">
|
|
||||||
id = #{record.id,jdbcType=BIGINT},
|
|
||||||
</if>
|
|
||||||
<if test="record.materialId != null">
|
|
||||||
material_id = #{record.materialId,jdbcType=BIGINT},
|
|
||||||
</if>
|
|
||||||
<if test="record.depotId != null">
|
|
||||||
depot_id = #{record.depotId,jdbcType=BIGINT},
|
|
||||||
</if>
|
|
||||||
<if test="record.serialNumber != null">
|
|
||||||
serial_number = #{record.serialNumber,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="record.isSell != null">
|
|
||||||
is_sell = #{record.isSell,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="record.remark != null">
|
|
||||||
remark = #{record.remark,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="record.deleteFlag != null">
|
|
||||||
delete_flag = #{record.deleteFlag,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="record.createTime != null">
|
|
||||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
|
||||||
</if>
|
|
||||||
<if test="record.creator != null">
|
|
||||||
creator = #{record.creator,jdbcType=BIGINT},
|
|
||||||
</if>
|
|
||||||
<if test="record.updateTime != null">
|
|
||||||
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
|
||||||
</if>
|
|
||||||
<if test="record.updater != null">
|
|
||||||
updater = #{record.updater,jdbcType=BIGINT},
|
|
||||||
</if>
|
|
||||||
<if test="record.inBillNo != null">
|
|
||||||
in_bill_no = #{record.inBillNo,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="record.outBillNo != null">
|
|
||||||
out_bill_no = #{record.outBillNo,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="record.tenantId != null">
|
|
||||||
tenant_id = #{record.tenantId,jdbcType=BIGINT},
|
|
||||||
</if>
|
|
||||||
</set>
|
|
||||||
<if test="_parameter != null">
|
|
||||||
<include refid="Update_By_Example_Where_Clause" />
|
|
||||||
</if>
|
|
||||||
</update>
|
|
||||||
<update id="updateByExample" parameterType="map">
|
|
||||||
update jsh_serial_number
|
|
||||||
set id = #{record.id,jdbcType=BIGINT},
|
|
||||||
material_id = #{record.materialId,jdbcType=BIGINT},
|
|
||||||
depot_id = #{record.depotId,jdbcType=BIGINT},
|
|
||||||
serial_number = #{record.serialNumber,jdbcType=VARCHAR},
|
|
||||||
is_sell = #{record.isSell,jdbcType=VARCHAR},
|
|
||||||
remark = #{record.remark,jdbcType=VARCHAR},
|
|
||||||
delete_flag = #{record.deleteFlag,jdbcType=VARCHAR},
|
|
||||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
|
||||||
creator = #{record.creator,jdbcType=BIGINT},
|
|
||||||
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
|
||||||
updater = #{record.updater,jdbcType=BIGINT},
|
|
||||||
in_bill_no = #{record.inBillNo,jdbcType=VARCHAR},
|
|
||||||
out_bill_no = #{record.outBillNo,jdbcType=VARCHAR},
|
|
||||||
tenant_id = #{record.tenantId,jdbcType=BIGINT}
|
|
||||||
<if test="_parameter != null">
|
|
||||||
<include refid="Update_By_Example_Where_Clause" />
|
|
||||||
</if>
|
|
||||||
</update>
|
|
||||||
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.SerialNumber">
|
|
||||||
update jsh_serial_number
|
|
||||||
<set>
|
|
||||||
<if test="materialId != null">
|
|
||||||
material_id = #{materialId,jdbcType=BIGINT},
|
|
||||||
</if>
|
|
||||||
<if test="depotId != null">
|
|
||||||
depot_id = #{depotId,jdbcType=BIGINT},
|
|
||||||
</if>
|
|
||||||
<if test="serialNumber != null">
|
|
||||||
serial_number = #{serialNumber,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="isSell != null">
|
|
||||||
is_sell = #{isSell,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="remark != null">
|
|
||||||
remark = #{remark,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="deleteFlag != null">
|
|
||||||
delete_flag = #{deleteFlag,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="createTime != null">
|
|
||||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
||||||
</if>
|
|
||||||
<if test="creator != null">
|
|
||||||
creator = #{creator,jdbcType=BIGINT},
|
|
||||||
</if>
|
|
||||||
<if test="updateTime != null">
|
|
||||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
|
||||||
</if>
|
|
||||||
<if test="updater != null">
|
|
||||||
updater = #{updater,jdbcType=BIGINT},
|
|
||||||
</if>
|
|
||||||
<if test="inBillNo != null">
|
|
||||||
in_bill_no = #{inBillNo,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="outBillNo != null">
|
|
||||||
out_bill_no = #{outBillNo,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="tenantId != null">
|
|
||||||
tenant_id = #{tenantId,jdbcType=BIGINT},
|
|
||||||
</if>
|
|
||||||
</set>
|
|
||||||
where id = #{id,jdbcType=BIGINT}
|
|
||||||
</update>
|
|
||||||
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.SerialNumber">
|
|
||||||
update jsh_serial_number
|
|
||||||
set material_id = #{materialId,jdbcType=BIGINT},
|
|
||||||
depot_id = #{depotId,jdbcType=BIGINT},
|
|
||||||
serial_number = #{serialNumber,jdbcType=VARCHAR},
|
|
||||||
is_sell = #{isSell,jdbcType=VARCHAR},
|
|
||||||
remark = #{remark,jdbcType=VARCHAR},
|
|
||||||
delete_flag = #{deleteFlag,jdbcType=VARCHAR},
|
|
||||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
||||||
creator = #{creator,jdbcType=BIGINT},
|
|
||||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
|
||||||
updater = #{updater,jdbcType=BIGINT},
|
|
||||||
in_bill_no = #{inBillNo,jdbcType=VARCHAR},
|
|
||||||
out_bill_no = #{outBillNo,jdbcType=VARCHAR},
|
|
||||||
tenant_id = #{tenantId,jdbcType=BIGINT}
|
|
||||||
where id = #{id,jdbcType=BIGINT}
|
|
||||||
</update>
|
|
||||||
</mapper>
|
|
||||||
Reference in New Issue
Block a user