From 086b7d486f739d62e7359b9bdbf6576e9603a7c2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=AD=A3=E5=9C=A3=E5=8D=8E?=
<852955+jishenghua@users.noreply.gitee.com>
Date: Fri, 22 Feb 2019 23:27:46 +0800
Subject: [PATCH] =?UTF-8?q?=E6=B8=85=E7=90=86=E5=92=8C=E7=A4=BC=E5=93=81?=
=?UTF-8?q?=E5=8D=A1=E7=9B=B8=E5=85=B3=E7=9A=84=E4=BB=A3=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
erp_web/js/pages/materials/bill_detail.js | 20 +----
erp_web/pages/materials/bill_detail.html | 66 ----------------
sql/jsh_erp.sql | 4 -
.../jsh/erp/constants/BusinessConstants.java | 2 +-
.../jsh/erp/controller/DepotController.java | 28 -------
.../erp/controller/DepotHeadController.java | 39 ---------
.../erp/controller/DepotItemController.java | 79 -------------------
.../mapper_xml/DepotItemMapperEx.xml | 14 ++--
8 files changed, 10 insertions(+), 242 deletions(-)
diff --git a/erp_web/js/pages/materials/bill_detail.js b/erp_web/js/pages/materials/bill_detail.js
index 6c4838a8..a533bd24 100644
--- a/erp_web/js/pages/materials/bill_detail.js
+++ b/erp_web/js/pages/materials/bill_detail.js
@@ -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为显示
diff --git a/erp_web/pages/materials/bill_detail.html b/erp_web/pages/materials/bill_detail.html
index 07beb7df..e66173c9 100644
--- a/erp_web/pages/materials/bill_detail.html
+++ b/erp_web/pages/materials/bill_detail.html
@@ -557,72 +557,6 @@
-
-
-
-
- | 单据日期: |
-
-
- |
- 单据编号: |
-
-
- |
- |
- |
- |
- |
- |
-
-
- |
-
-
- |
-
-
- | 单据备注: |
-
-
- |
-
-
-
-
-
-
-
- | 单据日期: |
-
-
- |
- 单据编号: |
-
-
- |
- |
- |
- |
- |
- |
-
-
- |
-
-
- |
-
-
- | 单据备注: |
-
-
- |
-
-
-
diff --git a/sql/jsh_erp.sql b/sql/jsh_erp.sql
index 57206340..e8b29321 100644
--- a/sql/jsh_erp.sql
+++ b/sql/jsh_erp.sql
@@ -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, '');
diff --git a/src/main/java/com/jsh/erp/constants/BusinessConstants.java b/src/main/java/com/jsh/erp/constants/BusinessConstants.java
index 9da92a5f..8e60d85f 100644
--- a/src/main/java/com/jsh/erp/constants/BusinessConstants.java
+++ b/src/main/java/com/jsh/erp/constants/BusinessConstants.java
@@ -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 = "采购退货";
diff --git a/src/main/java/com/jsh/erp/controller/DepotController.java b/src/main/java/com/jsh/erp/controller/DepotController.java
index 3a195a1e..028e92ed 100644
--- a/src/main/java/com/jsh/erp/controller/DepotController.java
+++ b/src/main/java/com/jsh/erp/controller/DepotController.java
@@ -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 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;
- }
}
diff --git a/src/main/java/com/jsh/erp/controller/DepotHeadController.java b/src/main/java/com/jsh/erp/controller/DepotHeadController.java
index eaf82abb..14ebe929 100644
--- a/src/main/java/com/jsh/erp/controller/DepotHeadController.java
+++ b/src/main/java/com/jsh/erp/controller/DepotHeadController.java
@@ -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 map = new HashMap();
- try {
- List dataList_in = depotHeadService.getDepotHead();
- String headId = "";
- if (null != dataList_in) {
- for (DepotHead depotHead : dataList_in) {
- headId = headId + depotHead.getId() + ",";
- }
- List 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
diff --git a/src/main/java/com/jsh/erp/controller/DepotItemController.java b/src/main/java/com/jsh/erp/controller/DepotItemController.java
index 99aedefc..709db49e 100644
--- a/src/main/java/com/jsh/erp/controller/DepotItemController.java
+++ b/src/main/java/com/jsh/erp/controller/DepotItemController.java
@@ -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 map = new HashMap();
- try {
- List 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;
- }
}
diff --git a/src/main/resources/mapper_xml/DepotItemMapperEx.xml b/src/main/resources/mapper_xml/DepotItemMapperEx.xml
index 4e4e54be..0eba3e05 100644
--- a/src/main/resources/mapper_xml/DepotItemMapperEx.xml
+++ b/src/main/resources/mapper_xml/DepotItemMapperEx.xml
@@ -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
limit #{offset},#{rows}
@@ -96,7 +96,7 @@
@@ -124,7 +124,7 @@
@@ -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'
@@ -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'
@@ -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'