优化安全库存,调整为每个仓库的安全库存
This commit is contained in:
@@ -10,7 +10,7 @@ Target Server Type : MYSQL
|
|||||||
Target Server Version : 50704
|
Target Server Version : 50704
|
||||||
File Encoding : 65001
|
File Encoding : 65001
|
||||||
|
|
||||||
Date: 2021-09-28 00:32:28
|
Date: 2021-10-29 18:44:03
|
||||||
*/
|
*/
|
||||||
|
|
||||||
SET FOREIGN_KEY_CHECKS=0;
|
SET FOREIGN_KEY_CHECKS=0;
|
||||||
@@ -386,7 +386,6 @@ CREATE TABLE `jsh_material` (
|
|||||||
`category_id` bigint(20) DEFAULT NULL COMMENT '产品类型id',
|
`category_id` bigint(20) DEFAULT NULL COMMENT '产品类型id',
|
||||||
`name` varchar(50) DEFAULT NULL COMMENT '名称',
|
`name` varchar(50) DEFAULT NULL COMMENT '名称',
|
||||||
`mfrs` varchar(50) DEFAULT NULL COMMENT '制造商',
|
`mfrs` varchar(50) DEFAULT NULL COMMENT '制造商',
|
||||||
`safety_stock` decimal(24,6) DEFAULT NULL COMMENT '安全存量(KG)',
|
|
||||||
`model` varchar(50) DEFAULT NULL COMMENT '型号',
|
`model` varchar(50) DEFAULT NULL COMMENT '型号',
|
||||||
`standard` varchar(50) DEFAULT NULL COMMENT '规格',
|
`standard` varchar(50) DEFAULT NULL COMMENT '规格',
|
||||||
`color` varchar(50) DEFAULT NULL COMMENT '颜色',
|
`color` varchar(50) DEFAULT NULL COMMENT '颜色',
|
||||||
@@ -395,6 +394,7 @@ CREATE TABLE `jsh_material` (
|
|||||||
`img_name` varchar(500) DEFAULT NULL COMMENT '图片名称',
|
`img_name` varchar(500) DEFAULT NULL COMMENT '图片名称',
|
||||||
`unit_id` bigint(20) DEFAULT NULL COMMENT '计量单位Id',
|
`unit_id` bigint(20) DEFAULT NULL COMMENT '计量单位Id',
|
||||||
`expiry_num` int(10) DEFAULT NULL COMMENT '保质期天数',
|
`expiry_num` int(10) DEFAULT NULL COMMENT '保质期天数',
|
||||||
|
`weight` decimal(24,6) DEFAULT NULL COMMENT '基础重量(kg)',
|
||||||
`enabled` bit(1) DEFAULT NULL COMMENT '启用 0-禁用 1-启用',
|
`enabled` bit(1) DEFAULT NULL COMMENT '启用 0-禁用 1-启用',
|
||||||
`other_field1` varchar(50) DEFAULT NULL COMMENT '自定义1',
|
`other_field1` varchar(50) DEFAULT NULL COMMENT '自定义1',
|
||||||
`other_field2` varchar(50) DEFAULT NULL COMMENT '自定义2',
|
`other_field2` varchar(50) DEFAULT NULL COMMENT '自定义2',
|
||||||
@@ -411,15 +411,15 @@ CREATE TABLE `jsh_material` (
|
|||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Records of jsh_material
|
-- Records of jsh_material
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
INSERT INTO `jsh_material` VALUES ('568', '17', '商品1', '制1', '100.000000', 'sp1', '', '', '个', '', null, null, null, '', '', '', '', '0', '0', '63', '0');
|
INSERT INTO `jsh_material` VALUES ('568', '17', '商品1', '制1', 'sp1', '', '', '个', '', null, null, null, null, '', '', '', '', '0', '0', '63', '0');
|
||||||
INSERT INTO `jsh_material` VALUES ('569', '17', '商品2', '', '200.000000', 'sp2', '', '', '只', '', null, null, null, '', '', '', '', '0', '0', '63', '0');
|
INSERT INTO `jsh_material` VALUES ('569', '17', '商品2', '', 'sp2', '', '', '只', '', null, null, null, null, '', '', '', '', '0', '0', '63', '0');
|
||||||
INSERT INTO `jsh_material` VALUES ('570', '17', '商品3', '', '300.000000', 'sp3', '', '', '个', '', null, null, null, '', '', '', '', '0', '0', '63', '0');
|
INSERT INTO `jsh_material` VALUES ('570', '17', '商品3', '', 'sp3', '', '', '个', '', null, null, null, null, '', '', '', '', '0', '0', '63', '0');
|
||||||
INSERT INTO `jsh_material` VALUES ('577', null, '商品8', '', null, 'sp8', '', '', '', '', null, '15', null, '', '', '', '', '0', '0', '63', '0');
|
INSERT INTO `jsh_material` VALUES ('577', null, '商品8', '', 'sp8', '', '', '', '', null, '15', null, null, '', '', '', '', '0', '0', '63', '0');
|
||||||
INSERT INTO `jsh_material` VALUES ('579', '21', '商品17', '', null, 'sp17', '', '', '', '', null, '15', null, '', '', '', '', '0', '0', '63', '0');
|
INSERT INTO `jsh_material` VALUES ('579', '21', '商品17', '', 'sp17', '', '', '', '', null, '15', null, null, '', '', '', '', '0', '0', '63', '0');
|
||||||
INSERT INTO `jsh_material` VALUES ('586', '17', '序列号商品测试', '', null, 'xlh123', '', '', '个', '', null, null, null, '', '', '', '', '1', '0', '63', '0');
|
INSERT INTO `jsh_material` VALUES ('586', '17', '序列号商品测试', '', 'xlh123', '', '', '个', '', null, null, null, null, '', '', '', '', '1', '0', '63', '0');
|
||||||
INSERT INTO `jsh_material` VALUES ('587', '17', '商品test1', '南通中远', null, '', 'test1', '', '个', '', null, null, null, '', '', '', '', '0', '0', '63', '0');
|
INSERT INTO `jsh_material` VALUES ('587', '17', '商品test1', '南通中远', '', 'test1', '', '个', '', null, null, null, null, '', '', '', '', '0', '0', '63', '0');
|
||||||
INSERT INTO `jsh_material` VALUES ('588', '21', '商品200', 'fafda', '112.000000', 'weqwe', '300ml', '红色', '个', 'aaaabbbbb', null, null, null, '', '', '', '', '0', '0', '63', '0');
|
INSERT INTO `jsh_material` VALUES ('588', '21', '商品200', 'fafda', 'weqwe', '300ml', '红色', '个', 'aaaabbbbb', null, null, null, null, '', '', '', '', '0', '0', '63', '0');
|
||||||
INSERT INTO `jsh_material` VALUES ('619', null, '衣服', null, null, null, null, null, '件', null, '', null, null, '', null, null, null, '0', '0', '63', '0');
|
INSERT INTO `jsh_material` VALUES ('619', null, '衣服', null, null, null, null, '件', null, '', null, null, null, '', null, null, null, '0', '0', '63', '0');
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Table structure for jsh_material_attribute
|
-- Table structure for jsh_material_attribute
|
||||||
@@ -546,6 +546,8 @@ CREATE TABLE `jsh_material_initial_stock` (
|
|||||||
`material_id` bigint(20) DEFAULT NULL COMMENT '产品id',
|
`material_id` bigint(20) DEFAULT NULL COMMENT '产品id',
|
||||||
`depot_id` bigint(20) DEFAULT NULL COMMENT '仓库id',
|
`depot_id` bigint(20) DEFAULT NULL COMMENT '仓库id',
|
||||||
`number` decimal(24,6) DEFAULT NULL COMMENT '初始库存数量',
|
`number` decimal(24,6) DEFAULT NULL COMMENT '初始库存数量',
|
||||||
|
`low_safe_stock` decimal(24,6) DEFAULT NULL COMMENT '最低库存数量',
|
||||||
|
`high_safe_stock` decimal(24,6) DEFAULT NULL COMMENT '最高库存数量',
|
||||||
`tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id',
|
`tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id',
|
||||||
`delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除',
|
`delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除',
|
||||||
PRIMARY KEY (`id`)
|
PRIMARY KEY (`id`)
|
||||||
@@ -742,21 +744,21 @@ INSERT INTO `jsh_sequence` VALUES ('depot_number_seq', '1', '999999999999999999'
|
|||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
DROP TABLE IF EXISTS `jsh_serial_number`;
|
DROP TABLE IF EXISTS `jsh_serial_number`;
|
||||||
CREATE TABLE `jsh_serial_number` (
|
CREATE TABLE `jsh_serial_number` (
|
||||||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||||
`material_id` bigint(20) DEFAULT NULL COMMENT '产品表id',
|
`material_id` bigint(20) DEFAULT NULL COMMENT '产品表id',
|
||||||
`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卖出',
|
||||||
`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 '创建时间',
|
||||||
`creator` bigint(20) DEFAULT NULL COMMENT '创建人',
|
`creator` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||||||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||||||
`updater` bigint(20) DEFAULT NULL COMMENT '更新人',
|
`updater` bigint(20) DEFAULT NULL COMMENT '更新人',
|
||||||
`in_bill_no` varchar(50) DEFAULT NULL COMMENT '入库单号',
|
`in_bill_no` varchar(50) DEFAULT NULL COMMENT '入库单号',
|
||||||
`out_bill_no` varchar(50) DEFAULT NULL COMMENT '出库单号',
|
`out_bill_no` varchar(50) DEFAULT NULL COMMENT '出库单号',
|
||||||
`tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id',
|
`tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id',
|
||||||
PRIMARY KEY (`id`)
|
PRIMARY KEY (`id`)
|
||||||
) ENGINE=InnoDB AUTO_INCREMENT=110 DEFAULT CHARSET=utf8 COMMENT='序列号表';
|
) ENGINE=InnoDB AUTO_INCREMENT=110 DEFAULT CHARSET=utf8 COMMENT='序列号表';
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
|
|||||||
@@ -1274,3 +1274,15 @@ delete from jsh_function where number='010104';
|
|||||||
-- 给租户表增加备注字段
|
-- 给租户表增加备注字段
|
||||||
-- --------------------------------------------------------
|
-- --------------------------------------------------------
|
||||||
alter table jsh_tenant add remark varchar(500) DEFAULT NULL COMMENT '备注' after expire_time;
|
alter table jsh_tenant add remark varchar(500) DEFAULT NULL COMMENT '备注' after expire_time;
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
-- 时间 2021年10月29日
|
||||||
|
-- by jishenghua
|
||||||
|
-- 给商品初始库存表增加最低库存数量、最高库存数量字段
|
||||||
|
-- 给商品表增加基础重量字段
|
||||||
|
-- 给商品表移除安全库存字段
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
alter table jsh_material_initial_stock add low_safe_stock decimal(24,6) DEFAULT NULL COMMENT '最低库存数量' after number;
|
||||||
|
alter table jsh_material_initial_stock add high_safe_stock decimal(24,6) DEFAULT NULL COMMENT '最高库存数量' after low_safe_stock;
|
||||||
|
alter table jsh_material add weight decimal(24,6) DEFAULT NULL COMMENT '基础重量(kg)' after expiry_num;
|
||||||
|
alter table jsh_material drop column safety_stock;
|
||||||
@@ -6,6 +6,8 @@ import com.jsh.erp.constants.BusinessConstants;
|
|||||||
import com.jsh.erp.constants.ExceptionConstants;
|
import com.jsh.erp.constants.ExceptionConstants;
|
||||||
import com.jsh.erp.datasource.entities.Depot;
|
import com.jsh.erp.datasource.entities.Depot;
|
||||||
import com.jsh.erp.datasource.entities.DepotEx;
|
import com.jsh.erp.datasource.entities.DepotEx;
|
||||||
|
import com.jsh.erp.datasource.entities.MaterialCurrentStock;
|
||||||
|
import com.jsh.erp.datasource.entities.MaterialInitialStock;
|
||||||
import com.jsh.erp.exception.BusinessRunTimeException;
|
import com.jsh.erp.exception.BusinessRunTimeException;
|
||||||
import com.jsh.erp.service.depot.DepotService;
|
import com.jsh.erp.service.depot.DepotService;
|
||||||
import com.jsh.erp.service.material.MaterialService;
|
import com.jsh.erp.service.material.MaterialService;
|
||||||
@@ -153,6 +155,9 @@ public class DepotController {
|
|||||||
BigDecimal currentStock = materialService.getCurrentStock(mId, depot.getId());
|
BigDecimal currentStock = materialService.getCurrentStock(mId, depot.getId());
|
||||||
de.setInitStock(initStock);
|
de.setInitStock(initStock);
|
||||||
de.setCurrentStock(currentStock);
|
de.setCurrentStock(currentStock);
|
||||||
|
MaterialInitialStock materialInitialStock = materialService.getSafeStock(mId, depot.getId());
|
||||||
|
de.setLowSafeStock(materialInitialStock.getLowSafeStock());
|
||||||
|
de.setHighSafeStock(materialInitialStock.getHighSafeStock());
|
||||||
} else {
|
} else {
|
||||||
de.setInitStock(BigDecimal.ZERO);
|
de.setInitStock(BigDecimal.ZERO);
|
||||||
de.setCurrentStock(BigDecimal.ZERO);
|
de.setCurrentStock(BigDecimal.ZERO);
|
||||||
|
|||||||
@@ -327,23 +327,22 @@ public class MaterialController {
|
|||||||
try {
|
try {
|
||||||
List<MaterialVo4Unit> dataList = materialService.findByAll(StringUtil.toNull(barCode), StringUtil.toNull(name),
|
List<MaterialVo4Unit> dataList = materialService.findByAll(StringUtil.toNull(barCode), StringUtil.toNull(name),
|
||||||
StringUtil.toNull(standard), StringUtil.toNull(model), StringUtil.toNull(categoryId));
|
StringUtil.toNull(standard), StringUtil.toNull(model), StringUtil.toNull(categoryId));
|
||||||
String[] names = {"名称", "类型", "型号", "安全存量", "单位", "零售价", "最低售价", "采购价", "销售价", "备注", "状态"};
|
String[] names = {"名称", "类型", "型号", "单位", "零售价", "最低售价", "采购价", "销售价", "备注", "状态"};
|
||||||
String title = "商品信息";
|
String title = "商品信息";
|
||||||
List<String[]> objects = new ArrayList<String[]>();
|
List<String[]> objects = new ArrayList<String[]>();
|
||||||
if (null != dataList) {
|
if (null != dataList) {
|
||||||
for (MaterialVo4Unit m : dataList) {
|
for (MaterialVo4Unit m : dataList) {
|
||||||
String[] objs = new String[11];
|
String[] objs = new String[10];
|
||||||
objs[0] = m.getName();
|
objs[0] = m.getName();
|
||||||
objs[1] = m.getCategoryName();
|
objs[1] = m.getCategoryName();
|
||||||
objs[2] = m.getModel();
|
objs[2] = m.getModel();
|
||||||
objs[3] = m.getSafetyStock() == null? "" : m.getSafetyStock().toString();
|
objs[3] = m.getCommodityUnit();
|
||||||
objs[4] = m.getCommodityUnit();
|
objs[4] = m.getCommodityDecimal() == null? "" : m.getCommodityDecimal().toString();
|
||||||
objs[5] = m.getCommodityDecimal() == null? "" : m.getCommodityDecimal().toString();
|
objs[5] = m.getLowDecimal() == null? "" : m.getLowDecimal().toString();
|
||||||
objs[6] = m.getLowDecimal() == null? "" : m.getLowDecimal().toString();
|
objs[6] = m.getPurchaseDecimal() == null? "" : m.getPurchaseDecimal().toString();
|
||||||
objs[7] = m.getPurchaseDecimal() == null? "" : m.getPurchaseDecimal().toString();
|
objs[7] = m.getWholesaleDecimal() == null? "" : m.getWholesaleDecimal().toString();
|
||||||
objs[8] = m.getWholesaleDecimal() == null? "" : m.getWholesaleDecimal().toString();
|
objs[8] = m.getRemark();
|
||||||
objs[9] = m.getRemark();
|
objs[9] = m.getEnabled() ? "启用" : "禁用";
|
||||||
objs[10] = m.getEnabled() ? "启用" : "禁用";
|
|
||||||
objects.add(objs);
|
objects.add(objs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,4 +19,8 @@ public class DepotEx extends Depot{
|
|||||||
|
|
||||||
private BigDecimal currentStock;
|
private BigDecimal currentStock;
|
||||||
|
|
||||||
|
private BigDecimal lowSafeStock;
|
||||||
|
|
||||||
|
private BigDecimal highSafeStock;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,8 +11,6 @@ public class Material {
|
|||||||
|
|
||||||
private String mfrs;
|
private String mfrs;
|
||||||
|
|
||||||
private BigDecimal safetyStock;
|
|
||||||
|
|
||||||
private String model;
|
private String model;
|
||||||
|
|
||||||
private String standard;
|
private String standard;
|
||||||
@@ -29,6 +27,8 @@ public class Material {
|
|||||||
|
|
||||||
private Integer expiryNum;
|
private Integer expiryNum;
|
||||||
|
|
||||||
|
private BigDecimal weight;
|
||||||
|
|
||||||
private Boolean enabled;
|
private Boolean enabled;
|
||||||
|
|
||||||
private String otherField1;
|
private String otherField1;
|
||||||
@@ -77,14 +77,6 @@ public class Material {
|
|||||||
this.mfrs = mfrs == null ? null : mfrs.trim();
|
this.mfrs = mfrs == null ? null : mfrs.trim();
|
||||||
}
|
}
|
||||||
|
|
||||||
public BigDecimal getSafetyStock() {
|
|
||||||
return safetyStock;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSafetyStock(BigDecimal safetyStock) {
|
|
||||||
this.safetyStock = safetyStock;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getModel() {
|
public String getModel() {
|
||||||
return model;
|
return model;
|
||||||
}
|
}
|
||||||
@@ -149,6 +141,14 @@ public class Material {
|
|||||||
this.expiryNum = expiryNum;
|
this.expiryNum = expiryNum;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public BigDecimal getWeight() {
|
||||||
|
return weight;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setWeight(BigDecimal weight) {
|
||||||
|
this.weight = weight;
|
||||||
|
}
|
||||||
|
|
||||||
public Boolean getEnabled() {
|
public Boolean getEnabled() {
|
||||||
return enabled;
|
return enabled;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -365,66 +365,6 @@ public class MaterialExample {
|
|||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andSafetyStockIsNull() {
|
|
||||||
addCriterion("safety_stock is null");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andSafetyStockIsNotNull() {
|
|
||||||
addCriterion("safety_stock is not null");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andSafetyStockEqualTo(BigDecimal value) {
|
|
||||||
addCriterion("safety_stock =", value, "safetyStock");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andSafetyStockNotEqualTo(BigDecimal value) {
|
|
||||||
addCriterion("safety_stock <>", value, "safetyStock");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andSafetyStockGreaterThan(BigDecimal value) {
|
|
||||||
addCriterion("safety_stock >", value, "safetyStock");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andSafetyStockGreaterThanOrEqualTo(BigDecimal value) {
|
|
||||||
addCriterion("safety_stock >=", value, "safetyStock");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andSafetyStockLessThan(BigDecimal value) {
|
|
||||||
addCriterion("safety_stock <", value, "safetyStock");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andSafetyStockLessThanOrEqualTo(BigDecimal value) {
|
|
||||||
addCriterion("safety_stock <=", value, "safetyStock");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andSafetyStockIn(List<BigDecimal> values) {
|
|
||||||
addCriterion("safety_stock in", values, "safetyStock");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andSafetyStockNotIn(List<BigDecimal> values) {
|
|
||||||
addCriterion("safety_stock not in", values, "safetyStock");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andSafetyStockBetween(BigDecimal value1, BigDecimal value2) {
|
|
||||||
addCriterion("safety_stock between", value1, value2, "safetyStock");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andSafetyStockNotBetween(BigDecimal value1, BigDecimal value2) {
|
|
||||||
addCriterion("safety_stock not between", value1, value2, "safetyStock");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andModelIsNull() {
|
public Criteria andModelIsNull() {
|
||||||
addCriterion("model is null");
|
addCriterion("model is null");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
@@ -965,6 +905,66 @@ public class MaterialExample {
|
|||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Criteria andWeightIsNull() {
|
||||||
|
addCriterion("weight is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andWeightIsNotNull() {
|
||||||
|
addCriterion("weight is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andWeightEqualTo(BigDecimal value) {
|
||||||
|
addCriterion("weight =", value, "weight");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andWeightNotEqualTo(BigDecimal value) {
|
||||||
|
addCriterion("weight <>", value, "weight");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andWeightGreaterThan(BigDecimal value) {
|
||||||
|
addCriterion("weight >", value, "weight");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andWeightGreaterThanOrEqualTo(BigDecimal value) {
|
||||||
|
addCriterion("weight >=", value, "weight");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andWeightLessThan(BigDecimal value) {
|
||||||
|
addCriterion("weight <", value, "weight");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andWeightLessThanOrEqualTo(BigDecimal value) {
|
||||||
|
addCriterion("weight <=", value, "weight");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andWeightIn(List<BigDecimal> values) {
|
||||||
|
addCriterion("weight in", values, "weight");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andWeightNotIn(List<BigDecimal> values) {
|
||||||
|
addCriterion("weight not in", values, "weight");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andWeightBetween(BigDecimal value1, BigDecimal value2) {
|
||||||
|
addCriterion("weight between", value1, value2, "weight");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andWeightNotBetween(BigDecimal value1, BigDecimal value2) {
|
||||||
|
addCriterion("weight not between", value1, value2, "weight");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
public Criteria andEnabledIsNull() {
|
public Criteria andEnabledIsNull() {
|
||||||
addCriterion("enabled is null");
|
addCriterion("enabled is null");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
|
|||||||
@@ -11,6 +11,10 @@ public class MaterialInitialStock {
|
|||||||
|
|
||||||
private BigDecimal number;
|
private BigDecimal number;
|
||||||
|
|
||||||
|
private BigDecimal lowSafeStock;
|
||||||
|
|
||||||
|
private BigDecimal highSafeStock;
|
||||||
|
|
||||||
private Long tenantId;
|
private Long tenantId;
|
||||||
|
|
||||||
private String deleteFlag;
|
private String deleteFlag;
|
||||||
@@ -47,6 +51,22 @@ public class MaterialInitialStock {
|
|||||||
this.number = number;
|
this.number = number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public BigDecimal getLowSafeStock() {
|
||||||
|
return lowSafeStock;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLowSafeStock(BigDecimal lowSafeStock) {
|
||||||
|
this.lowSafeStock = lowSafeStock;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getHighSafeStock() {
|
||||||
|
return highSafeStock;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHighSafeStock(BigDecimal highSafeStock) {
|
||||||
|
this.highSafeStock = highSafeStock;
|
||||||
|
}
|
||||||
|
|
||||||
public Long getTenantId() {
|
public Long getTenantId() {
|
||||||
return tenantId;
|
return tenantId;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -345,6 +345,126 @@ public class MaterialInitialStockExample {
|
|||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Criteria andLowSafeStockIsNull() {
|
||||||
|
addCriterion("low_safe_stock is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andLowSafeStockIsNotNull() {
|
||||||
|
addCriterion("low_safe_stock is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andLowSafeStockEqualTo(BigDecimal value) {
|
||||||
|
addCriterion("low_safe_stock =", value, "lowSafeStock");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andLowSafeStockNotEqualTo(BigDecimal value) {
|
||||||
|
addCriterion("low_safe_stock <>", value, "lowSafeStock");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andLowSafeStockGreaterThan(BigDecimal value) {
|
||||||
|
addCriterion("low_safe_stock >", value, "lowSafeStock");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andLowSafeStockGreaterThanOrEqualTo(BigDecimal value) {
|
||||||
|
addCriterion("low_safe_stock >=", value, "lowSafeStock");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andLowSafeStockLessThan(BigDecimal value) {
|
||||||
|
addCriterion("low_safe_stock <", value, "lowSafeStock");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andLowSafeStockLessThanOrEqualTo(BigDecimal value) {
|
||||||
|
addCriterion("low_safe_stock <=", value, "lowSafeStock");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andLowSafeStockIn(List<BigDecimal> values) {
|
||||||
|
addCriterion("low_safe_stock in", values, "lowSafeStock");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andLowSafeStockNotIn(List<BigDecimal> values) {
|
||||||
|
addCriterion("low_safe_stock not in", values, "lowSafeStock");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andLowSafeStockBetween(BigDecimal value1, BigDecimal value2) {
|
||||||
|
addCriterion("low_safe_stock between", value1, value2, "lowSafeStock");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andLowSafeStockNotBetween(BigDecimal value1, BigDecimal value2) {
|
||||||
|
addCriterion("low_safe_stock not between", value1, value2, "lowSafeStock");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andHighSafeStockIsNull() {
|
||||||
|
addCriterion("high_safe_stock is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andHighSafeStockIsNotNull() {
|
||||||
|
addCriterion("high_safe_stock is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andHighSafeStockEqualTo(BigDecimal value) {
|
||||||
|
addCriterion("high_safe_stock =", value, "highSafeStock");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andHighSafeStockNotEqualTo(BigDecimal value) {
|
||||||
|
addCriterion("high_safe_stock <>", value, "highSafeStock");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andHighSafeStockGreaterThan(BigDecimal value) {
|
||||||
|
addCriterion("high_safe_stock >", value, "highSafeStock");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andHighSafeStockGreaterThanOrEqualTo(BigDecimal value) {
|
||||||
|
addCriterion("high_safe_stock >=", value, "highSafeStock");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andHighSafeStockLessThan(BigDecimal value) {
|
||||||
|
addCriterion("high_safe_stock <", value, "highSafeStock");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andHighSafeStockLessThanOrEqualTo(BigDecimal value) {
|
||||||
|
addCriterion("high_safe_stock <=", value, "highSafeStock");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andHighSafeStockIn(List<BigDecimal> values) {
|
||||||
|
addCriterion("high_safe_stock in", values, "highSafeStock");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andHighSafeStockNotIn(List<BigDecimal> values) {
|
||||||
|
addCriterion("high_safe_stock not in", values, "highSafeStock");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andHighSafeStockBetween(BigDecimal value1, BigDecimal value2) {
|
||||||
|
addCriterion("high_safe_stock between", value1, value2, "highSafeStock");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andHighSafeStockNotBetween(BigDecimal value1, BigDecimal value2) {
|
||||||
|
addCriterion("high_safe_stock not between", value1, value2, "highSafeStock");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
public Criteria andTenantIdIsNull() {
|
public Criteria andTenantIdIsNull() {
|
||||||
addCriterion("tenant_id is null");
|
addCriterion("tenant_id is null");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
|
|||||||
@@ -182,9 +182,17 @@ public class MaterialService {
|
|||||||
JSONObject jsonObj = stockArr.getJSONObject(i);
|
JSONObject jsonObj = stockArr.getJSONObject(i);
|
||||||
if(jsonObj.get("id")!=null && jsonObj.get("initStock")!=null) {
|
if(jsonObj.get("id")!=null && jsonObj.get("initStock")!=null) {
|
||||||
String number = jsonObj.getString("initStock");
|
String number = jsonObj.getString("initStock");
|
||||||
|
BigDecimal lowSafeStock = null;
|
||||||
|
BigDecimal highSafeStock = null;
|
||||||
|
if(jsonObj.get("lowSafeStock")!=null) {
|
||||||
|
lowSafeStock = jsonObj.getBigDecimal("lowSafeStock");
|
||||||
|
}
|
||||||
|
if(jsonObj.get("highSafeStock")!=null) {
|
||||||
|
highSafeStock = jsonObj.getBigDecimal("highSafeStock");
|
||||||
|
}
|
||||||
Long depotId = jsonObj.getLong("id");
|
Long depotId = jsonObj.getLong("id");
|
||||||
if(StringUtil.isNotEmpty(number) && Double.valueOf(number)>0) {
|
if(StringUtil.isNotEmpty(number) && Double.valueOf(number)>0 || lowSafeStock!=null || highSafeStock!=null) {
|
||||||
insertInitialStockByMaterialAndDepot(depotId, mId, parseBigDecimalEx(number));
|
insertInitialStockByMaterialAndDepot(depotId, mId, parseBigDecimalEx(number), lowSafeStock, highSafeStock);
|
||||||
insertCurrentStockByMaterialAndDepot(depotId, mId, parseBigDecimalEx(number));
|
insertCurrentStockByMaterialAndDepot(depotId, mId, parseBigDecimalEx(number));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -221,13 +229,21 @@ public class MaterialService {
|
|||||||
JSONObject jsonObj = stockArr.getJSONObject(i);
|
JSONObject jsonObj = stockArr.getJSONObject(i);
|
||||||
if (jsonObj.get("id") != null && jsonObj.get("initStock") != null) {
|
if (jsonObj.get("id") != null && jsonObj.get("initStock") != null) {
|
||||||
String number = jsonObj.getString("initStock");
|
String number = jsonObj.getString("initStock");
|
||||||
|
BigDecimal lowSafeStock = null;
|
||||||
|
BigDecimal highSafeStock = null;
|
||||||
|
if(jsonObj.get("lowSafeStock")!=null) {
|
||||||
|
lowSafeStock = jsonObj.getBigDecimal("lowSafeStock");
|
||||||
|
}
|
||||||
|
if(jsonObj.get("highSafeStock")!=null) {
|
||||||
|
highSafeStock = jsonObj.getBigDecimal("highSafeStock");
|
||||||
|
}
|
||||||
Long depotId = jsonObj.getLong("id");
|
Long depotId = jsonObj.getLong("id");
|
||||||
//初始库存-先清除再插入
|
//初始库存-先清除再插入
|
||||||
MaterialInitialStockExample example = new MaterialInitialStockExample();
|
MaterialInitialStockExample example = new MaterialInitialStockExample();
|
||||||
example.createCriteria().andMaterialIdEqualTo(material.getId()).andDepotIdEqualTo(depotId);
|
example.createCriteria().andMaterialIdEqualTo(material.getId()).andDepotIdEqualTo(depotId);
|
||||||
materialInitialStockMapper.deleteByExample(example);
|
materialInitialStockMapper.deleteByExample(example);
|
||||||
if (StringUtil.isNotEmpty(number) && Double.valueOf(number) > 0) {
|
if (StringUtil.isNotEmpty(number) && Double.valueOf(number) > 0 || lowSafeStock!=null || highSafeStock!=null) {
|
||||||
insertInitialStockByMaterialAndDepot(depotId, material.getId(), parseBigDecimalEx(number));
|
insertInitialStockByMaterialAndDepot(depotId, material.getId(), parseBigDecimalEx(number), lowSafeStock, highSafeStock);
|
||||||
}
|
}
|
||||||
//更新当前库存
|
//更新当前库存
|
||||||
depotItemService.updateCurrentStockFun(material.getId(), depotId);
|
depotItemService.updateCurrentStockFun(material.getId(), depotId);
|
||||||
@@ -468,7 +484,6 @@ public class MaterialService {
|
|||||||
if(null!=categoryId){
|
if(null!=categoryId){
|
||||||
m.setCategoryId(categoryId);
|
m.setCategoryId(categoryId);
|
||||||
}
|
}
|
||||||
m.setSafetyStock(parseBigDecimalEx(safetyStock));
|
|
||||||
String manyUnit = ExcelUtils.getContent(src, i, 7); //副单位
|
String manyUnit = ExcelUtils.getContent(src, i, 7); //副单位
|
||||||
String barCode = ExcelUtils.getContent(src, i, 8); //基础条码
|
String barCode = ExcelUtils.getContent(src, i, 8); //基础条码
|
||||||
String manyBarCode = ExcelUtils.getContent(src, i, 9); //副条码
|
String manyBarCode = ExcelUtils.getContent(src, i, 9); //副条码
|
||||||
@@ -598,7 +613,7 @@ public class MaterialService {
|
|||||||
materialInitialStockMapper.deleteByExample(example);
|
materialInitialStockMapper.deleteByExample(example);
|
||||||
if(stock!=null && stock.compareTo(BigDecimal.ZERO)!=0) {
|
if(stock!=null && stock.compareTo(BigDecimal.ZERO)!=0) {
|
||||||
depotId = depot.getId();
|
depotId = depot.getId();
|
||||||
insertInitialStockByMaterialAndDepot(depotId, mId, stock);
|
insertInitialStockByMaterialAndDepot(depotId, mId, stock, null, null);
|
||||||
//更新当前库存
|
//更新当前库存
|
||||||
depotItemService.updateCurrentStockFun(mId, depotId);
|
depotItemService.updateCurrentStockFun(mId, depotId);
|
||||||
}
|
}
|
||||||
@@ -663,11 +678,18 @@ public class MaterialService {
|
|||||||
* @param stock
|
* @param stock
|
||||||
*/
|
*/
|
||||||
@Transactional(value = "transactionManager", rollbackFor = Exception.class)
|
@Transactional(value = "transactionManager", rollbackFor = Exception.class)
|
||||||
public void insertInitialStockByMaterialAndDepot(Long depotId, Long mId, BigDecimal stock){
|
public void insertInitialStockByMaterialAndDepot(Long depotId, Long mId, BigDecimal stock, BigDecimal lowSafeStock, BigDecimal highSafeStock){
|
||||||
MaterialInitialStock materialInitialStock = new MaterialInitialStock();
|
MaterialInitialStock materialInitialStock = new MaterialInitialStock();
|
||||||
materialInitialStock.setDepotId(depotId);
|
materialInitialStock.setDepotId(depotId);
|
||||||
materialInitialStock.setMaterialId(mId);
|
materialInitialStock.setMaterialId(mId);
|
||||||
|
stock = stock == null? BigDecimal.ZERO: stock;
|
||||||
materialInitialStock.setNumber(stock);
|
materialInitialStock.setNumber(stock);
|
||||||
|
if(lowSafeStock!=null) {
|
||||||
|
materialInitialStock.setLowSafeStock(lowSafeStock);
|
||||||
|
}
|
||||||
|
if(highSafeStock!=null) {
|
||||||
|
materialInitialStock.setHighSafeStock(highSafeStock);
|
||||||
|
}
|
||||||
materialInitialStockMapper.insertSelective(materialInitialStock); //存入初始库存
|
materialInitialStockMapper.insertSelective(materialInitialStock); //存入初始库存
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -788,6 +810,24 @@ public class MaterialService {
|
|||||||
return stock;
|
return stock;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据商品和仓库获取安全库存信息
|
||||||
|
* @param materialId
|
||||||
|
* @param depotId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public MaterialInitialStock getSafeStock(Long materialId, Long depotId) {
|
||||||
|
MaterialInitialStock materialInitialStock = new MaterialInitialStock();
|
||||||
|
MaterialInitialStockExample example = new MaterialInitialStockExample();
|
||||||
|
example.createCriteria().andMaterialIdEqualTo(materialId).andDepotIdEqualTo(depotId)
|
||||||
|
.andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
|
||||||
|
List<MaterialInitialStock> list = materialInitialStockMapper.selectByExample(example);
|
||||||
|
if(list!=null && list.size()>0) {
|
||||||
|
materialInitialStock = list.get(0);
|
||||||
|
}
|
||||||
|
return materialInitialStock;
|
||||||
|
}
|
||||||
|
|
||||||
public List<MaterialVo4Unit> getMaterialByMeId(Long meId) {
|
public List<MaterialVo4Unit> getMaterialByMeId(Long meId) {
|
||||||
List<MaterialVo4Unit> result = new ArrayList<MaterialVo4Unit>();
|
List<MaterialVo4Unit> result = new ArrayList<MaterialVo4Unit>();
|
||||||
try{
|
try{
|
||||||
|
|||||||
@@ -421,10 +421,11 @@
|
|||||||
<select id="findStockWarningCount" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultMap="ResultStockWarningCount">
|
<select id="findStockWarningCount" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultMap="ResultStockWarningCount">
|
||||||
select m.id MId, m.name MName, me.bar_code, m.mfrs MMfrs, m.model MModel, m.standard MStandard,m.color MColor,
|
select m.id MId, m.name MName, me.bar_code, m.mfrs MMfrs, m.model MModel, m.standard MStandard,m.color MColor,
|
||||||
m.other_field1 MOtherField1,m.other_field2 MOtherField2,m.other_field3 MOtherField3,
|
m.other_field1 MOtherField1,m.other_field2 MOtherField2,m.other_field3 MOtherField3,
|
||||||
m.unit MaterialUnit, u.name unit_name,mcs.current_number,ifnull(m.safety_stock,0) safetystock,
|
m.unit MaterialUnit, u.name unit_name,mcs.current_number,ifnull(mis.low_safe_stock,0) safetystock,
|
||||||
(ifnull(m.safety_stock,0)-mcs.current_number) linjieNumber
|
(ifnull(mis.low_safe_stock,0)-mcs.current_number) linjieNumber
|
||||||
from jsh_material m
|
from jsh_material m
|
||||||
left join jsh_material_extend me on me.material_id=m.id and ifnull(me.delete_Flag,'0') !='1'
|
left join jsh_material_extend me on me.material_id=m.id and ifnull(me.delete_Flag,'0') !='1'
|
||||||
|
left join jsh_material_initial_stock mis on mis.material_id=m.id and ifnull(mis.delete_Flag,'0') !='1'
|
||||||
left join jsh_material_current_stock mcs on mcs.material_id=m.id and ifnull(mcs.delete_Flag,'0') !='1'
|
left join jsh_material_current_stock mcs on mcs.material_id=m.id and ifnull(mcs.delete_Flag,'0') !='1'
|
||||||
left join jsh_depot_item di on di.material_id=m.id and ifnull(di.delete_Flag,'0') !='1'
|
left join jsh_depot_item di on di.material_id=m.id and ifnull(di.delete_Flag,'0') !='1'
|
||||||
left join jsh_depot_head dh on di.header_id=dh.id and ifnull(dh.delete_flag,'0') !='1'
|
left join jsh_depot_head dh on di.header_id=dh.id and ifnull(dh.delete_flag,'0') !='1'
|
||||||
@@ -432,7 +433,7 @@
|
|||||||
where 1=1
|
where 1=1
|
||||||
and me.default_flag=1
|
and me.default_flag=1
|
||||||
and ifnull(m.delete_flag,'0') !='1'
|
and ifnull(m.delete_flag,'0') !='1'
|
||||||
and ifnull(m.safety_stock,0) > mcs.current_number
|
and ifnull(mis.low_safe_stock,0) > mcs.current_number
|
||||||
<if test="materialParam != null and materialParam !=''">
|
<if test="materialParam != null and materialParam !=''">
|
||||||
<bind name="bindKey" value="'%'+materialParam+'%'"/>
|
<bind name="bindKey" value="'%'+materialParam+'%'"/>
|
||||||
and (me.bar_code like #{bindKey} or m.name like #{bindKey} or m.standard like #{bindKey} or m.model like #{bindKey})
|
and (me.bar_code like #{bindKey} or m.name like #{bindKey} or m.standard like #{bindKey} or m.model like #{bindKey})
|
||||||
@@ -452,6 +453,7 @@
|
|||||||
(select m.id
|
(select m.id
|
||||||
from jsh_material m
|
from jsh_material m
|
||||||
left join jsh_material_extend me on me.material_id=m.id and ifnull(me.delete_Flag,'0') !='1'
|
left join jsh_material_extend me on me.material_id=m.id and ifnull(me.delete_Flag,'0') !='1'
|
||||||
|
left join jsh_material_initial_stock mis on mis.material_id=m.id and ifnull(mis.delete_Flag,'0') !='1'
|
||||||
left join jsh_material_current_stock mcs on mcs.material_id=m.id and ifnull(mcs.delete_Flag,'0') !='1'
|
left join jsh_material_current_stock mcs on mcs.material_id=m.id and ifnull(mcs.delete_Flag,'0') !='1'
|
||||||
left join jsh_depot_item di on di.material_id=m.id and ifnull(di.delete_Flag,'0') !='1'
|
left join jsh_depot_item di on di.material_id=m.id and ifnull(di.delete_Flag,'0') !='1'
|
||||||
left join jsh_depot_head dh on di.header_id=dh.id and ifnull(dh.delete_flag,'0') !='1'
|
left join jsh_depot_head dh on di.header_id=dh.id and ifnull(dh.delete_flag,'0') !='1'
|
||||||
@@ -459,7 +461,7 @@
|
|||||||
where 1=1
|
where 1=1
|
||||||
and me.default_flag=1
|
and me.default_flag=1
|
||||||
and ifnull(m.delete_flag,'0') !='1'
|
and ifnull(m.delete_flag,'0') !='1'
|
||||||
and ifnull(m.safety_stock,0) > mcs.current_number
|
and ifnull(mis.low_safe_stock,0) > mcs.current_number
|
||||||
<if test="materialParam != null and materialParam !=''">
|
<if test="materialParam != null and materialParam !=''">
|
||||||
<bind name="bindKey" value="'%'+materialParam+'%'"/>
|
<bind name="bindKey" value="'%'+materialParam+'%'"/>
|
||||||
and (me.bar_code like #{bindKey} or m.name like #{bindKey} or m.standard like #{bindKey} or m.model like #{bindKey})
|
and (me.bar_code like #{bindKey} or m.name like #{bindKey} or m.standard like #{bindKey} or m.model like #{bindKey})
|
||||||
|
|||||||
@@ -6,6 +6,8 @@
|
|||||||
<result column="material_id" jdbcType="BIGINT" property="materialId" />
|
<result column="material_id" jdbcType="BIGINT" property="materialId" />
|
||||||
<result column="depot_id" jdbcType="BIGINT" property="depotId" />
|
<result column="depot_id" jdbcType="BIGINT" property="depotId" />
|
||||||
<result column="number" jdbcType="DECIMAL" property="number" />
|
<result column="number" jdbcType="DECIMAL" property="number" />
|
||||||
|
<result column="low_safe_stock" jdbcType="DECIMAL" property="lowSafeStock" />
|
||||||
|
<result column="high_safe_stock" jdbcType="DECIMAL" property="highSafeStock" />
|
||||||
<result column="tenant_id" jdbcType="BIGINT" property="tenantId" />
|
<result column="tenant_id" jdbcType="BIGINT" property="tenantId" />
|
||||||
<result column="delete_flag" jdbcType="VARCHAR" property="deleteFlag" />
|
<result column="delete_flag" jdbcType="VARCHAR" property="deleteFlag" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
@@ -68,7 +70,7 @@
|
|||||||
</where>
|
</where>
|
||||||
</sql>
|
</sql>
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
id, material_id, depot_id, number, tenant_id, delete_flag
|
id, material_id, depot_id, number, low_safe_stock, high_safe_stock, tenant_id, delete_flag
|
||||||
</sql>
|
</sql>
|
||||||
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.MaterialInitialStockExample" resultMap="BaseResultMap">
|
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.MaterialInitialStockExample" resultMap="BaseResultMap">
|
||||||
select
|
select
|
||||||
@@ -102,11 +104,11 @@
|
|||||||
</delete>
|
</delete>
|
||||||
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.MaterialInitialStock">
|
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.MaterialInitialStock">
|
||||||
insert into jsh_material_initial_stock (id, material_id, depot_id,
|
insert into jsh_material_initial_stock (id, material_id, depot_id,
|
||||||
number, tenant_id, delete_flag
|
number, low_safe_stock, high_safe_stock,
|
||||||
)
|
tenant_id, delete_flag)
|
||||||
values (#{id,jdbcType=BIGINT}, #{materialId,jdbcType=BIGINT}, #{depotId,jdbcType=BIGINT},
|
values (#{id,jdbcType=BIGINT}, #{materialId,jdbcType=BIGINT}, #{depotId,jdbcType=BIGINT},
|
||||||
#{number,jdbcType=DECIMAL}, #{tenantId,jdbcType=BIGINT}, #{deleteFlag,jdbcType=VARCHAR}
|
#{number,jdbcType=DECIMAL}, #{lowSafeStock,jdbcType=DECIMAL}, #{highSafeStock,jdbcType=DECIMAL},
|
||||||
)
|
#{tenantId,jdbcType=BIGINT}, #{deleteFlag,jdbcType=VARCHAR})
|
||||||
</insert>
|
</insert>
|
||||||
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.MaterialInitialStock">
|
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.MaterialInitialStock">
|
||||||
insert into jsh_material_initial_stock
|
insert into jsh_material_initial_stock
|
||||||
@@ -123,6 +125,12 @@
|
|||||||
<if test="number != null">
|
<if test="number != null">
|
||||||
number,
|
number,
|
||||||
</if>
|
</if>
|
||||||
|
<if test="lowSafeStock != null">
|
||||||
|
low_safe_stock,
|
||||||
|
</if>
|
||||||
|
<if test="highSafeStock != null">
|
||||||
|
high_safe_stock,
|
||||||
|
</if>
|
||||||
<if test="tenantId != null">
|
<if test="tenantId != null">
|
||||||
tenant_id,
|
tenant_id,
|
||||||
</if>
|
</if>
|
||||||
@@ -143,6 +151,12 @@
|
|||||||
<if test="number != null">
|
<if test="number != null">
|
||||||
#{number,jdbcType=DECIMAL},
|
#{number,jdbcType=DECIMAL},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="lowSafeStock != null">
|
||||||
|
#{lowSafeStock,jdbcType=DECIMAL},
|
||||||
|
</if>
|
||||||
|
<if test="highSafeStock != null">
|
||||||
|
#{highSafeStock,jdbcType=DECIMAL},
|
||||||
|
</if>
|
||||||
<if test="tenantId != null">
|
<if test="tenantId != null">
|
||||||
#{tenantId,jdbcType=BIGINT},
|
#{tenantId,jdbcType=BIGINT},
|
||||||
</if>
|
</if>
|
||||||
@@ -172,6 +186,12 @@
|
|||||||
<if test="record.number != null">
|
<if test="record.number != null">
|
||||||
number = #{record.number,jdbcType=DECIMAL},
|
number = #{record.number,jdbcType=DECIMAL},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="record.lowSafeStock != null">
|
||||||
|
low_safe_stock = #{record.lowSafeStock,jdbcType=DECIMAL},
|
||||||
|
</if>
|
||||||
|
<if test="record.highSafeStock != null">
|
||||||
|
high_safe_stock = #{record.highSafeStock,jdbcType=DECIMAL},
|
||||||
|
</if>
|
||||||
<if test="record.tenantId != null">
|
<if test="record.tenantId != null">
|
||||||
tenant_id = #{record.tenantId,jdbcType=BIGINT},
|
tenant_id = #{record.tenantId,jdbcType=BIGINT},
|
||||||
</if>
|
</if>
|
||||||
@@ -189,6 +209,8 @@
|
|||||||
material_id = #{record.materialId,jdbcType=BIGINT},
|
material_id = #{record.materialId,jdbcType=BIGINT},
|
||||||
depot_id = #{record.depotId,jdbcType=BIGINT},
|
depot_id = #{record.depotId,jdbcType=BIGINT},
|
||||||
number = #{record.number,jdbcType=DECIMAL},
|
number = #{record.number,jdbcType=DECIMAL},
|
||||||
|
low_safe_stock = #{record.lowSafeStock,jdbcType=DECIMAL},
|
||||||
|
high_safe_stock = #{record.highSafeStock,jdbcType=DECIMAL},
|
||||||
tenant_id = #{record.tenantId,jdbcType=BIGINT},
|
tenant_id = #{record.tenantId,jdbcType=BIGINT},
|
||||||
delete_flag = #{record.deleteFlag,jdbcType=VARCHAR}
|
delete_flag = #{record.deleteFlag,jdbcType=VARCHAR}
|
||||||
<if test="_parameter != null">
|
<if test="_parameter != null">
|
||||||
@@ -207,6 +229,12 @@
|
|||||||
<if test="number != null">
|
<if test="number != null">
|
||||||
number = #{number,jdbcType=DECIMAL},
|
number = #{number,jdbcType=DECIMAL},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="lowSafeStock != null">
|
||||||
|
low_safe_stock = #{lowSafeStock,jdbcType=DECIMAL},
|
||||||
|
</if>
|
||||||
|
<if test="highSafeStock != null">
|
||||||
|
high_safe_stock = #{highSafeStock,jdbcType=DECIMAL},
|
||||||
|
</if>
|
||||||
<if test="tenantId != null">
|
<if test="tenantId != null">
|
||||||
tenant_id = #{tenantId,jdbcType=BIGINT},
|
tenant_id = #{tenantId,jdbcType=BIGINT},
|
||||||
</if>
|
</if>
|
||||||
@@ -221,6 +249,8 @@
|
|||||||
set material_id = #{materialId,jdbcType=BIGINT},
|
set material_id = #{materialId,jdbcType=BIGINT},
|
||||||
depot_id = #{depotId,jdbcType=BIGINT},
|
depot_id = #{depotId,jdbcType=BIGINT},
|
||||||
number = #{number,jdbcType=DECIMAL},
|
number = #{number,jdbcType=DECIMAL},
|
||||||
|
low_safe_stock = #{lowSafeStock,jdbcType=DECIMAL},
|
||||||
|
high_safe_stock = #{highSafeStock,jdbcType=DECIMAL},
|
||||||
tenant_id = #{tenantId,jdbcType=BIGINT},
|
tenant_id = #{tenantId,jdbcType=BIGINT},
|
||||||
delete_flag = #{deleteFlag,jdbcType=VARCHAR}
|
delete_flag = #{deleteFlag,jdbcType=VARCHAR}
|
||||||
where id = #{id,jdbcType=BIGINT}
|
where id = #{id,jdbcType=BIGINT}
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
<result column="category_id" jdbcType="BIGINT" property="categoryId" />
|
<result column="category_id" jdbcType="BIGINT" property="categoryId" />
|
||||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||||
<result column="mfrs" jdbcType="VARCHAR" property="mfrs" />
|
<result column="mfrs" jdbcType="VARCHAR" property="mfrs" />
|
||||||
<result column="safety_stock" jdbcType="DECIMAL" property="safetyStock" />
|
|
||||||
<result column="model" jdbcType="VARCHAR" property="model" />
|
<result column="model" jdbcType="VARCHAR" property="model" />
|
||||||
<result column="standard" jdbcType="VARCHAR" property="standard" />
|
<result column="standard" jdbcType="VARCHAR" property="standard" />
|
||||||
<result column="color" jdbcType="VARCHAR" property="color" />
|
<result column="color" jdbcType="VARCHAR" property="color" />
|
||||||
@@ -15,6 +14,7 @@
|
|||||||
<result column="img_name" jdbcType="VARCHAR" property="imgName" />
|
<result column="img_name" jdbcType="VARCHAR" property="imgName" />
|
||||||
<result column="unit_id" jdbcType="BIGINT" property="unitId" />
|
<result column="unit_id" jdbcType="BIGINT" property="unitId" />
|
||||||
<result column="expiry_num" jdbcType="INTEGER" property="expiryNum" />
|
<result column="expiry_num" jdbcType="INTEGER" property="expiryNum" />
|
||||||
|
<result column="weight" jdbcType="DECIMAL" property="weight" />
|
||||||
<result column="enabled" jdbcType="BIT" property="enabled" />
|
<result column="enabled" jdbcType="BIT" property="enabled" />
|
||||||
<result column="other_field1" jdbcType="VARCHAR" property="otherField1" />
|
<result column="other_field1" jdbcType="VARCHAR" property="otherField1" />
|
||||||
<result column="other_field2" jdbcType="VARCHAR" property="otherField2" />
|
<result column="other_field2" jdbcType="VARCHAR" property="otherField2" />
|
||||||
@@ -83,9 +83,9 @@
|
|||||||
</where>
|
</where>
|
||||||
</sql>
|
</sql>
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
id, category_id, name, mfrs, safety_stock, model, standard, color, unit, remark,
|
id, category_id, name, mfrs, model, standard, color, unit, remark, img_name, unit_id,
|
||||||
img_name, unit_id, expiry_num, enabled, other_field1, other_field2, other_field3,
|
expiry_num, weight, enabled, other_field1, other_field2, other_field3, enable_serial_number,
|
||||||
enable_serial_number, enable_batch_number, tenant_id, delete_flag
|
enable_batch_number, tenant_id, delete_flag
|
||||||
</sql>
|
</sql>
|
||||||
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.MaterialExample" resultMap="BaseResultMap">
|
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.MaterialExample" resultMap="BaseResultMap">
|
||||||
select
|
select
|
||||||
@@ -119,18 +119,18 @@
|
|||||||
</delete>
|
</delete>
|
||||||
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.Material">
|
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.Material">
|
||||||
insert into jsh_material (id, category_id, name,
|
insert into jsh_material (id, category_id, name,
|
||||||
mfrs, safety_stock, model,
|
mfrs, model, standard,
|
||||||
standard, color, unit,
|
color, unit, remark,
|
||||||
remark, img_name, unit_id,
|
img_name, unit_id, expiry_num,
|
||||||
expiry_num, enabled, other_field1,
|
weight, enabled, other_field1,
|
||||||
other_field2, other_field3, enable_serial_number,
|
other_field2, other_field3, enable_serial_number,
|
||||||
enable_batch_number, tenant_id, delete_flag
|
enable_batch_number, tenant_id, delete_flag
|
||||||
)
|
)
|
||||||
values (#{id,jdbcType=BIGINT}, #{categoryId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR},
|
values (#{id,jdbcType=BIGINT}, #{categoryId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR},
|
||||||
#{mfrs,jdbcType=VARCHAR}, #{safetyStock,jdbcType=DECIMAL}, #{model,jdbcType=VARCHAR},
|
#{mfrs,jdbcType=VARCHAR}, #{model,jdbcType=VARCHAR}, #{standard,jdbcType=VARCHAR},
|
||||||
#{standard,jdbcType=VARCHAR}, #{color,jdbcType=VARCHAR}, #{unit,jdbcType=VARCHAR},
|
#{color,jdbcType=VARCHAR}, #{unit,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR},
|
||||||
#{remark,jdbcType=VARCHAR}, #{imgName,jdbcType=VARCHAR}, #{unitId,jdbcType=BIGINT},
|
#{imgName,jdbcType=VARCHAR}, #{unitId,jdbcType=BIGINT}, #{expiryNum,jdbcType=INTEGER},
|
||||||
#{expiryNum,jdbcType=INTEGER}, #{enabled,jdbcType=BIT}, #{otherField1,jdbcType=VARCHAR},
|
#{weight,jdbcType=DECIMAL}, #{enabled,jdbcType=BIT}, #{otherField1,jdbcType=VARCHAR},
|
||||||
#{otherField2,jdbcType=VARCHAR}, #{otherField3,jdbcType=VARCHAR}, #{enableSerialNumber,jdbcType=VARCHAR},
|
#{otherField2,jdbcType=VARCHAR}, #{otherField3,jdbcType=VARCHAR}, #{enableSerialNumber,jdbcType=VARCHAR},
|
||||||
#{enableBatchNumber,jdbcType=VARCHAR}, #{tenantId,jdbcType=BIGINT}, #{deleteFlag,jdbcType=VARCHAR}
|
#{enableBatchNumber,jdbcType=VARCHAR}, #{tenantId,jdbcType=BIGINT}, #{deleteFlag,jdbcType=VARCHAR}
|
||||||
)
|
)
|
||||||
@@ -150,9 +150,6 @@
|
|||||||
<if test="mfrs != null">
|
<if test="mfrs != null">
|
||||||
mfrs,
|
mfrs,
|
||||||
</if>
|
</if>
|
||||||
<if test="safetyStock != null">
|
|
||||||
safety_stock,
|
|
||||||
</if>
|
|
||||||
<if test="model != null">
|
<if test="model != null">
|
||||||
model,
|
model,
|
||||||
</if>
|
</if>
|
||||||
@@ -177,6 +174,9 @@
|
|||||||
<if test="expiryNum != null">
|
<if test="expiryNum != null">
|
||||||
expiry_num,
|
expiry_num,
|
||||||
</if>
|
</if>
|
||||||
|
<if test="weight != null">
|
||||||
|
weight,
|
||||||
|
</if>
|
||||||
<if test="enabled != null">
|
<if test="enabled != null">
|
||||||
enabled,
|
enabled,
|
||||||
</if>
|
</if>
|
||||||
@@ -215,9 +215,6 @@
|
|||||||
<if test="mfrs != null">
|
<if test="mfrs != null">
|
||||||
#{mfrs,jdbcType=VARCHAR},
|
#{mfrs,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="safetyStock != null">
|
|
||||||
#{safetyStock,jdbcType=DECIMAL},
|
|
||||||
</if>
|
|
||||||
<if test="model != null">
|
<if test="model != null">
|
||||||
#{model,jdbcType=VARCHAR},
|
#{model,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
@@ -242,6 +239,9 @@
|
|||||||
<if test="expiryNum != null">
|
<if test="expiryNum != null">
|
||||||
#{expiryNum,jdbcType=INTEGER},
|
#{expiryNum,jdbcType=INTEGER},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="weight != null">
|
||||||
|
#{weight,jdbcType=DECIMAL},
|
||||||
|
</if>
|
||||||
<if test="enabled != null">
|
<if test="enabled != null">
|
||||||
#{enabled,jdbcType=BIT},
|
#{enabled,jdbcType=BIT},
|
||||||
</if>
|
</if>
|
||||||
@@ -289,9 +289,6 @@
|
|||||||
<if test="record.mfrs != null">
|
<if test="record.mfrs != null">
|
||||||
mfrs = #{record.mfrs,jdbcType=VARCHAR},
|
mfrs = #{record.mfrs,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="record.safetyStock != null">
|
|
||||||
safety_stock = #{record.safetyStock,jdbcType=DECIMAL},
|
|
||||||
</if>
|
|
||||||
<if test="record.model != null">
|
<if test="record.model != null">
|
||||||
model = #{record.model,jdbcType=VARCHAR},
|
model = #{record.model,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
@@ -316,6 +313,9 @@
|
|||||||
<if test="record.expiryNum != null">
|
<if test="record.expiryNum != null">
|
||||||
expiry_num = #{record.expiryNum,jdbcType=INTEGER},
|
expiry_num = #{record.expiryNum,jdbcType=INTEGER},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="record.weight != null">
|
||||||
|
weight = #{record.weight,jdbcType=DECIMAL},
|
||||||
|
</if>
|
||||||
<if test="record.enabled != null">
|
<if test="record.enabled != null">
|
||||||
enabled = #{record.enabled,jdbcType=BIT},
|
enabled = #{record.enabled,jdbcType=BIT},
|
||||||
</if>
|
</if>
|
||||||
@@ -351,7 +351,6 @@
|
|||||||
category_id = #{record.categoryId,jdbcType=BIGINT},
|
category_id = #{record.categoryId,jdbcType=BIGINT},
|
||||||
name = #{record.name,jdbcType=VARCHAR},
|
name = #{record.name,jdbcType=VARCHAR},
|
||||||
mfrs = #{record.mfrs,jdbcType=VARCHAR},
|
mfrs = #{record.mfrs,jdbcType=VARCHAR},
|
||||||
safety_stock = #{record.safetyStock,jdbcType=DECIMAL},
|
|
||||||
model = #{record.model,jdbcType=VARCHAR},
|
model = #{record.model,jdbcType=VARCHAR},
|
||||||
standard = #{record.standard,jdbcType=VARCHAR},
|
standard = #{record.standard,jdbcType=VARCHAR},
|
||||||
color = #{record.color,jdbcType=VARCHAR},
|
color = #{record.color,jdbcType=VARCHAR},
|
||||||
@@ -360,6 +359,7 @@
|
|||||||
img_name = #{record.imgName,jdbcType=VARCHAR},
|
img_name = #{record.imgName,jdbcType=VARCHAR},
|
||||||
unit_id = #{record.unitId,jdbcType=BIGINT},
|
unit_id = #{record.unitId,jdbcType=BIGINT},
|
||||||
expiry_num = #{record.expiryNum,jdbcType=INTEGER},
|
expiry_num = #{record.expiryNum,jdbcType=INTEGER},
|
||||||
|
weight = #{record.weight,jdbcType=DECIMAL},
|
||||||
enabled = #{record.enabled,jdbcType=BIT},
|
enabled = #{record.enabled,jdbcType=BIT},
|
||||||
other_field1 = #{record.otherField1,jdbcType=VARCHAR},
|
other_field1 = #{record.otherField1,jdbcType=VARCHAR},
|
||||||
other_field2 = #{record.otherField2,jdbcType=VARCHAR},
|
other_field2 = #{record.otherField2,jdbcType=VARCHAR},
|
||||||
@@ -384,9 +384,6 @@
|
|||||||
<if test="mfrs != null">
|
<if test="mfrs != null">
|
||||||
mfrs = #{mfrs,jdbcType=VARCHAR},
|
mfrs = #{mfrs,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="safetyStock != null">
|
|
||||||
safety_stock = #{safetyStock,jdbcType=DECIMAL},
|
|
||||||
</if>
|
|
||||||
<if test="model != null">
|
<if test="model != null">
|
||||||
model = #{model,jdbcType=VARCHAR},
|
model = #{model,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
@@ -411,6 +408,9 @@
|
|||||||
<if test="expiryNum != null">
|
<if test="expiryNum != null">
|
||||||
expiry_num = #{expiryNum,jdbcType=INTEGER},
|
expiry_num = #{expiryNum,jdbcType=INTEGER},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="weight != null">
|
||||||
|
weight = #{weight,jdbcType=DECIMAL},
|
||||||
|
</if>
|
||||||
<if test="enabled != null">
|
<if test="enabled != null">
|
||||||
enabled = #{enabled,jdbcType=BIT},
|
enabled = #{enabled,jdbcType=BIT},
|
||||||
</if>
|
</if>
|
||||||
@@ -443,7 +443,6 @@
|
|||||||
set category_id = #{categoryId,jdbcType=BIGINT},
|
set category_id = #{categoryId,jdbcType=BIGINT},
|
||||||
name = #{name,jdbcType=VARCHAR},
|
name = #{name,jdbcType=VARCHAR},
|
||||||
mfrs = #{mfrs,jdbcType=VARCHAR},
|
mfrs = #{mfrs,jdbcType=VARCHAR},
|
||||||
safety_stock = #{safetyStock,jdbcType=DECIMAL},
|
|
||||||
model = #{model,jdbcType=VARCHAR},
|
model = #{model,jdbcType=VARCHAR},
|
||||||
standard = #{standard,jdbcType=VARCHAR},
|
standard = #{standard,jdbcType=VARCHAR},
|
||||||
color = #{color,jdbcType=VARCHAR},
|
color = #{color,jdbcType=VARCHAR},
|
||||||
@@ -452,6 +451,7 @@
|
|||||||
img_name = #{imgName,jdbcType=VARCHAR},
|
img_name = #{imgName,jdbcType=VARCHAR},
|
||||||
unit_id = #{unitId,jdbcType=BIGINT},
|
unit_id = #{unitId,jdbcType=BIGINT},
|
||||||
expiry_num = #{expiryNum,jdbcType=INTEGER},
|
expiry_num = #{expiryNum,jdbcType=INTEGER},
|
||||||
|
weight = #{weight,jdbcType=DECIMAL},
|
||||||
enabled = #{enabled,jdbcType=BIT},
|
enabled = #{enabled,jdbcType=BIT},
|
||||||
other_field1 = #{otherField1,jdbcType=VARCHAR},
|
other_field1 = #{otherField1,jdbcType=VARCHAR},
|
||||||
other_field2 = #{otherField2,jdbcType=VARCHAR},
|
other_field2 = #{otherField2,jdbcType=VARCHAR},
|
||||||
|
|||||||
Reference in New Issue
Block a user