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
086b7d48
Commit
086b7d48
authored
Feb 22, 2019
by
季圣华
Browse files
清理和礼品卡相关的代码
parent
6bffcd8f
Changes
8
Hide whitespace changes
Inline
Side-by-side
erp_web/js/pages/materials/bill_detail.js
View file @
086b7d48
...
...
@@ -128,14 +128,6 @@
billType
=
"
material
"
;
$
(
"
#bill .allocation_out
"
).
show
();
}
else
if
(
listSubType
==
"
礼品充值
"
)
{
billType
=
"
material
"
;
$
(
"
#bill .gift_recharge
"
).
show
();
}
else
if
(
listSubType
==
"
礼品销售出库
"
)
{
billType
=
"
material
"
;
$
(
"
#bill .gift_out
"
).
show
();
}
else
if
(
listSubType
==
"
收入
"
)
{
billType
=
"
account
"
;
payTypeTitle
=
"
收入项目
"
;
...
...
@@ -334,19 +326,11 @@
if
(
listSubType
==
"
调拨出库
"
){
isShowAnotherDepot
=
false
;
//调拨时候显示对方仓库
anotherDepotHeadName
=
"
调入仓库
"
;
}
if
(
listSubType
==
"
礼品充值
"
){
isShowAnotherDepot
=
false
;
//礼品充值时候显示礼品卡
anotherDepotHeadName
=
"
礼品卡
"
;
}
if
(
listSubType
==
"
礼品销售
"
){
depotHeadName
=
"
礼品卡
"
;
}
else
{
}
else
{
depotHeadName
=
"
仓库名称
"
;
}
var
isShowTaxColumn
=
false
;
//是否显示税率相关的列,true为隐藏,false为显示
if
(
listSubType
==
"
调拨出库
"
||
listSubType
==
"
其它出库
"
||
listSubType
==
"
其它入库
"
||
listSubType
==
"
零售出库
"
||
listSubType
==
"
零售退货入库
"
||
listSubType
==
"
礼品充值
"
||
listSubType
==
"
礼品销售
"
){
if
(
listSubType
==
"
调拨出库
"
||
listSubType
==
"
其它出库
"
||
listSubType
==
"
其它入库
"
||
listSubType
==
"
零售出库
"
||
listSubType
==
"
零售退货入库
"
){
isShowTaxColumn
=
true
;
//隐藏
}
var
isShowMaterialTypeColumn
=
true
;
//是否显示商品类型相关的列,true为隐藏,false为显示
...
...
erp_web/pages/materials/bill_detail.html
View file @
086b7d48
...
...
@@ -557,72 +557,6 @@
</tr>
</table>
</div>
<!--礼品充值-->
<div
class=
"gift_recharge"
style=
"width:1100px;padding:10px 20px;top:60px"
closed=
"true"
modal=
"true"
cache=
"false"
collapsible=
"false"
closable=
"true"
>
<table>
<tr>
<td
style=
"width:70px;"
>
单据日期:
</td>
<td
style=
"padding:5px;width:140px;"
>
<span
class=
"OperTimeShow"
></span>
</td>
<td
style=
"width:70px;"
>
单据编号:
</td>
<td
style=
"padding:5px;width:140px;"
>
<span
class=
"NumberShow"
></span>
</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td
style=
"width:100px;"
></td>
</tr>
<tr>
<td
colspan=
"9"
style=
"width: 1130px;"
>
<!-- 商品列表table -->
<table
class=
"materialDataShow"
style=
"top:100px;border-bottom-color:#FFFFFF"
></table>
</td>
</tr>
<tr>
<td
style=
"width:60px;"
>
单据备注:
</td>
<td
colspan=
"8"
style=
"height:35px;"
>
<span
class=
"RemarkShow"
style=
"width: 1070px; height:35px;"
></span>
</td>
</tr>
</table>
</div>
<!--礼品销售-->
<div
class=
"gift_out"
style=
"width:1100px;padding:10px 20px;top:60px"
closed=
"true"
modal=
"true"
cache=
"false"
collapsible=
"false"
closable=
"true"
>
<table>
<tr>
<td
style=
"width:70px;"
>
单据日期:
</td>
<td
style=
"padding:5px;width:140px;"
>
<span
class=
"OperTimeShow"
></span>
</td>
<td
style=
"width:70px;"
>
单据编号:
</td>
<td
style=
"padding:5px;width:140px;"
>
<span
class=
"NumberShow"
></span>
</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td
style=
"width:100px;"
></td>
</tr>
<tr>
<td
colspan=
"9"
style=
"width: 1130px;"
>
<!-- 商品列表table -->
<table
class=
"materialDataShow"
style=
"top:100px;border-bottom-color:#FFFFFF"
></table>
</td>
</tr>
<tr>
<td
style=
"width:60px;"
>
单据备注:
</td>
<td
colspan=
"8"
style=
"height:35px;"
>
<span
class=
"RemarkShow"
style=
"width: 1070px; height:35px;"
></span>
</td>
</tr>
</table>
</div>
<!--收入单-->
<div
class=
"item_in"
style=
"width:1100px;padding:10px 20px;top:20px"
closed=
"true"
modal=
"true"
cache=
"false"
collapsible=
"false"
closable=
"true"
>
...
...
sql/jsh_erp.sql
View file @
086b7d48
...
...
@@ -432,9 +432,6 @@ INSERT INTO `jsh_depothead` VALUES ('52', '出库', '零售', null, 'LSCK2017090
INSERT INTO `jsh_depothead` VALUES ('53', '出库', '零售', null, 'LSCK201709040002', 'LSCK201709040002', '季圣华', '2017-09-04 21:34:02', '2017-09-04 21:33:30', '7', null, '9', '36.3', null, '36.3', '现付', '', '', null, null, null, null, null, null, null, null, null, '');
INSERT INTO `jsh_depothead` VALUES ('54', '入库', '采购', null, 'CGRK201709040001', 'CGRK201709040001', '季圣华', '2017-09-04 22:20:12', '2017-09-04 22:13:00', '1', null, '10', '-10.8', null, '-12', '现付', '', '', null, null, '10', '1.2', '10.8', '12', '[\"9\"]', '[\"12\"]', null, '');
INSERT INTO `jsh_depothead` VALUES ('57', '入库', '采购', null, 'CGRK201709050001', 'CGRK201709050001', '季圣华', '2017-09-05 22:37:54', '2017-09-05 22:37:31', '1', null, '11', '-182.52', null, '-182.4', '现付', '', '', null, null, '0', '0', '182.52', '0', '[\"undefined\"]', '[\"undefined\"]', null, '');
INSERT INTO `jsh_depothead` VALUES ('60', '出库', '礼品充值', null, 'LPCZ201709050001', 'LPCZ201709050001', '季圣华', '2017-09-05 23:45:48', '2017-09-05 23:42:17', null, null, null, null, null, '13', '现付', '', '', null, null, null, null, null, null, null, null, null, '');
INSERT INTO `jsh_depothead` VALUES ('61', '出库', '礼品销售', null, 'LPXS201709050001', 'LPXS201709050001', '季圣华', '2017-09-05 23:48:10', '2017-09-05 23:46:04', null, null, null, null, null, '6.5', '现付', '', '', null, null, null, null, null, null, null, null, null, '');
INSERT INTO `jsh_depothead` VALUES ('62', '出库', '礼品充值', null, 'LPCZ201709050002', 'LPCZ201709050002', '季圣华', '2017-09-05 23:52:41', '2017-09-05 23:51:26', null, null, null, null, null, '4', '现付', '', '', null, null, null, null, null, null, null, null, null, '');
INSERT INTO `jsh_depothead` VALUES ('63', '入库', '采购', null, 'CGRK201709170001', 'CGRK201709170001', '季圣华', '2017-09-17 21:45:14', '2017-09-17 21:44:50', '1', null, '10', '-13.2', null, '-12', '现付', '', '', null, null, '0', '0', '13.2', null, null, null, null, '');
INSERT INTO `jsh_depothead` VALUES ('65', '入库', '采购', null, 'CGRK201709170002', 'CGRK201709170002', '季圣华', '2017-09-17 21:47:07', '2017-09-17 20:45:55', '1', null, null, '-42', null, '-39', '现付', '', '', '[\"12\",\"9\"]', '[\"-20\",\"-22\"]', '0', '0', '42.9', '0', '[\"undefined\"]', '[\"undefined\"]', null, '');
INSERT INTO `jsh_depothead` VALUES ('68', '其它', '组装单', null, 'ZZD2017092000001', 'ZZD2017092000001', '季圣华', '2017-09-20 23:29:28', '2017-09-20 23:29:13', null, null, null, null, null, '7', '现付', '', '', null, null, null, null, null, null, null, null, null, '');
...
...
@@ -464,7 +461,6 @@ INSERT INTO `jsh_depothead` VALUES ('96', '出库', '销售', null, 'XSCK2017102
INSERT INTO `jsh_depothead` VALUES ('97', '入库', '采购', null, 'CGRK201710290001', 'CGRK201710290001', '季圣华', '2017-10-29 23:30:47', '2017-10-29 23:30:08', '4', null, '10', '0', null, '-200', '现付', '', '', null, null, '0', '0', '234', null, null, null, null, '');
INSERT INTO `jsh_depothead` VALUES ('98', '入库', '采购', null, 'CGRK201710290002', 'CGRK201710290002', '季圣华', '2017-10-29 23:32:07', '2017-10-29 23:30:52', '4', null, '10', '0', null, '-300', '现付', '', '', null, null, '0', '0', '351', null, null, null, null, '');
INSERT INTO `jsh_depothead` VALUES ('99', '入库', '采购', null, 'CGRK201710290003', 'CGRK201710290003', '季圣华', '2017-10-29 23:33:45', '2017-10-29 23:32:11', '4', null, '11', '-10', null, '-720', '现付', '', '', null, null, '0', '0', '842.4', null, null, null, null, '');
INSERT INTO `jsh_depothead` VALUES ('100', '出库', '礼品销售', null, 'LPXS201711010001', 'LPXS201711010001', '季圣华', '2017-11-01 23:06:40', '2017-11-01 23:06:13', null, null, null, '0', null, '1', '现付', '', '', null, null, null, null, null, null, null, null, null, '');
INSERT INTO `jsh_depothead` VALUES ('101', '出库', '调拨', null, 'DBCK201711020001', 'DBCK201711020001', '季圣华', '2017-11-02 22:51:17', '2017-11-02 22:48:58', null, null, null, '0', null, '50', '现付', '', '', null, null, null, null, null, null, null, null, null, '');
INSERT INTO `jsh_depothead` VALUES ('102', '出库', '零售', null, 'LSCK201711060001', 'LSCK201711060001', '季圣华', '2017-11-06 20:38:46', '2017-11-06 20:38:01', '7', null, null, '12', null, '12', '现付', '', '', '[\"9\",\"12\"]', '[\"10\",\"2\"]', null, null, null, null, null, null, null, '');
INSERT INTO `jsh_depothead` VALUES ('103', '入库', '采购', null, 'CGRK201711070001', 'CGRK201711070001', '季圣华', '2017-11-07 21:07:05', '2017-11-07 21:06:53', '1', null, '10', '-26.4', null, '-24', '现付', '', '', null, '', '0', '0', '26.4', null, null, null, null, '');
...
...
src/main/java/com/jsh/erp/constants/BusinessConstants.java
View file @
086b7d48
...
...
@@ -49,7 +49,7 @@ public class BusinessConstants {
public
static
final
String
ENABLE_SERIAL_NUMBER_NOT_ENABLED
=
"0"
;
/**
* 出入库分类
*采购、采购退货、其它、零售、销售、调拨
、礼品充值
*采购、采购退货、其它、零售、销售、调拨
* */
public
static
final
String
SUB_TYPE_PURCHASE
=
"采购"
;
public
static
final
String
SUB_TYPE_PURCHASE_TETURNS
=
"采购退货"
;
...
...
src/main/java/com/jsh/erp/controller/DepotController.java
View file @
086b7d48
...
...
@@ -121,32 +121,4 @@ public class DepotController {
}
return
arr
;
}
/**
* 查找礼品卡-虚拟仓库
* @param type
* @param request
* @return
*/
@RequestMapping
(
value
=
"/findGiftByType"
)
public
JSONArray
findGiftByType
(
@RequestParam
(
"type"
)
Integer
type
,
HttpServletRequest
request
)
{
JSONArray
arr
=
new
JSONArray
();
try
{
List
<
Depot
>
dataList
=
depotService
.
findGiftByType
(
type
);
//存放数据json数组
if
(
null
!=
dataList
)
{
for
(
Depot
depot
:
dataList
)
{
JSONObject
item
=
new
JSONObject
();
item
.
put
(
"id"
,
depot
.
getId
());
//仓库名称
item
.
put
(
"name"
,
depot
.
getName
());
arr
.
add
(
item
);
}
}
}
catch
(
Exception
e
)
{
logger
.
error
(
">>>>>>>>>查找仓库信息异常"
,
e
);
}
return
arr
;
}
}
src/main/java/com/jsh/erp/controller/DepotHeadController.java
View file @
086b7d48
...
...
@@ -145,45 +145,6 @@ public class DepotHeadController {
return
res
;
}
/**
* 查找统计信息_根据礼品卡(报表)
* @param projectId
* @param request
* @return
*/
@GetMapping
(
value
=
"/findGiftReport"
)
public
BaseResponseInfo
findGiftReport
(
@RequestParam
(
"projectId"
)
String
projectId
,
HttpServletRequest
request
)
{
BaseResponseInfo
res
=
new
BaseResponseInfo
();
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
try
{
List
<
DepotHead
>
dataList_in
=
depotHeadService
.
getDepotHead
();
String
headId
=
""
;
if
(
null
!=
dataList_in
)
{
for
(
DepotHead
depotHead
:
dataList_in
)
{
headId
=
headId
+
depotHead
.
getId
()
+
","
;
}
List
<
DepotHead
>
dataList_out
=
depotHeadService
.
getDepotHeadGiftOut
(
projectId
);
if
(
null
!=
dataList_out
)
{
for
(
DepotHead
depotHead
:
dataList_out
)
{
headId
=
headId
+
depotHead
.
getId
()
+
","
;
}
}
}
if
(
headId
!=
""
)
{
headId
=
headId
.
substring
(
0
,
headId
.
lastIndexOf
(
","
));
}
map
.
put
(
"HeadIds"
,
headId
);
res
.
code
=
200
;
res
.
data
=
map
;
}
catch
(
Exception
e
){
e
.
printStackTrace
();
res
.
code
=
500
;
res
.
data
=
"获取数据失败"
;
}
return
res
;
}
/**
* 入库出库明细接口
* @param currentPage
...
...
src/main/java/com/jsh/erp/controller/DepotItemController.java
View file @
086b7d48
...
...
@@ -634,61 +634,6 @@ public class DepotItemController {
return
res
;
}
/**
* 查找礼品卡信息
* @param currentPage
* @param pageSize
* @param projectId
* @param headIds
* @param materialIds
* @param mpList
* @param request
* @return
*/
@GetMapping
(
value
=
"/findGiftByAll"
)
public
BaseResponseInfo
findGiftByAll
(
@RequestParam
(
"currentPage"
)
Integer
currentPage
,
@RequestParam
(
"pageSize"
)
Integer
pageSize
,
@RequestParam
(
"projectId"
)
Integer
projectId
,
@RequestParam
(
"headIds"
)
String
headIds
,
@RequestParam
(
"materialIds"
)
String
materialIds
,
@RequestParam
(
"mpList"
)
String
mpList
,
HttpServletRequest
request
)
{
BaseResponseInfo
res
=
new
BaseResponseInfo
();
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
try
{
List
<
DepotItemVo4WithInfoEx
>
dataList
=
depotItemService
.
findByAll
(
headIds
,
materialIds
,
currentPage
,
pageSize
);
String
[]
mpArr
=
mpList
.
split
(
","
);
int
total
=
depotItemService
.
findByAllCount
(
headIds
,
materialIds
);
map
.
put
(
"total"
,
total
);
Integer
pid
=
projectId
;
JSONArray
dataArray
=
new
JSONArray
();
if
(
null
!=
dataList
)
{
for
(
DepotItemVo4WithInfoEx
diEx
:
dataList
)
{
JSONObject
item
=
new
JSONObject
();
BigDecimal
InSum
=
sumNumberGift
(
"礼品充值"
,
pid
,
diEx
.
getMId
(),
"in"
);
BigDecimal
OutSum
=
sumNumberGift
(
"礼品销售"
,
pid
,
diEx
.
getMId
(),
"out"
);
item
.
put
(
"MaterialName"
,
diEx
.
getMName
());
item
.
put
(
"MaterialModel"
,
diEx
.
getMModel
());
//扩展信息
String
materialOther
=
getOtherInfo
(
mpArr
,
diEx
);
item
.
put
(
"MaterialOther"
,
materialOther
);
item
.
put
(
"MaterialColor"
,
diEx
.
getMColor
());
item
.
put
(
"MaterialUnit"
,
diEx
.
getMaterialUnit
());
item
.
put
(
"thisSum"
,
InSum
.
subtract
(
OutSum
));
dataArray
.
add
(
item
);
}
}
map
.
put
(
"rows"
,
dataArray
);
res
.
code
=
200
;
res
.
data
=
map
;
}
catch
(
Exception
e
){
e
.
printStackTrace
();
res
.
code
=
500
;
res
.
data
=
"获取数据失败"
;
}
return
res
;
}
/**
* 导出excel表格
* @param currentPage
...
...
@@ -836,28 +781,4 @@ public class DepotItemController {
}
return
sumPrice
;
}
/**
* 数量合计-礼品卡
* @param subType
* @param ProjectId
* @param MId
* @param type
* @return
*/
public
BigDecimal
sumNumberGift
(
String
subType
,
Integer
ProjectId
,
Long
MId
,
String
type
)
{
BigDecimal
sumNumber
=
BigDecimal
.
ZERO
;
String
allNumber
=
""
;
try
{
if
(
ProjectId
!=
null
)
{
BigDecimal
sum
=
depotItemService
.
findGiftByType
(
subType
,
ProjectId
,
MId
,
type
);
if
(
sum
!=
null
)
{
sumNumber
=
sum
;
}
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
sumNumber
;
}
}
src/main/resources/mapper_xml/DepotItemMapperEx.xml
View file @
086b7d48
...
...
@@ -87,7 +87,7 @@
case when type='入库' then di.BasicNumber when type='出库' then 0-di.BasicNumber else 0 end as b_num,
date_format(dh.OperTime,'%Y-%m-%d %H:%i:%S') as oTime
from jsh_depothead dh INNER JOIN jsh_depotitem di on dh.id=di.HeaderId where type!='其它'
and SubType!='调拨'
and SubType!='礼品充值'
and SubType!='调拨'
and MaterialId =${mId} ORDER BY oTime desc
<if
test=
"offset != null and rows != null"
>
limit #{offset},#{rows}
...
...
@@ -96,7 +96,7 @@
<select
id=
"findDetailByTypeAndMaterialIdCounts"
resultType=
"java.lang.Integer"
>
select count(1)
from jsh_depothead dh INNER JOIN jsh_depotitem di on dh.id=di.HeaderId where type!='其它'
and SubType!='调拨'
and SubType!='礼品充值'
and SubType!='调拨'
and MaterialId =${mId}
</select>
...
...
@@ -124,7 +124,7 @@
<select
id=
"findByTypeAndMaterialIdOut"
resultType=
"java.lang.Integer"
>
select ifnull(sum(BasicNumber),0) as BasicNumber from jsh_depothead dh INNER JOIN jsh_depotitem di on dh.id=di.HeaderId where type='出库'
and SubType!='调拨' and
SubType!='礼品充值' and
MaterialId = ${mId}
and SubType!='调拨' and MaterialId = ${mId}
</select>
<select
id=
"getDetailList"
parameterType=
"com.jsh.erp.datasource.entities.DepotItemExample"
resultMap=
"ResultWithInfoExMap"
>
...
...
@@ -177,7 +177,7 @@
or
(SubType='调拨' and AnotherDepotId=${ProjectId})
or
(
SubType='礼品充值' and
AnotherDepotId=${ProjectId}))
(AnotherDepotId=${ProjectId}))
and MaterialId = ${MId} and dh.OperTime
<
'${MonthTime}-01 00:00:00'
</select>
...
...
@@ -188,7 +188,7 @@
or
(SubType='调拨' and AnotherDepotId=${ProjectId})
or
(
SubType='礼品充值' and
AnotherDepotId=${ProjectId}))
(AnotherDepotId=${ProjectId}))
and MaterialId = ${MId} and dh.OperTime
>
= '${MonthTime}-01 00:00:00'
and dh.OperTime
<
= '${MonthTime}-31 23:59:59'
</select>
...
...
@@ -216,7 +216,7 @@
or
(SubType='调拨' and AnotherDepotId=${ProjectId})
or
(
SubType='礼品充值' and
AnotherDepotId=${ProjectId}))
(AnotherDepotId=${ProjectId}))
and MaterialId = ${MId} and dh.OperTime
<
'${MonthTime}-01 00:00:00'
</select>
...
...
@@ -227,7 +227,7 @@
or
(SubType='调拨' and AnotherDepotId=${ProjectId})
or
(
SubType='礼品充值' and
AnotherDepotId=${ProjectId}))
(AnotherDepotId=${ProjectId}))
and MaterialId = ${MId} and dh.OperTime
>
= '${MonthTime}-01 00:00:00'
and dh.OperTime
<
= '${MonthTime}-31 23:59:59'
</select>
...
...
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