Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
JSH ERP
Commits
4b61eb59
Commit
4b61eb59
authored
Feb 17, 2020
by
季圣华
Browse files
增加商品条码功能
parent
301d053b
Changes
33
Expand all
Hide whitespace changes
Inline
Side-by-side
docs/数据库更新记录-方便升级.txt
View file @
4b61eb59
...
...
@@ -696,4 +696,40 @@ DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci
COMMENT='产品初始库存'
AUTO_INCREMENT=48
ROW_FORMAT=COMPACT
;
\ No newline at end of file
;
-- ----------------------------
-- 增加商品扩展信息表
-- 时间 2020-02-15
-- by jishenghua
-- ----------------------------
CREATE TABLE `jsh_material_extend` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键' ,
`material_id` bigint(20) NULL DEFAULT NULL COMMENT '商品id' ,
`bar_code` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '商品条码' ,
`commodity_unit` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '商品单位' ,
`purchase_decimal` decimal(24,6) NULL DEFAULT NULL COMMENT '采购价格' ,
`commodity_decimal` decimal(24,6) NULL DEFAULT NULL COMMENT '零售价格' ,
`wholesale_decimal` decimal(24,6) NULL DEFAULT NULL COMMENT '销售价格' ,
`low_decimal` decimal(24,6) NULL DEFAULT NULL COMMENT '最低售价' ,
`create_time` datetime NULL DEFAULT NULL COMMENT '创建日期' ,
`create_serial` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人编码' ,
`update_serial` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '更新人编码' ,
`update_time` bigint(20) NULL DEFAULT NULL COMMENT '更新时间戳' ,
`tenant_id` bigint(20) NULL DEFAULT NULL COMMENT '租户id' ,
`delete_Flag` varchar(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '删除标记,0未删除,1删除' ,
PRIMARY KEY (`id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci
COMMENT='产品价格扩展'
AUTO_INCREMENT=1
ROW_FORMAT=COMPACT
;
-- ----------------------------
-- 给单据明细表增加商品扩展id
-- 时间 2020-02-16
-- by jishenghua
-- ----------------------------
alter table jsh_depotitem add material_extend_id bigint(20) DEFAULT NULL COMMENT '商品扩展id' after MaterialId;
\ No newline at end of file
erp_web/css/common.css
View file @
4b61eb59
...
...
@@ -4,7 +4,7 @@
}
.easyui-dialog
.fitem
label
{
width
:
6
0px
;
width
:
8
0px
;
float
:
left
;
padding
:
5px
;
}
...
...
erp_web/js/common/common.js
View file @
4b61eb59
...
...
@@ -23,6 +23,31 @@
return
o
;
};
/**
* 扩展datagrid的editors方法,支持combogrid
*/
$
.
extend
(
$
.
fn
.
datagrid
.
defaults
.
editors
,
{
combogrid
:
{
init
:
function
(
container
,
options
)
{
var
input
=
$
(
'
<input type="text" style="height: 22px;" class="datagrid-editable-input">
'
).
appendTo
(
container
);
input
.
combogrid
(
options
);
return
input
;
},
destroy
:
function
(
target
)
{
$
(
target
).
combogrid
(
'
destroy
'
);
},
getValue
:
function
(
target
)
{
return
$
(
target
).
combogrid
(
'
getValue
'
);
},
setValue
:
function
(
target
,
value
)
{
$
(
target
).
combogrid
(
'
setValue
'
,
value
);
},
resize
:
function
(
target
,
width
)
{
$
(
target
).
combogrid
(
'
resize
'
,
width
);
}
}
});
$
(
function
()
{
domresize
();
});
...
...
erp_web/js/pages/materials/in_out.js
View file @
4b61eb59
This diff is collapsed.
Click to expand it.
erp_web/pages/materials/material.html
View file @
4b61eb59
This diff is collapsed.
Click to expand it.
erp_web/pages/template/init_depot_list.html
View file @
4b61eb59
<table>
{{#depotList}}
<tr>
<td
style=
"width:100px;float:left;"
>
{{name}}
</td>
<td>
<td
style=
"width:100px;
height:30px;line-height:30px;padding:5px;
float:left;"
>
{{name}}
</td>
<td
style=
"padding:5px"
>
<input
type=
"text"
id=
"depot{{id}}"
data-id=
"{{id}}"
class=
"depot"
style=
"width: 250px;border: 1px solid #95B8E7;border-radius:5px;height: 30px"
value=
"{{stock}}"
/>
</td>
</tr>
...
...
src/main/java/com/jsh/erp/controller/DepotItemController.java
View file @
4b61eb59
...
...
@@ -158,7 +158,7 @@ public class DepotItemController {
for
(
DepotItemVo4WithInfoEx
diEx
:
dataList
)
{
JSONObject
item
=
new
JSONObject
();
item
.
put
(
"Id"
,
diEx
.
getId
());
item
.
put
(
"MaterialId"
,
diEx
.
getMaterial
i
d
()
==
null
?
""
:
diEx
.
getMaterial
i
d
());
item
.
put
(
"Material
Extend
Id"
,
diEx
.
getMaterial
ExtendI
d
()
==
null
?
""
:
diEx
.
getMaterial
ExtendI
d
());
String
ratio
;
//比例
if
(
diEx
.
getUnitId
()
==
null
||
diEx
.
getUnitId
().
equals
(
""
))
{
ratio
=
""
;
...
...
@@ -167,7 +167,8 @@ public class DepotItemController {
ratio
=
ratio
.
substring
(
ratio
.
indexOf
(
"("
));
}
//品名/型号/扩展信息/包装
String
MaterialName
=
(
diEx
.
getMName
()
==
null
||
diEx
.
getMName
().
equals
(
""
))
?
""
:
diEx
.
getMName
()
String
MaterialName
=
diEx
.
getBarCode
()
+
"_"
+
((
diEx
.
getMName
()
==
null
||
diEx
.
getMName
().
equals
(
""
))
?
""
:
diEx
.
getMName
())
+
((
diEx
.
getMStandard
()
==
null
||
diEx
.
getMStandard
().
equals
(
""
))
?
""
:
"("
+
diEx
.
getMStandard
()
+
")"
)
+
((
diEx
.
getMModel
()
==
null
||
diEx
.
getMModel
().
equals
(
""
))
?
""
:
"("
+
diEx
.
getMModel
()
+
")"
);
String
materialOther
=
getOtherInfo
(
mpArr
,
diEx
);
MaterialName
=
MaterialName
+
materialOther
+
((
diEx
.
getUName
()
==
null
||
diEx
.
getUName
().
equals
(
""
))
?
""
:
"("
+
diEx
.
getUName
()
+
")"
)
+
ratio
;
...
...
src/main/java/com/jsh/erp/controller/MaterialController.java
View file @
4b61eb59
...
...
@@ -11,6 +11,7 @@ import com.jsh.erp.datasource.entities.DepotEx;
import
com.jsh.erp.datasource.entities.Material
;
import
com.jsh.erp.datasource.entities.MaterialVo4Unit
;
import
com.jsh.erp.exception.BusinessRunTimeException
;
import
com.jsh.erp.service.depotItem.DepotItemService
;
import
com.jsh.erp.service.material.MaterialService
;
import
com.jsh.erp.utils.*
;
import
jxl.Sheet
;
...
...
@@ -40,6 +41,9 @@ public class MaterialController {
@Resource
private
MaterialService
materialService
;
@Resource
private
DepotItemService
depotItemService
;
@GetMapping
(
value
=
"/checkIsExist"
)
public
String
checkIsExist
(
@RequestParam
(
"id"
)
Long
id
,
@RequestParam
(
"name"
)
String
name
,
@RequestParam
(
"model"
)
String
model
,
@RequestParam
(
"color"
)
String
color
,
...
...
@@ -99,6 +103,31 @@ public class MaterialController {
return
res
;
}
/**
* 根据meId来查询商品名称
* @param meId
* @param request
* @return
*/
@GetMapping
(
value
=
"/findByIdWithBarCode"
)
public
BaseResponseInfo
findByIdWithBarCode
(
@RequestParam
(
"meId"
)
Long
meId
,
HttpServletRequest
request
)
throws
Exception
{
BaseResponseInfo
res
=
new
BaseResponseInfo
();
try
{
MaterialVo4Unit
mu
=
new
MaterialVo4Unit
();
List
<
MaterialVo4Unit
>
list
=
materialService
.
findByIdWithBarCode
(
meId
);
if
(
list
!=
null
&&
list
.
size
()>
0
)
{
mu
=
list
.
get
(
0
);
}
res
.
code
=
200
;
res
.
data
=
mu
;
}
catch
(
Exception
e
){
e
.
printStackTrace
();
res
.
code
=
500
;
res
.
data
=
"获取数据失败"
;
}
return
res
;
}
/**
* 查找商品信息-下拉框
* @param mpList
...
...
@@ -106,16 +135,25 @@ public class MaterialController {
* @return
*/
@GetMapping
(
value
=
"/findBySelect"
)
public
JSONArray
findBySelect
(
@RequestParam
(
"mpList"
)
String
mpList
,
HttpServletRequest
request
)
throws
Exception
{
JSONArray
dataArray
=
new
JSONArray
();
public
JSONObject
findBySelect
(
@RequestParam
(
value
=
"q"
,
required
=
false
)
String
q
,
@RequestParam
(
"mpList"
)
String
mpList
,
@RequestParam
(
value
=
"depotId"
,
required
=
false
)
Long
depotId
,
@RequestParam
(
"page"
)
Integer
currentPage
,
@RequestParam
(
"rows"
)
Integer
pageSize
,
HttpServletRequest
request
)
throws
Exception
{
JSONObject
object
=
new
JSONObject
();
try
{
List
<
MaterialVo4Unit
>
dataList
=
materialService
.
findBySelect
();
Long
tenantId
=
Long
.
parseLong
(
request
.
getSession
().
getAttribute
(
"tenantId"
).
toString
());
List
<
MaterialVo4Unit
>
dataList
=
materialService
.
findBySelectWithBarCode
(
q
,
(
currentPage
-
1
)*
pageSize
,
pageSize
);
String
[]
mpArr
=
mpList
.
split
(
","
);
int
total
=
materialService
.
findBySelectWithBarCodeCount
(
q
);
object
.
put
(
"total"
,
total
);
JSONArray
dataArray
=
new
JSONArray
();
//存放数据json数组
if
(
null
!=
dataList
)
{
for
(
MaterialVo4Unit
material
:
dataList
)
{
JSONObject
item
=
new
JSONObject
();
item
.
put
(
"Id"
,
material
.
getId
());
item
.
put
(
"Id"
,
material
.
get
Me
Id
());
//商品扩展表的id
String
ratio
;
//比例
if
(
material
.
getUnitid
()
==
null
||
material
.
getUnitid
().
equals
(
""
))
{
ratio
=
""
;
...
...
@@ -124,36 +162,50 @@ public class MaterialController {
ratio
=
ratio
.
substring
(
ratio
.
indexOf
(
"("
));
}
//品名/型号/扩展信息/包装
String
MaterialName
=
material
.
getName
()
+
((
material
.
getModel
()
==
null
||
material
.
getModel
().
equals
(
""
))
?
""
:
"("
+
material
.
getModel
()
+
")"
);
String
MaterialName
=
""
;
String
mBarCode
=
""
;
if
(
material
.
getmBarCode
()!=
null
)
{
mBarCode
=
material
.
getmBarCode
();
MaterialName
=
MaterialName
+
mBarCode
+
"_"
;
}
item
.
put
(
"mBarCode"
,
mBarCode
);
MaterialName
=
MaterialName
+
" "
+
material
.
getName
()
+
((
material
.
getStandard
()
==
null
||
material
.
getStandard
().
equals
(
""
))
?
""
:
"("
+
material
.
getStandard
()
+
")"
)
+
((
material
.
getModel
()
==
null
||
material
.
getModel
().
equals
(
""
))
?
""
:
"("
+
material
.
getModel
()
+
")"
);
String
expand
=
""
;
//扩展信息
for
(
int
i
=
0
;
i
<
mpArr
.
length
;
i
++)
{
if
(
mpArr
[
i
].
equals
(
"颜色"
))
{
MaterialName
=
MaterialName
+
((
material
.
getColor
()
==
null
||
material
.
getColor
().
equals
(
""
))
?
""
:
"("
+
material
.
getColor
()
+
")"
);
}
if
(
mpArr
[
i
].
equals
(
"规格"
))
{
MaterialName
=
MaterialName
+
((
material
.
getStandard
()
==
null
||
material
.
getStandard
().
equals
(
""
))
?
""
:
"("
+
material
.
getStandard
()
+
")"
);
}
if
(
mpArr
[
i
].
equals
(
"制造商"
))
{
MaterialName
=
MaterialName
+
((
material
.
getMfrs
()
==
null
||
material
.
getMfrs
().
equals
(
""
))
?
""
:
"("
+
material
.
getMfrs
()
+
")"
);
expand
=
expand
+
((
material
.
getMfrs
()
==
null
||
material
.
getMfrs
().
equals
(
""
))
?
""
:
"("
+
material
.
getMfrs
()
+
")"
);
}
if
(
mpArr
[
i
].
equals
(
"自定义1"
))
{
MaterialName
=
MaterialName
+
((
material
.
getOtherfield1
()
==
null
||
material
.
getOtherfield1
().
equals
(
""
))
?
""
:
"("
+
material
.
getOtherfield1
()
+
")"
);
expand
=
expand
+
((
material
.
getOtherfield1
()
==
null
||
material
.
getOtherfield1
().
equals
(
""
))
?
""
:
"("
+
material
.
getOtherfield1
()
+
")"
);
}
if
(
mpArr
[
i
].
equals
(
"自定义2"
))
{
MaterialName
=
MaterialName
+
((
material
.
getOtherfield2
()
==
null
||
material
.
getOtherfield2
().
equals
(
""
))
?
""
:
"("
+
material
.
getOtherfield2
()
+
")"
);
expand
=
expand
+
((
material
.
getOtherfield2
()
==
null
||
material
.
getOtherfield2
().
equals
(
""
))
?
""
:
"("
+
material
.
getOtherfield2
()
+
")"
);
}
if
(
mpArr
[
i
].
equals
(
"自定义3"
))
{
MaterialName
=
MaterialName
+
((
material
.
getOtherfield3
()
==
null
||
material
.
getOtherfield3
().
equals
(
""
))
?
""
:
"("
+
material
.
getOtherfield3
()
+
")"
);
expand
=
expand
+
((
material
.
getOtherfield3
()
==
null
||
material
.
getOtherfield3
().
equals
(
""
))
?
""
:
"("
+
material
.
getOtherfield3
()
+
")"
);
}
}
MaterialName
=
MaterialName
+
((
material
.
getUnit
()
==
null
||
material
.
getUnit
().
equals
(
""
))
?
""
:
"("
+
material
.
getUnit
()
+
")"
)
+
ratio
;
MaterialName
=
MaterialName
+
expand
+
((
material
.
get
Commodity
Unit
()
==
null
||
material
.
get
Commodity
Unit
().
equals
(
""
))
?
""
:
"("
+
material
.
get
Commodity
Unit
()
+
")"
)
+
ratio
;
item
.
put
(
"MaterialName"
,
MaterialName
);
item
.
put
(
"name"
,
material
.
getName
());
item
.
put
(
"expand"
,
expand
);
item
.
put
(
"model"
,
material
.
getModel
());
item
.
put
(
"standard"
,
material
.
getStandard
());
item
.
put
(
"unit"
,
material
.
getCommodityUnit
()
+
ratio
);
if
(
depotId
!=
null
&&
StringUtil
.
isNotEmpty
(
q
))
{
BigDecimal
stock
=
depotItemService
.
getStockByParam
(
depotId
,
material
.
getId
(),
null
,
null
,
tenantId
);
item
.
put
(
"stock"
,
stock
);
}
dataArray
.
add
(
item
);
}
}
object
.
put
(
"rows"
,
dataArray
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
dataArray
;
return
object
;
}
...
...
@@ -188,6 +240,69 @@ public class MaterialController {
return
res
;
}
/**
* 根据商品id查找商品信息
* @param meId
* @param request
* @return
* @throws Exception
*/
@GetMapping
(
value
=
"/getMaterialByMeId"
)
public
JSONObject
getMaterialByMeId
(
@RequestParam
(
"meId"
)
long
meId
,
@RequestParam
(
"mpList"
)
String
mpList
,
HttpServletRequest
request
)
throws
Exception
{
JSONObject
item
=
new
JSONObject
();
try
{
String
[]
mpArr
=
mpList
.
split
(
","
);
List
<
MaterialVo4Unit
>
materialList
=
materialService
.
getMaterialByMeId
(
meId
);
if
(
materialList
!=
null
&&
materialList
.
size
()!=
1
)
{
return
item
;
}
else
if
(
materialList
.
size
()
==
1
)
{
MaterialVo4Unit
material
=
materialList
.
get
(
0
);
item
.
put
(
"Id"
,
material
.
getMeId
());
//商品扩展表的id
String
ratio
;
//比例
if
(
material
.
getUnitid
()
==
null
||
material
.
getUnitid
().
equals
(
""
))
{
ratio
=
""
;
}
else
{
ratio
=
material
.
getUnitName
();
ratio
=
ratio
.
substring
(
ratio
.
indexOf
(
"("
));
}
//品名/型号/扩展信息/包装
String
MaterialName
=
""
;
MaterialName
=
MaterialName
+
material
.
getmBarCode
()
+
"_"
+
material
.
getName
()
+
((
material
.
getStandard
()
==
null
||
material
.
getStandard
().
equals
(
""
))
?
""
:
"("
+
material
.
getStandard
()
+
")"
);
String
expand
=
""
;
//扩展信息
for
(
int
i
=
0
;
i
<
mpArr
.
length
;
i
++)
{
if
(
mpArr
[
i
].
equals
(
"颜色"
))
{
expand
=
expand
+
((
material
.
getColor
()
==
null
||
material
.
getColor
().
equals
(
""
))
?
""
:
"("
+
material
.
getColor
()
+
")"
);
}
if
(
mpArr
[
i
].
equals
(
"制造商"
))
{
expand
=
expand
+
((
material
.
getMfrs
()
==
null
||
material
.
getMfrs
().
equals
(
""
))
?
""
:
"("
+
material
.
getMfrs
()
+
")"
);
}
if
(
mpArr
[
i
].
equals
(
"自定义1"
))
{
expand
=
expand
+
((
material
.
getOtherfield1
()
==
null
||
material
.
getOtherfield1
().
equals
(
""
))
?
""
:
"("
+
material
.
getOtherfield1
()
+
")"
);
}
if
(
mpArr
[
i
].
equals
(
"自定义2"
))
{
expand
=
expand
+
((
material
.
getOtherfield2
()
==
null
||
material
.
getOtherfield2
().
equals
(
""
))
?
""
:
"("
+
material
.
getOtherfield2
()
+
")"
);
}
if
(
mpArr
[
i
].
equals
(
"自定义3"
))
{
expand
=
expand
+
((
material
.
getOtherfield3
()
==
null
||
material
.
getOtherfield3
().
equals
(
""
))
?
""
:
"("
+
material
.
getOtherfield3
()
+
")"
);
}
}
MaterialName
=
MaterialName
+
expand
+
((
material
.
getUnit
()
==
null
||
material
.
getUnit
().
equals
(
""
))
?
""
:
"("
+
material
.
getUnit
()
+
")"
)
+
ratio
;
item
.
put
(
"MaterialName"
,
MaterialName
);
item
.
put
(
"name"
,
material
.
getName
());
item
.
put
(
"expand"
,
expand
);
item
.
put
(
"model"
,
material
.
getModel
());
item
.
put
(
"standard"
,
material
.
getStandard
());
item
.
put
(
"unit"
,
material
.
getUnit
()
+
ratio
);
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
item
;
}
/**
* 生成excel表格
* @param name
...
...
@@ -340,4 +455,15 @@ public class MaterialController {
}
return
result
;
}
@GetMapping
(
value
=
"/getMaxBarCode"
)
public
BaseResponseInfo
getMaxBarCode
()
throws
Exception
{
BaseResponseInfo
res
=
new
BaseResponseInfo
();
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
String
barCode
=
materialService
.
getMaxBarCode
();
map
.
put
(
"barCode"
,
barCode
);
res
.
code
=
200
;
res
.
data
=
map
;
return
res
;
}
}
src/main/java/com/jsh/erp/controller/MaterialExtendController.java
0 → 100644
View file @
4b61eb59
package
com.jsh.erp.controller
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.jsh.erp.datasource.vo.MaterialExtendVo4List
;
import
com.jsh.erp.service.MaterialExtend.MaterialExtendService
;
import
com.jsh.erp.utils.BaseResponseInfo
;
import
com.jsh.erp.utils.ErpInfo
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.dao.DataAccessException
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletRequest
;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
static
com
.
jsh
.
erp
.
utils
.
ResponseJsonUtil
.
returnJson
;
/**
* @author jijiaqing
*/
@RestController
@RequestMapping
(
value
=
"/materialsExtend"
)
public
class
MaterialExtendController
{
private
Logger
logger
=
LoggerFactory
.
getLogger
(
MaterialExtendController
.
class
);
@Resource
private
MaterialExtendService
materialExtendService
;
@GetMapping
(
value
=
"/getDetailList"
)
public
BaseResponseInfo
getDetailList
(
@RequestParam
(
"materialId"
)
Long
materialId
,
HttpServletRequest
request
)
throws
Exception
{
BaseResponseInfo
res
=
new
BaseResponseInfo
();
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
try
{
List
<
MaterialExtendVo4List
>
dataList
=
new
ArrayList
<
MaterialExtendVo4List
>();
if
(
materialId
!=
0
)
{
dataList
=
materialExtendService
.
getDetailList
(
materialId
);
}
JSONObject
outer
=
new
JSONObject
();
outer
.
put
(
"total"
,
dataList
.
size
());
//存放数据json数组
JSONArray
dataArray
=
new
JSONArray
();
if
(
null
!=
dataList
)
{
for
(
MaterialExtendVo4List
md
:
dataList
)
{
JSONObject
item
=
new
JSONObject
();
item
.
put
(
"Id"
,
md
.
getId
());
item
.
put
(
"BarCode"
,
md
.
getBarCode
());
item
.
put
(
"CommodityUnit"
,
md
.
getCommodityUnit
());
item
.
put
(
"PurchaseDecimal"
,
md
.
getPurchaseDecimal
());
item
.
put
(
"CommodityDecimal"
,
md
.
getCommodityDecimal
());
item
.
put
(
"WholesaleDecimal"
,
md
.
getWholesaleDecimal
());
item
.
put
(
"LowDecimal"
,
md
.
getLowDecimal
());
dataArray
.
add
(
item
);
}
}
outer
.
put
(
"rows"
,
dataArray
);
res
.
code
=
200
;
res
.
data
=
outer
;
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
res
.
code
=
500
;
res
.
data
=
"获取数据失败"
;
}
return
res
;
}
}
src/main/java/com/jsh/erp/datasource/entities/DepotItem.java
View file @
4b61eb59
This diff is collapsed.
Click to expand it.
src/main/java/com/jsh/erp/datasource/entities/DepotItemExample.java
View file @
4b61eb59
...
...
@@ -5,118 +5,46 @@ import java.util.ArrayList;
import
java.util.List
;
public
class
DepotItemExample
{
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table jsh_depotitem
*
* @mbggenerated
*/
protected
String
orderByClause
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table jsh_depotitem
*
* @mbggenerated
*/
protected
boolean
distinct
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table jsh_depotitem
*
* @mbggenerated
*/
protected
List
<
Criteria
>
oredCriteria
;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_depotitem
*
* @mbggenerated
*/
public
DepotItemExample
()
{
oredCriteria
=
new
ArrayList
<
Criteria
>();
oredCriteria
=
new
ArrayList
<>();
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_depotitem
*
* @mbggenerated
*/
public
void
setOrderByClause
(
String
orderByClause
)
{
this
.
orderByClause
=
orderByClause
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_depotitem
*
* @mbggenerated
*/
public
String
getOrderByClause
()
{
return
orderByClause
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_depotitem
*
* @mbggenerated
*/
public
void
setDistinct
(
boolean
distinct
)
{
this
.
distinct
=
distinct
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_depotitem
*
* @mbggenerated
*/
public
boolean
isDistinct
()
{
return
distinct
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_depotitem
*
* @mbggenerated
*/
public
List
<
Criteria
>
getOredCriteria
()
{
return
oredCriteria
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_depotitem
*
* @mbggenerated
*/
public
void
or
(
Criteria
criteria
)
{
oredCriteria
.
add
(
criteria
);
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_depotitem
*
* @mbggenerated
*/
public
Criteria
or
()
{
Criteria
criteria
=
createCriteriaInternal
();
oredCriteria
.
add
(
criteria
);
return
criteria
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_depotitem
*
* @mbggenerated
*/
public
Criteria
createCriteria
()
{
Criteria
criteria
=
createCriteriaInternal
();
if
(
oredCriteria
.
size
()
==
0
)
{
...
...
@@ -125,41 +53,23 @@ public class DepotItemExample {
return
criteria
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_depotitem
*
* @mbggenerated
*/
protected
Criteria
createCriteriaInternal
()
{
Criteria
criteria
=
new
Criteria
();
return
criteria
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_depotitem
*
* @mbggenerated
*/
public
void
clear
()
{
oredCriteria
.
clear
();
orderByClause
=
null
;
distinct
=
false
;
}
/**
* This class was generated by MyBatis Generator.
* This class corresponds to the database table jsh_depotitem
*
* @mbggenerated
*/
protected
abstract
static
class
GeneratedCriteria
{
protected
List
<
Criterion
>
criteria
;
protected
GeneratedCriteria
()
{
super
();
criteria
=
new
ArrayList
<
Criterion
>();
criteria
=
new
ArrayList
<>();
}
public
boolean
isValid
()
{
...
...
@@ -375,6 +285,66 @@ public class DepotItemExample {
return
(
Criteria
)
this
;
}
public
Criteria
andMaterialExtendIdIsNull
()
{
addCriterion
(
"material_extend_id is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andMaterialExtendIdIsNotNull
()
{
addCriterion
(
"material_extend_id is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andMaterialExtendIdEqualTo
(
Long
value
)
{
addCriterion
(
"material_extend_id ="
,
value
,
"materialExtendId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andMaterialExtendIdNotEqualTo
(
Long
value
)
{
addCriterion
(
"material_extend_id <>"
,
value
,
"materialExtendId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andMaterialExtendIdGreaterThan
(
Long
value
)
{
addCriterion
(
"material_extend_id >"
,
value
,
"materialExtendId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andMaterialExtendIdGreaterThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"material_extend_id >="
,
value
,
"materialExtendId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andMaterialExtendIdLessThan
(
Long
value
)
{
addCriterion
(
"material_extend_id <"
,
value
,
"materialExtendId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andMaterialExtendIdLessThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"material_extend_id <="
,
value
,
"materialExtendId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andMaterialExtendIdIn
(
List
<
Long
>
values
)
{
addCriterion
(
"material_extend_id in"
,
values
,
"materialExtendId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andMaterialExtendIdNotIn
(
List
<
Long
>
values
)
{
addCriterion
(
"material_extend_id not in"
,
values
,
"materialExtendId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andMaterialExtendIdBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"material_extend_id between"
,
value1
,
value2
,
"materialExtendId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andMaterialExtendIdNotBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"material_extend_id not between"
,
value1
,
value2
,
"materialExtendId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andMunitIsNull
()
{
addCriterion
(
"MUnit is null"
);
return
(
Criteria
)
this
;
...
...
@@ -1796,25 +1766,12 @@ public class DepotItemExample {
}
}
/**
* This class was generated by MyBatis Generator.
* This class corresponds to the database table jsh_depotitem
*
* @mbggenerated do_not_delete_during_merge
*/
public
static
class
Criteria
extends
GeneratedCriteria
{
protected
Criteria
()
{
super
();
}
}
/**
* This class was generated by MyBatis Generator.
* This class corresponds to the database table jsh_depotitem
*
* @mbggenerated
*/
public
static
class
Criterion
{
private
String
condition
;
...
...
src/main/java/com/jsh/erp/datasource/entities/DepotItemVo4WithInfoEx.java
View file @
4b61eb59
...
...
@@ -36,6 +36,8 @@ public class DepotItemVo4WithInfoEx extends DepotItem{
private
String
priceStrategy
;
private
String
barCode
;
public
Long
getMId
()
{
return
MId
;
}
...
...
@@ -163,4 +165,12 @@ public class DepotItemVo4WithInfoEx extends DepotItem{
public
void
setPriceStrategy
(
String
priceStrategy
)
{
this
.
priceStrategy
=
priceStrategy
;
}
public
String
getBarCode
()
{
return
barCode
;
}
public
void
setBarCode
(
String
barCode
)
{
this
.
barCode
=
barCode
;
}
}
\ No newline at end of file
src/main/java/com/jsh/erp/datasource/entities/MaterialExtend.java
0 → 100644
View file @
4b61eb59
package
com.jsh.erp.datasource.entities
;
import
java.math.BigDecimal
;
import
java.util.Date
;
public
class
MaterialExtend
{
private
Long
id
;
private
Long
materialId
;
private
String
barCode
;
private
String
commodityUnit
;
private
BigDecimal
purchaseDecimal
;
private
BigDecimal
commodityDecimal
;
private
BigDecimal
wholesaleDecimal
;
private
BigDecimal
lowDecimal
;
private
Date
createTime
;
private
String
createSerial
;
private
String
updateSerial
;
private
Long
updateTime
;
private
Long
tenantId
;
private
String
deleteFlag
;
public
Long
getId
()
{
return
id
;
}
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
public
Long
getMaterialId
()
{
return
materialId
;
}
public
void
setMaterialId
(
Long
materialId
)
{
this
.
materialId
=
materialId
;
}
public
String
getBarCode
()
{
return
barCode
;
}
public
void
setBarCode
(
String
barCode
)
{
this
.
barCode
=
barCode
==
null
?
null
:
barCode
.
trim
();
}
public
String
getCommodityUnit
()
{
return
commodityUnit
;
}
public
void
setCommodityUnit
(
String
commodityUnit
)
{
this
.
commodityUnit
=
commodityUnit
==
null
?
null
:
commodityUnit
.
trim
();
}
public
BigDecimal
getPurchaseDecimal
()
{
return
purchaseDecimal
;
}
public
void
setPurchaseDecimal
(
BigDecimal
purchaseDecimal
)
{
this
.
purchaseDecimal
=
purchaseDecimal
;
}
public
BigDecimal
getCommodityDecimal
()
{
return
commodityDecimal
;
}
public
void
setCommodityDecimal
(
BigDecimal
commodityDecimal
)
{
this
.
commodityDecimal
=
commodityDecimal
;
}
public
BigDecimal
getWholesaleDecimal
()
{
return
wholesaleDecimal
;
}
public
void
setWholesaleDecimal
(
BigDecimal
wholesaleDecimal
)
{
this
.
wholesaleDecimal
=
wholesaleDecimal
;
}
public
BigDecimal
getLowDecimal
()
{
return
lowDecimal
;
}
public
void
setLowDecimal
(
BigDecimal
lowDecimal
)
{
this
.
lowDecimal
=
lowDecimal
;
}
public
Date
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
public
String
getCreateSerial
()
{
return
createSerial
;
}
public
void
setCreateSerial
(
String
createSerial
)
{
this
.
createSerial
=
createSerial
==
null
?
null
:
createSerial
.
trim
();
}
public
String
getUpdateSerial
()
{
return
updateSerial
;
}
public
void
setUpdateSerial
(
String
updateSerial
)
{
this
.
updateSerial
=
updateSerial
==
null
?
null
:
updateSerial
.
trim
();
}
public
Long
getUpdateTime
()
{
return
updateTime
;
}
public
void
setUpdateTime
(
Long
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
public
Long
getTenantId
()
{
return
tenantId
;
}
public
void
setTenantId
(
Long
tenantId
)
{
this
.
tenantId
=
tenantId
;
}
public
String
getDeleteFlag
()
{
return
deleteFlag
;
}
public
void
setDeleteFlag
(
String
deleteFlag
)
{
this
.
deleteFlag
=
deleteFlag
==
null
?
null
:
deleteFlag
.
trim
();
}
}
\ No newline at end of file
src/main/java/com/jsh/erp/datasource/entities/MaterialExtendExample.java
0 → 100644
View file @
4b61eb59
This diff is collapsed.
Click to expand it.
src/main/java/com/jsh/erp/datasource/entities/MaterialVo4Unit.java
View file @
4b61eb59
...
...
@@ -12,6 +12,20 @@ public class MaterialVo4Unit extends Material{
private
BigDecimal
stock
;
private
BigDecimal
purchaseDecimal
;
private
BigDecimal
commodityDecimal
;
private
BigDecimal
wholesaleDecimal
;
private
BigDecimal
lowDecimal
;
private
String
mBarCode
;
private
String
commodityUnit
;
private
Long
meId
;
public
String
getUnitName
()
{
return
unitName
;
}
...
...
@@ -43,4 +57,60 @@ public class MaterialVo4Unit extends Material{
public
void
setStock
(
BigDecimal
stock
)
{
this
.
stock
=
stock
;
}
public
BigDecimal
getPurchaseDecimal
()
{
return
purchaseDecimal
;
}
public
void
setPurchaseDecimal
(
BigDecimal
purchaseDecimal
)
{
this
.
purchaseDecimal
=
purchaseDecimal
;
}
public
BigDecimal
getCommodityDecimal
()
{
return
commodityDecimal
;
}
public
void
setCommodityDecimal
(
BigDecimal
commodityDecimal
)
{
this
.
commodityDecimal
=
commodityDecimal
;
}
public
BigDecimal
getWholesaleDecimal
()
{
return
wholesaleDecimal
;
}
public
void
setWholesaleDecimal
(
BigDecimal
wholesaleDecimal
)
{
this
.
wholesaleDecimal
=
wholesaleDecimal
;
}
public
BigDecimal
getLowDecimal
()
{
return
lowDecimal
;
}
public
void
setLowDecimal
(
BigDecimal
lowDecimal
)
{
this
.
lowDecimal
=
lowDecimal
;
}
public
String
getmBarCode
()
{
return
mBarCode
;
}
public
void
setmBarCode
(
String
mBarCode
)
{
this
.
mBarCode
=
mBarCode
;
}
public
String
getCommodityUnit
()
{
return
commodityUnit
;
}
public
void
setCommodityUnit
(
String
commodityUnit
)
{
this
.
commodityUnit
=
commodityUnit
;
}
public
Long
getMeId
()
{
return
meId
;
}
public
void
setMeId
(
Long
meId
)
{
this
.
meId
=
meId
;
}
}
\ No newline at end of file
src/main/java/com/jsh/erp/datasource/mappers/DepotItemMapper.java
View file @
4b61eb59
...
...
@@ -6,91 +6,25 @@ import java.util.List;
import
org.apache.ibatis.annotations.Param
;
public
interface
DepotItemMapper
{
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_depotitem
*
* @mbggenerated
*/
int
countByExample
(
DepotItemExample
example
);
long
countByExample
(
DepotItemExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_depotitem
*
* @mbggenerated
*/
int
deleteByExample
(
DepotItemExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_depotitem
*
* @mbggenerated
*/
int
deleteByPrimaryKey
(
Long
id
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_depotitem
*
* @mbggenerated
*/
int
insert
(
DepotItem
record
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_depotitem
*
* @mbggenerated
*/
int
insertSelective
(
DepotItem
record
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_depotitem
*
* @mbggenerated
*/
List
<
DepotItem
>
selectByExample
(
DepotItemExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_depotitem
*
* @mbggenerated
*/
DepotItem
selectByPrimaryKey
(
Long
id
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_depotitem
*
* @mbggenerated
*/
int
updateByExampleSelective
(
@Param
(
"record"
)
DepotItem
record
,
@Param
(
"example"
)
DepotItemExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_depotitem
*
* @mbggenerated
*/
int
updateByExample
(
@Param
(
"record"
)
DepotItem
record
,
@Param
(
"example"
)
DepotItemExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_depotitem
*
* @mbggenerated
*/
int
updateByPrimaryKeySelective
(
DepotItem
record
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_depotitem
*
* @mbggenerated
*/
int
updateByPrimaryKey
(
DepotItem
record
);
}
\ No newline at end of file
src/main/java/com/jsh/erp/datasource/mappers/MaterialExtendMapper.java
0 → 100644
View file @
4b61eb59
package
com.jsh.erp.datasource.mappers
;
import
com.jsh.erp.datasource.entities.MaterialExtend
;
import
com.jsh.erp.datasource.entities.MaterialExtendExample
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Param
;
public
interface
MaterialExtendMapper
{
long
countByExample
(
MaterialExtendExample
example
);
int
deleteByExample
(
MaterialExtendExample
example
);
int
deleteByPrimaryKey
(
Long
id
);
int
insert
(
MaterialExtend
record
);
int
insertSelective
(
MaterialExtend
record
);
List
<
MaterialExtend
>
selectByExample
(
MaterialExtendExample
example
);
MaterialExtend
selectByPrimaryKey
(
Long
id
);
int
updateByExampleSelective
(
@Param
(
"record"
)
MaterialExtend
record
,
@Param
(
"example"
)
MaterialExtendExample
example
);
int
updateByExample
(
@Param
(
"record"
)
MaterialExtend
record
,
@Param
(
"example"
)
MaterialExtendExample
example
);
int
updateByPrimaryKeySelective
(
MaterialExtend
record
);
int
updateByPrimaryKey
(
MaterialExtend
record
);
}
\ No newline at end of file
src/main/java/com/jsh/erp/datasource/mappers/MaterialExtendMapperEx.java
0 → 100644
View file @
4b61eb59
package
com.jsh.erp.datasource.mappers
;
import
com.jsh.erp.datasource.entities.MaterialExtend
;
import
com.jsh.erp.datasource.vo.MaterialExtendVo4List
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.Date
;
import
java.util.List
;
public
interface
MaterialExtendMapperEx
{
int
batchDeleteMaterialExtendByIds
(
@Param
(
"ids"
)
String
ids
[]);
List
<
MaterialExtendVo4List
>
getDetailList
(
@Param
(
"materialId"
)
Long
materialId
);
Long
getMaxTimeByTenantAndTime
(
@Param
(
"tenantId"
)
Long
tenantId
,
@Param
(
"lastTime"
)
Long
lastTime
,
@Param
(
"syncNum"
)
Long
syncNum
);
List
<
MaterialExtend
>
getListByMId
(
@Param
(
"ids"
)
Long
ids
[]);
}
\ No newline at end of file
src/main/java/com/jsh/erp/datasource/mappers/MaterialMapperEx.java
View file @
4b61eb59
...
...
@@ -19,6 +19,7 @@ public interface MaterialMapperEx {
List
<
MaterialVo4Unit
>
selectByConditionMaterial
(
@Param
(
"name"
)
String
name
,
@Param
(
"standard"
)
String
standard
,
@Param
(
"model"
)
String
model
,
@Param
(
"categoryIds"
)
String
categoryIds
,
@Param
(
"mpList"
)
String
mpList
,
...
...
@@ -27,6 +28,7 @@ public interface MaterialMapperEx {
Long
countsByMaterial
(
@Param
(
"name"
)
String
name
,
@Param
(
"standard"
)
String
standard
,
@Param
(
"model"
)
String
model
,
@Param
(
"categoryIds"
)
String
categoryIds
,
@Param
(
"mpList"
)
String
mpList
);
...
...
@@ -35,8 +37,16 @@ public interface MaterialMapperEx {
List
<
MaterialVo4Unit
>
findById
(
@Param
(
"id"
)
Long
id
);
List
<
MaterialVo4Unit
>
findByIdWithBarCode
(
@Param
(
"meId"
)
Long
meId
);
List
<
MaterialVo4Unit
>
findBySelect
();
List
<
MaterialVo4Unit
>
findBySelectWithBarCode
(
@Param
(
"q"
)
String
q
,
@Param
(
"offset"
)
Integer
offset
,
@Param
(
"rows"
)
Integer
rows
);
int
findBySelectWithBarCodeCount
(
@Param
(
"q"
)
String
q
);
int
updatePriceNullByPrimaryKey
(
Long
id
);
int
updateUnitIdNullByPrimaryKey
(
Long
id
);
...
...
@@ -60,5 +70,8 @@ public interface MaterialMapperEx {
List
<
Material
>
getMaterialListByUnitIds
(
@Param
(
"unitIds"
)
String
[]
unitIds
);
int
insertSelectiveEx
(
Material
record
);
String
getMaxBarCode
();
List
<
MaterialVo4Unit
>
getMaterialByMeId
(
@Param
(
"meId"
)
Long
meId
);
}
src/main/java/com/jsh/erp/datasource/vo/MaterialExtendVo4List.java
0 → 100644
View file @
4b61eb59
package
com.jsh.erp.datasource.vo
;
import
com.jsh.erp.datasource.entities.MaterialExtend
;
import
java.math.BigDecimal
;
public
class
MaterialExtendVo4List
extends
MaterialExtend
{
private
String
supplier
;
private
String
originPlace
;
private
String
unit
;
private
String
brandName
;
private
BigDecimal
guaranteePeriod
;
private
BigDecimal
memberDecimal
;
public
String
getSupplier
()
{
return
supplier
;
}
public
void
setSupplier
(
String
supplier
)
{
this
.
supplier
=
supplier
;
}
public
String
getOriginPlace
()
{
return
originPlace
;
}
public
void
setOriginPlace
(
String
originPlace
)
{
this
.
originPlace
=
originPlace
;
}
public
String
getUnit
()
{
return
unit
;
}
public
void
setUnit
(
String
unit
)
{
this
.
unit
=
unit
;
}
public
String
getBrandName
()
{
return
brandName
;
}
public
void
setBrandName
(
String
brandName
)
{
this
.
brandName
=
brandName
;
}
public
BigDecimal
getGuaranteePeriod
()
{
return
guaranteePeriod
;
}
public
void
setGuaranteePeriod
(
BigDecimal
guaranteePeriod
)
{
this
.
guaranteePeriod
=
guaranteePeriod
;
}
public
BigDecimal
getMemberDecimal
()
{
return
memberDecimal
;
}
public
void
setMemberDecimal
(
BigDecimal
memberDecimal
)
{
this
.
memberDecimal
=
memberDecimal
;
}
}
Prev
1
2
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment