给商品和单据增加序列号和批次字段
This commit is contained in:
parent
06d91f8655
commit
09b603c80e
@ -1230,4 +1230,22 @@ INSERT INTO `jsh_platform_config` (`id`, `platform_key`, `platform_key_info`, `p
|
||||
-- by jishenghua
|
||||
-- 修改单据主表的状态字段描述
|
||||
-- --------------------------------------------------------
|
||||
alter table jsh_depot_head change status status varchar(1) DEFAULT NULL COMMENT '状态,0未审核、1已审核、2完成采购|销售、3部分采购|销售';
|
||||
alter table jsh_depot_head change status status varchar(1) DEFAULT NULL COMMENT '状态,0未审核、1已审核、2完成采购|销售、3部分采购|销售';
|
||||
|
||||
-- --------------------------------------------------------
|
||||
-- 时间 2021年9月27日
|
||||
-- by jishenghua
|
||||
-- 给商品表和单据字表增加字段
|
||||
-- --------------------------------------------------------
|
||||
alter table jsh_material add enable_batch_number varchar(1) DEFAULT 0 COMMENT '是否开启批号,0否,1是' after enable_serial_number;
|
||||
alter table jsh_material add expiry_num int(10) DEFAULT NULL COMMENT '保质期天数' after unit_id;
|
||||
alter table jsh_depot_item add sn_list varchar(2000) DEFAULT NULL COMMENT '序列号列表' after material_type;
|
||||
alter table jsh_depot_item add batch_number varchar(100) DEFAULT NULL COMMENT '批号' after sn_list;
|
||||
alter table jsh_depot_item add expiration_date datetime DEFAULT NULL COMMENT '有效日期' after batch_number;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
-- 时间 2021年9月27日
|
||||
-- by jishenghua
|
||||
-- 插入jsh_platform_config数据,配置租户续费地址
|
||||
-- --------------------------------------------------------
|
||||
INSERT INTO `jsh_platform_config` (`platform_key`, `platform_key_info`, `platform_value`) VALUES ('pay_fee_url', '租户续费地址', '');
|
||||
@ -27,6 +27,7 @@ import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
|
||||
import static com.jsh.erp.utils.ResponseJsonUtil.returnJson;
|
||||
import static com.jsh.erp.utils.Tools.getCenternTime;
|
||||
|
||||
/**
|
||||
* @author ji-sheng-hua 华夏erp
|
||||
@ -194,6 +195,9 @@ public class DepotItemController {
|
||||
}
|
||||
item.put("stock", stock);
|
||||
item.put("unit", diEx.getMaterialUnit());
|
||||
item.put("snList", diEx.getSnList());
|
||||
item.put("batchNumber", diEx.getBatchNumber());
|
||||
item.put("expirationDate", Tools.parseDateToStr(diEx.getExpirationDate()));
|
||||
item.put("sku", diEx.getSku());
|
||||
item.put("operNumber", diEx.getOperNumber());
|
||||
item.put("basicNumber", diEx.getBasicNumber());
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package com.jsh.erp.datasource.entities;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
public class DepotItem {
|
||||
private Long id;
|
||||
@ -39,6 +40,12 @@ public class DepotItem {
|
||||
|
||||
private String materialType;
|
||||
|
||||
private String snList;
|
||||
|
||||
private String batchNumber;
|
||||
|
||||
private Date expirationDate;
|
||||
|
||||
private Long tenantId;
|
||||
|
||||
private String deleteFlag;
|
||||
@ -187,6 +194,30 @@ public class DepotItem {
|
||||
this.materialType = materialType == null ? null : materialType.trim();
|
||||
}
|
||||
|
||||
public String getSnList() {
|
||||
return snList;
|
||||
}
|
||||
|
||||
public void setSnList(String snList) {
|
||||
this.snList = snList == null ? null : snList.trim();
|
||||
}
|
||||
|
||||
public String getBatchNumber() {
|
||||
return batchNumber;
|
||||
}
|
||||
|
||||
public void setBatchNumber(String batchNumber) {
|
||||
this.batchNumber = batchNumber == null ? null : batchNumber.trim();
|
||||
}
|
||||
|
||||
public Date getExpirationDate() {
|
||||
return expirationDate;
|
||||
}
|
||||
|
||||
public void setExpirationDate(Date expirationDate) {
|
||||
this.expirationDate = expirationDate;
|
||||
}
|
||||
|
||||
public Long getTenantId() {
|
||||
return tenantId;
|
||||
}
|
||||
|
||||
@ -2,6 +2,7 @@ package com.jsh.erp.datasource.entities;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
public class DepotItemExample {
|
||||
@ -1225,6 +1226,206 @@ public class DepotItemExample {
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSnListIsNull() {
|
||||
addCriterion("sn_list is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSnListIsNotNull() {
|
||||
addCriterion("sn_list is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSnListEqualTo(String value) {
|
||||
addCriterion("sn_list =", value, "snList");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSnListNotEqualTo(String value) {
|
||||
addCriterion("sn_list <>", value, "snList");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSnListGreaterThan(String value) {
|
||||
addCriterion("sn_list >", value, "snList");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSnListGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("sn_list >=", value, "snList");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSnListLessThan(String value) {
|
||||
addCriterion("sn_list <", value, "snList");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSnListLessThanOrEqualTo(String value) {
|
||||
addCriterion("sn_list <=", value, "snList");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSnListLike(String value) {
|
||||
addCriterion("sn_list like", value, "snList");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSnListNotLike(String value) {
|
||||
addCriterion("sn_list not like", value, "snList");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSnListIn(List<String> values) {
|
||||
addCriterion("sn_list in", values, "snList");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSnListNotIn(List<String> values) {
|
||||
addCriterion("sn_list not in", values, "snList");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSnListBetween(String value1, String value2) {
|
||||
addCriterion("sn_list between", value1, value2, "snList");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSnListNotBetween(String value1, String value2) {
|
||||
addCriterion("sn_list not between", value1, value2, "snList");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBatchNumberIsNull() {
|
||||
addCriterion("batch_number is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBatchNumberIsNotNull() {
|
||||
addCriterion("batch_number is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBatchNumberEqualTo(String value) {
|
||||
addCriterion("batch_number =", value, "batchNumber");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBatchNumberNotEqualTo(String value) {
|
||||
addCriterion("batch_number <>", value, "batchNumber");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBatchNumberGreaterThan(String value) {
|
||||
addCriterion("batch_number >", value, "batchNumber");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBatchNumberGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("batch_number >=", value, "batchNumber");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBatchNumberLessThan(String value) {
|
||||
addCriterion("batch_number <", value, "batchNumber");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBatchNumberLessThanOrEqualTo(String value) {
|
||||
addCriterion("batch_number <=", value, "batchNumber");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBatchNumberLike(String value) {
|
||||
addCriterion("batch_number like", value, "batchNumber");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBatchNumberNotLike(String value) {
|
||||
addCriterion("batch_number not like", value, "batchNumber");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBatchNumberIn(List<String> values) {
|
||||
addCriterion("batch_number in", values, "batchNumber");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBatchNumberNotIn(List<String> values) {
|
||||
addCriterion("batch_number not in", values, "batchNumber");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBatchNumberBetween(String value1, String value2) {
|
||||
addCriterion("batch_number between", value1, value2, "batchNumber");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBatchNumberNotBetween(String value1, String value2) {
|
||||
addCriterion("batch_number not between", value1, value2, "batchNumber");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExpirationDateIsNull() {
|
||||
addCriterion("expiration_date is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExpirationDateIsNotNull() {
|
||||
addCriterion("expiration_date is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExpirationDateEqualTo(Date value) {
|
||||
addCriterion("expiration_date =", value, "expirationDate");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExpirationDateNotEqualTo(Date value) {
|
||||
addCriterion("expiration_date <>", value, "expirationDate");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExpirationDateGreaterThan(Date value) {
|
||||
addCriterion("expiration_date >", value, "expirationDate");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExpirationDateGreaterThanOrEqualTo(Date value) {
|
||||
addCriterion("expiration_date >=", value, "expirationDate");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExpirationDateLessThan(Date value) {
|
||||
addCriterion("expiration_date <", value, "expirationDate");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExpirationDateLessThanOrEqualTo(Date value) {
|
||||
addCriterion("expiration_date <=", value, "expirationDate");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExpirationDateIn(List<Date> values) {
|
||||
addCriterion("expiration_date in", values, "expirationDate");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExpirationDateNotIn(List<Date> values) {
|
||||
addCriterion("expiration_date not in", values, "expirationDate");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExpirationDateBetween(Date value1, Date value2) {
|
||||
addCriterion("expiration_date between", value1, value2, "expirationDate");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExpirationDateNotBetween(Date value1, Date value2) {
|
||||
addCriterion("expiration_date not between", value1, value2, "expirationDate");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTenantIdIsNull() {
|
||||
addCriterion("tenant_id is null");
|
||||
return (Criteria) this;
|
||||
|
||||
@ -27,6 +27,8 @@ public class Material {
|
||||
|
||||
private Long unitId;
|
||||
|
||||
private Integer expiryNum;
|
||||
|
||||
private Boolean enabled;
|
||||
|
||||
private String otherField1;
|
||||
@ -37,6 +39,8 @@ public class Material {
|
||||
|
||||
private String enableSerialNumber;
|
||||
|
||||
private String enableBatchNumber;
|
||||
|
||||
private Long tenantId;
|
||||
|
||||
private String deleteFlag;
|
||||
@ -137,6 +141,14 @@ public class Material {
|
||||
this.unitId = unitId;
|
||||
}
|
||||
|
||||
public Integer getExpiryNum() {
|
||||
return expiryNum;
|
||||
}
|
||||
|
||||
public void setExpiryNum(Integer expiryNum) {
|
||||
this.expiryNum = expiryNum;
|
||||
}
|
||||
|
||||
public Boolean getEnabled() {
|
||||
return enabled;
|
||||
}
|
||||
@ -177,6 +189,14 @@ public class Material {
|
||||
this.enableSerialNumber = enableSerialNumber == null ? null : enableSerialNumber.trim();
|
||||
}
|
||||
|
||||
public String getEnableBatchNumber() {
|
||||
return enableBatchNumber;
|
||||
}
|
||||
|
||||
public void setEnableBatchNumber(String enableBatchNumber) {
|
||||
this.enableBatchNumber = enableBatchNumber == null ? null : enableBatchNumber.trim();
|
||||
}
|
||||
|
||||
public Long getTenantId() {
|
||||
return tenantId;
|
||||
}
|
||||
|
||||
@ -905,6 +905,66 @@ public class MaterialExample {
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExpiryNumIsNull() {
|
||||
addCriterion("expiry_num is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExpiryNumIsNotNull() {
|
||||
addCriterion("expiry_num is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExpiryNumEqualTo(Integer value) {
|
||||
addCriterion("expiry_num =", value, "expiryNum");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExpiryNumNotEqualTo(Integer value) {
|
||||
addCriterion("expiry_num <>", value, "expiryNum");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExpiryNumGreaterThan(Integer value) {
|
||||
addCriterion("expiry_num >", value, "expiryNum");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExpiryNumGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("expiry_num >=", value, "expiryNum");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExpiryNumLessThan(Integer value) {
|
||||
addCriterion("expiry_num <", value, "expiryNum");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExpiryNumLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("expiry_num <=", value, "expiryNum");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExpiryNumIn(List<Integer> values) {
|
||||
addCriterion("expiry_num in", values, "expiryNum");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExpiryNumNotIn(List<Integer> values) {
|
||||
addCriterion("expiry_num not in", values, "expiryNum");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExpiryNumBetween(Integer value1, Integer value2) {
|
||||
addCriterion("expiry_num between", value1, value2, "expiryNum");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExpiryNumNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("expiry_num not between", value1, value2, "expiryNum");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andEnabledIsNull() {
|
||||
addCriterion("enabled is null");
|
||||
return (Criteria) this;
|
||||
@ -1245,6 +1305,76 @@ public class MaterialExample {
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andEnableBatchNumberIsNull() {
|
||||
addCriterion("enable_batch_number is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andEnableBatchNumberIsNotNull() {
|
||||
addCriterion("enable_batch_number is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andEnableBatchNumberEqualTo(String value) {
|
||||
addCriterion("enable_batch_number =", value, "enableBatchNumber");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andEnableBatchNumberNotEqualTo(String value) {
|
||||
addCriterion("enable_batch_number <>", value, "enableBatchNumber");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andEnableBatchNumberGreaterThan(String value) {
|
||||
addCriterion("enable_batch_number >", value, "enableBatchNumber");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andEnableBatchNumberGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("enable_batch_number >=", value, "enableBatchNumber");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andEnableBatchNumberLessThan(String value) {
|
||||
addCriterion("enable_batch_number <", value, "enableBatchNumber");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andEnableBatchNumberLessThanOrEqualTo(String value) {
|
||||
addCriterion("enable_batch_number <=", value, "enableBatchNumber");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andEnableBatchNumberLike(String value) {
|
||||
addCriterion("enable_batch_number like", value, "enableBatchNumber");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andEnableBatchNumberNotLike(String value) {
|
||||
addCriterion("enable_batch_number not like", value, "enableBatchNumber");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andEnableBatchNumberIn(List<String> values) {
|
||||
addCriterion("enable_batch_number in", values, "enableBatchNumber");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andEnableBatchNumberNotIn(List<String> values) {
|
||||
addCriterion("enable_batch_number not in", values, "enableBatchNumber");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andEnableBatchNumberBetween(String value1, String value2) {
|
||||
addCriterion("enable_batch_number between", value1, value2, "enableBatchNumber");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andEnableBatchNumberNotBetween(String value1, String value2) {
|
||||
addCriterion("enable_batch_number not between", value1, value2, "enableBatchNumber");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTenantIdIsNull() {
|
||||
addCriterion("tenant_id is null");
|
||||
return (Criteria) this;
|
||||
|
||||
@ -84,6 +84,8 @@ public interface MaterialMapperEx {
|
||||
|
||||
int setUnitIdToNull(@Param("id") Long id);
|
||||
|
||||
int setExpiryNumToNull(@Param("id") Long id);
|
||||
|
||||
List<MaterialVo4Unit> getMaterialByBarCode(@Param("barCodeArray") String [] barCodeArray);
|
||||
|
||||
List<MaterialVo4Unit> getListWithStock(
|
||||
|
||||
@ -333,7 +333,18 @@ public class DepotItemService {
|
||||
depotItem.setMaterialId(materialExtend.getMaterialId());
|
||||
depotItem.setMaterialExtendId(materialExtend.getId());
|
||||
depotItem.setMaterialUnit(rowObj.getString("unit"));
|
||||
depotItem.setSku(rowObj.getString("sku"));
|
||||
if (StringUtil.isExist(rowObj.get("snList"))) {
|
||||
depotItem.setSnList(rowObj.getString("snList"));
|
||||
}
|
||||
if (StringUtil.isExist(rowObj.get("batchNumber"))) {
|
||||
depotItem.setBatchNumber(rowObj.getString("batchNumber"));
|
||||
}
|
||||
if (StringUtil.isExist(rowObj.get("expirationDate"))) {
|
||||
depotItem.setExpirationDate(rowObj.getDate("expirationDate"));
|
||||
}
|
||||
if (StringUtil.isExist(rowObj.get("sku"))) {
|
||||
depotItem.setSku(rowObj.getString("sku"));
|
||||
}
|
||||
if (StringUtil.isExist(rowObj.get("operNumber"))) {
|
||||
depotItem.setOperNumber(rowObj.getBigDecimal("operNumber"));
|
||||
String unit = rowObj.get("unit").toString();
|
||||
|
||||
@ -211,6 +211,9 @@ public class MaterialService {
|
||||
if(material.getUnitId() == null) {
|
||||
materialMapperEx.setUnitIdToNull(material.getId());
|
||||
}
|
||||
if(material.getExpiryNum() == null) {
|
||||
materialMapperEx.setExpiryNumToNull(material.getId());
|
||||
}
|
||||
materialExtendService.saveDetials(obj, obj.getString("sortList"),material.getId(), "update");
|
||||
if(obj.get("stock")!=null) {
|
||||
JSONArray stockArr = obj.getJSONArray("stock");
|
||||
|
||||
@ -20,6 +20,9 @@
|
||||
<result column="tax_money" jdbcType="DECIMAL" property="taxMoney" />
|
||||
<result column="tax_last_money" jdbcType="DECIMAL" property="taxLastMoney" />
|
||||
<result column="material_type" jdbcType="VARCHAR" property="materialType" />
|
||||
<result column="sn_list" jdbcType="VARCHAR" property="snList" />
|
||||
<result column="batch_number" jdbcType="VARCHAR" property="batchNumber" />
|
||||
<result column="expiration_date" jdbcType="TIMESTAMP" property="expirationDate" />
|
||||
<result column="tenant_id" jdbcType="BIGINT" property="tenantId" />
|
||||
<result column="delete_flag" jdbcType="VARCHAR" property="deleteFlag" />
|
||||
</resultMap>
|
||||
@ -84,7 +87,8 @@
|
||||
<sql id="Base_Column_List">
|
||||
id, header_id, material_id, material_extend_id, material_unit, sku, oper_number,
|
||||
basic_number, unit_price, tax_unit_price, all_price, remark, depot_id, another_depot_id,
|
||||
tax_rate, tax_money, tax_last_money, material_type, tenant_id, delete_flag
|
||||
tax_rate, tax_money, tax_last_money, material_type, sn_list, batch_number, expiration_date,
|
||||
tenant_id, delete_flag
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultMap="BaseResultMap">
|
||||
select
|
||||
@ -123,6 +127,7 @@
|
||||
tax_unit_price, all_price, remark,
|
||||
depot_id, another_depot_id, tax_rate,
|
||||
tax_money, tax_last_money, material_type,
|
||||
sn_list, batch_number, expiration_date,
|
||||
tenant_id, delete_flag)
|
||||
values (#{id,jdbcType=BIGINT}, #{headerId,jdbcType=BIGINT}, #{materialId,jdbcType=BIGINT},
|
||||
#{materialExtendId,jdbcType=BIGINT}, #{materialUnit,jdbcType=VARCHAR}, #{sku,jdbcType=VARCHAR},
|
||||
@ -130,6 +135,7 @@
|
||||
#{taxUnitPrice,jdbcType=DECIMAL}, #{allPrice,jdbcType=DECIMAL}, #{remark,jdbcType=VARCHAR},
|
||||
#{depotId,jdbcType=BIGINT}, #{anotherDepotId,jdbcType=BIGINT}, #{taxRate,jdbcType=DECIMAL},
|
||||
#{taxMoney,jdbcType=DECIMAL}, #{taxLastMoney,jdbcType=DECIMAL}, #{materialType,jdbcType=VARCHAR},
|
||||
#{snList,jdbcType=VARCHAR}, #{batchNumber,jdbcType=VARCHAR}, #{expirationDate,jdbcType=TIMESTAMP},
|
||||
#{tenantId,jdbcType=BIGINT}, #{deleteFlag,jdbcType=VARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.DepotItem">
|
||||
@ -189,6 +195,15 @@
|
||||
<if test="materialType != null">
|
||||
material_type,
|
||||
</if>
|
||||
<if test="snList != null">
|
||||
sn_list,
|
||||
</if>
|
||||
<if test="batchNumber != null">
|
||||
batch_number,
|
||||
</if>
|
||||
<if test="expirationDate != null">
|
||||
expiration_date,
|
||||
</if>
|
||||
<if test="tenantId != null">
|
||||
tenant_id,
|
||||
</if>
|
||||
@ -251,6 +266,15 @@
|
||||
<if test="materialType != null">
|
||||
#{materialType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="snList != null">
|
||||
#{snList,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="batchNumber != null">
|
||||
#{batchNumber,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="expirationDate != null">
|
||||
#{expirationDate,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="tenantId != null">
|
||||
#{tenantId,jdbcType=BIGINT},
|
||||
</if>
|
||||
@ -322,6 +346,15 @@
|
||||
<if test="record.materialType != null">
|
||||
material_type = #{record.materialType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.snList != null">
|
||||
sn_list = #{record.snList,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.batchNumber != null">
|
||||
batch_number = #{record.batchNumber,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.expirationDate != null">
|
||||
expiration_date = #{record.expirationDate,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.tenantId != null">
|
||||
tenant_id = #{record.tenantId,jdbcType=BIGINT},
|
||||
</if>
|
||||
@ -353,6 +386,9 @@
|
||||
tax_money = #{record.taxMoney,jdbcType=DECIMAL},
|
||||
tax_last_money = #{record.taxLastMoney,jdbcType=DECIMAL},
|
||||
material_type = #{record.materialType,jdbcType=VARCHAR},
|
||||
sn_list = #{record.snList,jdbcType=VARCHAR},
|
||||
batch_number = #{record.batchNumber,jdbcType=VARCHAR},
|
||||
expiration_date = #{record.expirationDate,jdbcType=TIMESTAMP},
|
||||
tenant_id = #{record.tenantId,jdbcType=BIGINT},
|
||||
delete_flag = #{record.deleteFlag,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
@ -413,6 +449,15 @@
|
||||
<if test="materialType != null">
|
||||
material_type = #{materialType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="snList != null">
|
||||
sn_list = #{snList,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="batchNumber != null">
|
||||
batch_number = #{batchNumber,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="expirationDate != null">
|
||||
expiration_date = #{expirationDate,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="tenantId != null">
|
||||
tenant_id = #{tenantId,jdbcType=BIGINT},
|
||||
</if>
|
||||
@ -441,6 +486,9 @@
|
||||
tax_money = #{taxMoney,jdbcType=DECIMAL},
|
||||
tax_last_money = #{taxLastMoney,jdbcType=DECIMAL},
|
||||
material_type = #{materialType,jdbcType=VARCHAR},
|
||||
sn_list = #{snList,jdbcType=VARCHAR},
|
||||
batch_number = #{batchNumber,jdbcType=VARCHAR},
|
||||
expiration_date = #{expirationDate,jdbcType=TIMESTAMP},
|
||||
tenant_id = #{tenantId,jdbcType=BIGINT},
|
||||
delete_flag = #{deleteFlag,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
|
||||
@ -14,11 +14,13 @@
|
||||
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
||||
<result column="img_name" jdbcType="VARCHAR" property="imgName" />
|
||||
<result column="unit_id" jdbcType="BIGINT" property="unitId" />
|
||||
<result column="expiry_num" jdbcType="INTEGER" property="expiryNum" />
|
||||
<result column="enabled" jdbcType="BIT" property="enabled" />
|
||||
<result column="other_field1" jdbcType="VARCHAR" property="otherField1" />
|
||||
<result column="other_field2" jdbcType="VARCHAR" property="otherField2" />
|
||||
<result column="other_field3" jdbcType="VARCHAR" property="otherField3" />
|
||||
<result column="enable_serial_number" jdbcType="VARCHAR" property="enableSerialNumber" />
|
||||
<result column="enable_batch_number" jdbcType="VARCHAR" property="enableBatchNumber" />
|
||||
<result column="tenant_id" jdbcType="BIGINT" property="tenantId" />
|
||||
<result column="delete_flag" jdbcType="VARCHAR" property="deleteFlag" />
|
||||
</resultMap>
|
||||
@ -82,8 +84,8 @@
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id, category_id, name, mfrs, safety_stock, model, standard, color, unit, remark,
|
||||
img_name, unit_id, enabled, other_field1, other_field2, other_field3, enable_serial_number,
|
||||
tenant_id, delete_flag
|
||||
img_name, unit_id, expiry_num, enabled, other_field1, other_field2, other_field3,
|
||||
enable_serial_number, enable_batch_number, tenant_id, delete_flag
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.MaterialExample" resultMap="BaseResultMap">
|
||||
select
|
||||
@ -120,16 +122,18 @@
|
||||
mfrs, safety_stock, model,
|
||||
standard, color, unit,
|
||||
remark, img_name, unit_id,
|
||||
enabled, other_field1, other_field2,
|
||||
other_field3, enable_serial_number, tenant_id,
|
||||
delete_flag)
|
||||
expiry_num, enabled, other_field1,
|
||||
other_field2, other_field3, enable_serial_number,
|
||||
enable_batch_number, tenant_id, delete_flag
|
||||
)
|
||||
values (#{id,jdbcType=BIGINT}, #{categoryId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR},
|
||||
#{mfrs,jdbcType=VARCHAR}, #{safetyStock,jdbcType=DECIMAL}, #{model,jdbcType=VARCHAR},
|
||||
#{standard,jdbcType=VARCHAR}, #{color,jdbcType=VARCHAR}, #{unit,jdbcType=VARCHAR},
|
||||
#{remark,jdbcType=VARCHAR}, #{imgName,jdbcType=VARCHAR}, #{unitId,jdbcType=BIGINT},
|
||||
#{enabled,jdbcType=BIT}, #{otherField1,jdbcType=VARCHAR}, #{otherField2,jdbcType=VARCHAR},
|
||||
#{otherField3,jdbcType=VARCHAR}, #{enableSerialNumber,jdbcType=VARCHAR}, #{tenantId,jdbcType=BIGINT},
|
||||
#{deleteFlag,jdbcType=VARCHAR})
|
||||
#{expiryNum,jdbcType=INTEGER}, #{enabled,jdbcType=BIT}, #{otherField1,jdbcType=VARCHAR},
|
||||
#{otherField2,jdbcType=VARCHAR}, #{otherField3,jdbcType=VARCHAR}, #{enableSerialNumber,jdbcType=VARCHAR},
|
||||
#{enableBatchNumber,jdbcType=VARCHAR}, #{tenantId,jdbcType=BIGINT}, #{deleteFlag,jdbcType=VARCHAR}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.Material">
|
||||
insert into jsh_material
|
||||
@ -170,6 +174,9 @@
|
||||
<if test="unitId != null">
|
||||
unit_id,
|
||||
</if>
|
||||
<if test="expiryNum != null">
|
||||
expiry_num,
|
||||
</if>
|
||||
<if test="enabled != null">
|
||||
enabled,
|
||||
</if>
|
||||
@ -185,6 +192,9 @@
|
||||
<if test="enableSerialNumber != null">
|
||||
enable_serial_number,
|
||||
</if>
|
||||
<if test="enableBatchNumber != null">
|
||||
enable_batch_number,
|
||||
</if>
|
||||
<if test="tenantId != null">
|
||||
tenant_id,
|
||||
</if>
|
||||
@ -229,6 +239,9 @@
|
||||
<if test="unitId != null">
|
||||
#{unitId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="expiryNum != null">
|
||||
#{expiryNum,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="enabled != null">
|
||||
#{enabled,jdbcType=BIT},
|
||||
</if>
|
||||
@ -244,6 +257,9 @@
|
||||
<if test="enableSerialNumber != null">
|
||||
#{enableSerialNumber,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="enableBatchNumber != null">
|
||||
#{enableBatchNumber,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="tenantId != null">
|
||||
#{tenantId,jdbcType=BIGINT},
|
||||
</if>
|
||||
@ -297,6 +313,9 @@
|
||||
<if test="record.unitId != null">
|
||||
unit_id = #{record.unitId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.expiryNum != null">
|
||||
expiry_num = #{record.expiryNum,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.enabled != null">
|
||||
enabled = #{record.enabled,jdbcType=BIT},
|
||||
</if>
|
||||
@ -312,6 +331,9 @@
|
||||
<if test="record.enableSerialNumber != null">
|
||||
enable_serial_number = #{record.enableSerialNumber,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.enableBatchNumber != null">
|
||||
enable_batch_number = #{record.enableBatchNumber,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.tenantId != null">
|
||||
tenant_id = #{record.tenantId,jdbcType=BIGINT},
|
||||
</if>
|
||||
@ -337,11 +359,13 @@
|
||||
remark = #{record.remark,jdbcType=VARCHAR},
|
||||
img_name = #{record.imgName,jdbcType=VARCHAR},
|
||||
unit_id = #{record.unitId,jdbcType=BIGINT},
|
||||
expiry_num = #{record.expiryNum,jdbcType=INTEGER},
|
||||
enabled = #{record.enabled,jdbcType=BIT},
|
||||
other_field1 = #{record.otherField1,jdbcType=VARCHAR},
|
||||
other_field2 = #{record.otherField2,jdbcType=VARCHAR},
|
||||
other_field3 = #{record.otherField3,jdbcType=VARCHAR},
|
||||
enable_serial_number = #{record.enableSerialNumber,jdbcType=VARCHAR},
|
||||
enable_batch_number = #{record.enableBatchNumber,jdbcType=VARCHAR},
|
||||
tenant_id = #{record.tenantId,jdbcType=BIGINT},
|
||||
delete_flag = #{record.deleteFlag,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
@ -384,6 +408,9 @@
|
||||
<if test="unitId != null">
|
||||
unit_id = #{unitId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="expiryNum != null">
|
||||
expiry_num = #{expiryNum,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="enabled != null">
|
||||
enabled = #{enabled,jdbcType=BIT},
|
||||
</if>
|
||||
@ -399,6 +426,9 @@
|
||||
<if test="enableSerialNumber != null">
|
||||
enable_serial_number = #{enableSerialNumber,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="enableBatchNumber != null">
|
||||
enable_batch_number = #{enableBatchNumber,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="tenantId != null">
|
||||
tenant_id = #{tenantId,jdbcType=BIGINT},
|
||||
</if>
|
||||
@ -421,11 +451,13 @@
|
||||
remark = #{remark,jdbcType=VARCHAR},
|
||||
img_name = #{imgName,jdbcType=VARCHAR},
|
||||
unit_id = #{unitId,jdbcType=BIGINT},
|
||||
expiry_num = #{expiryNum,jdbcType=INTEGER},
|
||||
enabled = #{enabled,jdbcType=BIT},
|
||||
other_field1 = #{otherField1,jdbcType=VARCHAR},
|
||||
other_field2 = #{otherField2,jdbcType=VARCHAR},
|
||||
other_field3 = #{otherField3,jdbcType=VARCHAR},
|
||||
enable_serial_number = #{enableSerialNumber,jdbcType=VARCHAR},
|
||||
enable_batch_number = #{enableBatchNumber,jdbcType=VARCHAR},
|
||||
tenant_id = #{tenantId,jdbcType=BIGINT},
|
||||
delete_flag = #{deleteFlag,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
|
||||
@ -327,6 +327,14 @@
|
||||
and id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="setExpiryNumToNull">
|
||||
update jsh_material
|
||||
set expiry_num = null
|
||||
where 1=1
|
||||
and ifnull(delete_flag,'0') !='1'
|
||||
and id = #{id}
|
||||
</update>
|
||||
|
||||
<select id="getListWithStock" resultMap="ResultMapListWithStock">
|
||||
select m.*, me.commodity_unit unitName, mc.name categoryName, me.bar_code,
|
||||
ifnull(me.purchase_decimal,0) purchase_decimal,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user