From a41c2263c5b33659a4b0a489a98a49485ee54c6a Mon Sep 17 00:00:00 2001
From: CaiXiang <939387484@qq.com>
Date: Sun, 15 Dec 2019 13:44:36 +0800
Subject: [PATCH 1/8] =?UTF-8?q?=E5=88=9B=E5=BB=BA=E5=88=86=E6=94=AF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.idea/compiler.xml | 1 +
.idea/dataSources.local.xml | 9 +-
.idea/encodings.xml | 1 +
..._com_deer_wms_intercept_1_0_0_SNAPSHOT.xml | 6 +-
...m_deer_wms_project_seed_1_0_0_SNAPSHOT.xml | 6 +-
.idea/workspace.xml | 706 +++---------------
wms-parent.iml | 4 +-
7 files changed, 128 insertions(+), 605 deletions(-)
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
index f17c313..2309163 100644
--- a/.idea/compiler.xml
+++ b/.idea/compiler.xml
@@ -2,6 +2,7 @@
+
diff --git a/.idea/dataSources.local.xml b/.idea/dataSources.local.xml
index 75c8f38..19a48b0 100644
--- a/.idea/dataSources.local.xml
+++ b/.idea/dataSources.local.xml
@@ -2,11 +2,14 @@
-
+
master_key
- true
root
- *:
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/encodings.xml b/.idea/encodings.xml
index f35b346..db78f10 100644
--- a/.idea/encodings.xml
+++ b/.idea/encodings.xml
@@ -3,5 +3,6 @@
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__com_deer_wms_intercept_1_0_0_SNAPSHOT.xml b/.idea/libraries/Maven__com_deer_wms_intercept_1_0_0_SNAPSHOT.xml
index 935eacc..205a811 100644
--- a/.idea/libraries/Maven__com_deer_wms_intercept_1_0_0_SNAPSHOT.xml
+++ b/.idea/libraries/Maven__com_deer_wms_intercept_1_0_0_SNAPSHOT.xml
@@ -1,13 +1,13 @@
-
+
-
+
-
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__com_deer_wms_project_seed_1_0_0_SNAPSHOT.xml b/.idea/libraries/Maven__com_deer_wms_project_seed_1_0_0_SNAPSHOT.xml
index 826b07d..f4143c9 100644
--- a/.idea/libraries/Maven__com_deer_wms_project_seed_1_0_0_SNAPSHOT.xml
+++ b/.idea/libraries/Maven__com_deer_wms_project_seed_1_0_0_SNAPSHOT.xml
@@ -1,13 +1,13 @@
-
+
-
+
-
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index e5f7ef5..3f5fc06 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -4,27 +4,15 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
@@ -47,20 +35,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -343,179 +204,133 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
+
+
-
-
+
+
+
-
+
+
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
+
-
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
@@ -643,12 +458,10 @@
+
-
-
-
@@ -658,318 +471,23 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/wms-parent.iml b/wms-parent.iml
index 04eecf9..f513cd9 100644
--- a/wms-parent.iml
+++ b/wms-parent.iml
@@ -82,7 +82,7 @@
-
+
@@ -91,7 +91,7 @@
-
+
From 957a7ac4957da4f520ea0cd5fe74d1bbf6b308a8 Mon Sep 17 00:00:00 2001
From: hy2250089
Date: Mon, 6 Jan 2020 17:10:51 +0800
Subject: [PATCH 2/8] =?UTF-8?q?=E4=BF=9D=E5=AD=98=E5=8A=A0=E5=B7=A5?=
=?UTF-8?q?=E5=8D=95=E6=8E=A5=E5=8F=A3=E4=BF=AE=E6=94=B9=EF=BC=8C=E6=96=B0?=
=?UTF-8?q?=E5=A2=9E=E5=85=B6=E4=BB=96=E6=9C=8D=E5=8A=A1=E6=8E=A5=E5=8F=A3?=
=?UTF-8?q?=E8=B0=83=E7=94=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../impl/ProductProcessServiceImpl.java | 17 ++++----
.../manage/web/OtherServiceController.java | 42 +++++++++++++++++++
2 files changed, 49 insertions(+), 10 deletions(-)
create mode 100644 wms-produce-manage/src/main/java/com/deer/wms/produce/manage/web/OtherServiceController.java
diff --git a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/impl/ProductProcessServiceImpl.java b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/impl/ProductProcessServiceImpl.java
index 0dc460e..431cd7d 100644
--- a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/impl/ProductProcessServiceImpl.java
+++ b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/impl/ProductProcessServiceImpl.java
@@ -198,8 +198,9 @@ public class ProductProcessServiceImpl extends AbstractService processHoList = productProcessHo.getProcessHoList();
List processList;
List processMaterialsList;
- if(null != processHoList) {
+ if((null!=processHoList) && (0!=processHoList.size())) {
processList = new ArrayList(processHoList.size());
+ processMaterialsList = new ArrayList();
for (ProcessHo processHo : processHoList) {
MtAloneProcess process = new MtAloneProcess();
BeanUtils.copyProperties(processHo, process);
@@ -213,15 +214,8 @@ public class ProductProcessServiceImpl extends AbstractService();
- for (int i=0; i processMaterialsVoList = processHo.getProcessMaterialsVoList();
- if(null != processMaterialsVoList) {
+ if((null!=processMaterialsVoList) && (0!=processMaterialsVoList.size())){
for (ProcessMaterialsVo processMaterialsVo : processMaterialsVoList) {
ProcessMaterials processMaterials = new ProcessMaterials();
BeanUtils.copyProperties(processMaterialsVo, processMaterials);
@@ -238,7 +232,10 @@ public class ProductProcessServiceImpl extends AbstractService
Date: Tue, 7 Jan 2020 21:56:39 +0800
Subject: [PATCH 3/8] =?UTF-8?q?=E7=89=A9=E6=96=99=E7=AE=A1=E7=90=86?=
=?UTF-8?q?=E6=B5=8B=E8=AF=95=E4=BF=AE=E6=94=B91=EF=BC=9A=E5=88=97?=
=?UTF-8?q?=E8=A1=A8=E6=9F=A5=E8=AF=A2=E6=97=A5=E6=9C=9F=E9=99=8D=E5=BA=8F?=
=?UTF-8?q?=E3=80=81=E5=88=A0=E9=99=A4=E7=89=A9=E6=96=99=E5=8F=8A=E7=9B=B8?=
=?UTF-8?q?=E5=85=B3=E4=BF=A1=E6=81=AF=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pom.xml | 6 +++
wms-parent.iml | 7 ++++
.../wms/produce/manage/PmsApplication.java | 2 +
.../dao/MaterialsOutgoingLogMapper.java | 3 ++
.../manage/mapper/MaterialsInfoMapper.xml | 2 +-
.../mapper/MaterialsOutgoingLogMapper.xml | 10 ++++-
.../manage/mapper/ProductProcessMapper.xml | 16 --------
.../model/MaterialsOutgoingLogParams.java | 2 +-
.../manage/service/MaterialsInfoService.java | 1 +
.../service/MaterialsOutgoingLogService.java | 3 ++
.../impl/MaterialsInfoServiceImpl.java | 40 +++++++++++++++++--
.../impl/MaterialsOutgoingLogServiceImpl.java | 6 +++
.../manage/web/MaterialsInfoController.java | 37 ++++++++++++-----
.../web/MaterialsOutgoingLogController.java | 2 -
.../manage/web/OtherServiceController.java | 4 +-
15 files changed, 104 insertions(+), 37 deletions(-)
diff --git a/pom.xml b/pom.xml
index 2fc2805..f06671c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -106,6 +106,12 @@
pagehelper
4.2.1
+
+
+ tk.mybatis
+ mapper-spring-boot-starter
+ 2.0.2
+
com.alibaba
diff --git a/wms-parent.iml b/wms-parent.iml
index 04eecf9..0568428 100644
--- a/wms-parent.iml
+++ b/wms-parent.iml
@@ -76,6 +76,13 @@
+
+
+
+
+
+
+
diff --git a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/PmsApplication.java b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/PmsApplication.java
index 2747bd6..813918b 100644
--- a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/PmsApplication.java
+++ b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/PmsApplication.java
@@ -1,5 +1,7 @@
package com.deer.wms.produce.manage;
+
+import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;
diff --git a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/dao/MaterialsOutgoingLogMapper.java b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/dao/MaterialsOutgoingLogMapper.java
index 92d0b69..c7a64cb 100644
--- a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/dao/MaterialsOutgoingLogMapper.java
+++ b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/dao/MaterialsOutgoingLogMapper.java
@@ -6,9 +6,12 @@ import com.deer.wms.produce.manage.model.MaterialsOutgoingLogParams;
import com.deer.wms.produce.manage.model.MaterialsOutgoingLogVo;
import com.deer.wms.project.seed.core.mapper.Mapper;
+import java.util.HashMap;
import java.util.List;
public interface MaterialsOutgoingLogMapper extends Mapper {
List findListByOneMaterial(MaterialsOutgoingLogParams params);
+ void deleteByOutgoingIds(List ids);
+
}
\ No newline at end of file
diff --git a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/mapper/MaterialsInfoMapper.xml b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/mapper/MaterialsInfoMapper.xml
index baa1d9e..c562421 100644
--- a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/mapper/MaterialsInfoMapper.xml
+++ b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/mapper/MaterialsInfoMapper.xml
@@ -78,7 +78,7 @@
AND com.company_id = #{companyId}
- order by materials.id
+ order by materials.create_time DESC
+
+
+ DELETE FROM mt_alone_materials_outgoing_log WHERE id IN
+
+ #{ids}
+
+
+
\ No newline at end of file
diff --git a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/mapper/ProductProcessMapper.xml b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/mapper/ProductProcessMapper.xml
index 7c73340..c9f09c7 100644
--- a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/mapper/ProductProcessMapper.xml
+++ b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/mapper/ProductProcessMapper.xml
@@ -118,21 +118,5 @@
ORDER BY prodproc.create_time DESC, prodproc.update_time DESC
-
\ No newline at end of file
diff --git a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/model/MaterialsOutgoingLogParams.java b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/model/MaterialsOutgoingLogParams.java
index 5fd6a13..14a7208 100644
--- a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/model/MaterialsOutgoingLogParams.java
+++ b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/model/MaterialsOutgoingLogParams.java
@@ -8,7 +8,7 @@ import com.deer.wms.project.seed.core.service.QueryParams;
*/
public class MaterialsOutgoingLogParams extends QueryParams {
- private Integer type = ProduceManageConstant.TYPE_IN;//默认为入库记录
+ private Integer type;
private Integer materialsId;
diff --git a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/MaterialsInfoService.java b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/MaterialsInfoService.java
index f099fdc..144a465 100644
--- a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/MaterialsInfoService.java
+++ b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/MaterialsInfoService.java
@@ -20,4 +20,5 @@ public interface MaterialsInfoService extends Service {
List findMaterialsByKeyWords(MaterialsInfoParams params);
+ void deleteRelevantById(Integer materialsId);
}
diff --git a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/MaterialsOutgoingLogService.java b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/MaterialsOutgoingLogService.java
index 674b6ca..a369cba 100644
--- a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/MaterialsOutgoingLogService.java
+++ b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/MaterialsOutgoingLogService.java
@@ -8,6 +8,7 @@ import com.deer.wms.produce.manage.model.MaterialsOutgoingLogVo;
import com.deer.wms.project.seed.core.service.Service;
+import java.util.HashMap;
import java.util.List;
/**
@@ -19,4 +20,6 @@ public interface MaterialsOutgoingLogService extends Service findListByOneMaterial(MaterialsOutgoingLogParams params) ;
void save(MaterialsOutgoingLog materialsOutgoingLog, CurrentUser currentUser);
+
+ void deleteByOutgoingIds(List ids);
}
diff --git a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/impl/MaterialsInfoServiceImpl.java b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/impl/MaterialsInfoServiceImpl.java
index 750eb0a..0e095d7 100644
--- a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/impl/MaterialsInfoServiceImpl.java
+++ b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/impl/MaterialsInfoServiceImpl.java
@@ -1,16 +1,18 @@
package com.deer.wms.produce.manage.service.impl;
import com.deer.wms.produce.manage.dao.MaterialsInfoMapper;
-import com.deer.wms.produce.manage.model.MaterialsInfo;
-import com.deer.wms.produce.manage.model.MaterialsInfoDto;
-import com.deer.wms.produce.manage.model.MaterialsInfoParams;
-import com.deer.wms.produce.manage.model.MaterialsInfoVO;
+import com.deer.wms.produce.manage.model.*;
import com.deer.wms.produce.manage.service.MaterialsInfoService;
+import com.deer.wms.produce.manage.service.MaterialsOutgoingLogService;
+import com.deer.wms.produce.manage.service.MaterialsStockInfoService;
import com.deer.wms.project.seed.core.service.AbstractService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
+
+import java.util.ArrayList;
+import java.util.HashMap;
import java.util.List;
/**
@@ -23,6 +25,11 @@ public class MaterialsInfoServiceImpl extends AbstractService findList(MaterialsInfoParams params) {
@@ -44,5 +51,30 @@ public class MaterialsInfoServiceImpl extends AbstractService materialsOutgoingLogList = materialsOutgoingLogService.findListByOneMaterial(params);
+ System.out.println("=========="+materialsOutgoingLogList.size());
+ if((null!=materialsOutgoingLogList) && (materialsOutgoingLogList.size()!=0)){
+ List ids = new ArrayList();
+ for (MaterialsOutgoingLogVo materialsOutgoingLogVo : materialsOutgoingLogList){
+ ids.add(materialsOutgoingLogVo.getId());
+ }
+
+ System.out.println("----------"+ids.size());
+ if((null!=ids) && (ids.size()!=0)) {
+ materialsOutgoingLogService.deleteByOutgoingIds(ids);
+ }
+ }
+
+ }
+
}
diff --git a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/impl/MaterialsOutgoingLogServiceImpl.java b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/impl/MaterialsOutgoingLogServiceImpl.java
index 90673e0..be73b51 100644
--- a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/impl/MaterialsOutgoingLogServiceImpl.java
+++ b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/impl/MaterialsOutgoingLogServiceImpl.java
@@ -13,6 +13,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Date;
+import java.util.HashMap;
import java.util.List;
/**
@@ -87,4 +88,9 @@ public class MaterialsOutgoingLogServiceImpl extends AbstractService ids) {
+ materialsOutgoingLogMapper.deleteByOutgoingIds(ids);
+ }
}
diff --git a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/web/MaterialsInfoController.java b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/web/MaterialsInfoController.java
index 1c93ca6..8f2dc94 100644
--- a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/web/MaterialsInfoController.java
+++ b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/web/MaterialsInfoController.java
@@ -74,24 +74,39 @@ public class MaterialsInfoController {
materialsInfo.setCompanyId(currentUser.getCompanyId());
materialsInfo.setCode(ProduceManagePublicMethod.creatUniqueCode("WL"));
materialsInfoService.save(materialsInfo);
-
return ResultGenerator.genSuccessResult();
}
-
+
+ /**
+ * hy正在用
+ * 删除物料,顺带删除相应的库存信息、出入库记录
+ * @param materialsId
+ * @return
+ */
+ @ApiImplicitParams({
+ @ApiImplicitParam(name = "materialsId", value = "物料id", paramType = "query", dataType = "int", required = true)
+ })
@OperateLog(description = "删除物料", type = "删除")
@ApiOperation(value = "删除物料", notes = "删除物料")
- @DeleteMapping("/delete/{materialsId}")
- public Result delete(@PathVariable Integer materialsId) {
- //删除物料,顺带删除相应的库存信息
- MaterialsInfo materialsInfo = materialsInfoService.findById(materialsId);
- materialsInfoService.deleteById(materialsId);
- MaterialsStockInfo stock = materialsStockInfoService.findBy("materialsId",
- materialsInfo.getId());
- materialsStockInfoService.deleteById(stock.getId());
+ @DeleteMapping("/delete")
+ public Result delete(Integer materialsId, @ApiIgnore @User CurrentUser currentUser) {
+ //if(currentUser==null){
+ // return ResultGenerator.genFailResult(CommonCode.SERVICE_ERROR,"未登录错误",null );
+ //}
+ materialsInfoService.deleteRelevantById(materialsId);
return ResultGenerator.genSuccessResult();
}
-
+
+ /**
+ * hy正在用
+ * 物料更新
+ * @param materialsInfo
+ * @return
+ */
+ @ApiImplicitParams({
+ @ApiImplicitParam(name = "materialsInfo", value = "物料", paramType = "body", dataType = "MaterialsInfo", required = true)
+ })
@OperateLog(description = "修改物料", type = "更新")
@ApiOperation(value = "修改物料", notes = "修改物料")
@PostMapping("/update")
diff --git a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/web/MaterialsOutgoingLogController.java b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/web/MaterialsOutgoingLogController.java
index 2635a2b..d75d2fd 100644
--- a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/web/MaterialsOutgoingLogController.java
+++ b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/web/MaterialsOutgoingLogController.java
@@ -38,8 +38,6 @@ public class MaterialsOutgoingLogController {
@Autowired
private MaterialsStockInfoService materialsStockInfoService;
- //@Autowired
- //private MaterialsOutgoingLogDTOService materialsOutgoingLogDTOService;
/**
* hy正在用
diff --git a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/web/OtherServiceController.java b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/web/OtherServiceController.java
index b57fd9d..9cb96a1 100644
--- a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/web/OtherServiceController.java
+++ b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/web/OtherServiceController.java
@@ -26,13 +26,15 @@ import java.util.List;
@RequestMapping("/other/service")
public class OtherServiceController {
+ private String ipUrl = "http://132.232.34.114:9060/wms/";
+
@Autowired
private RestTemplate restTemplate;
//获取所有客户
@GetMapping
public Result getClients() {
- JSONObject jsonObject = restTemplate.getForObject("http://132.232.34.114:9060/wms/client/manages/list/new", JSONObject.class);
+ JSONObject jsonObject = restTemplate.getForObject(ipUrl+"client/manages/list/new", JSONObject.class);
JSONObject data = jsonObject.getJSONObject("data");
JSONArray listJson = data.getJSONArray("list");
List list = JSON.parseObject(listJson.toJSONString(), ArrayList.class);
From 9e12f2d8980173ac3661140cdcfdc7bf8246855a Mon Sep 17 00:00:00 2001
From: hy2250089
Date: Wed, 8 Jan 2020 14:51:21 +0800
Subject: [PATCH 4/8] =?UTF-8?q?=E7=89=A9=E6=96=99=E7=AE=A1=E7=90=86?=
=?UTF-8?q?=E6=B5=8B=E8=AF=95=E4=BF=AE=E6=94=B92=EF=BC=9A=E6=8C=89?=
=?UTF-8?q?=E7=85=A7=E6=97=A5=E6=9C=9F=E9=99=8D=E5=BA=8F=E6=9F=A5=E8=AF=A2?=
=?UTF-8?q?=E3=80=81=E7=BC=96=E5=86=99=E5=88=A0=E9=99=A4=E7=89=A9=E6=96=99?=
=?UTF-8?q?=E6=8E=A5=E5=8F=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../dao/MaterialsOutgoingLogMapper.java | 2 +-
.../manage/mapper/MaterialsInfoMapper.xml | 4 ++--
.../mapper/MaterialsOutgoingLogMapper.xml | 11 +++++----
.../manage/service/MaterialsInfoService.java | 3 ++-
.../service/MaterialsOutgoingLogService.java | 2 +-
.../impl/MaterialsInfoServiceImpl.java | 11 +++++----
.../impl/MaterialsOutgoingLogServiceImpl.java | 23 +++++++++++--------
.../manage/web/MaterialsInfoController.java | 8 +------
.../web/MaterialsOutgoingLogController.java | 4 ----
9 files changed, 33 insertions(+), 35 deletions(-)
diff --git a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/dao/MaterialsOutgoingLogMapper.java b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/dao/MaterialsOutgoingLogMapper.java
index c7a64cb..48bf572 100644
--- a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/dao/MaterialsOutgoingLogMapper.java
+++ b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/dao/MaterialsOutgoingLogMapper.java
@@ -12,6 +12,6 @@ import java.util.List;
public interface MaterialsOutgoingLogMapper extends Mapper {
List findListByOneMaterial(MaterialsOutgoingLogParams params);
- void deleteByOutgoingIds(List ids);
+ void deleteByOutgoingIds(HashMap outgoingParam);
}
\ No newline at end of file
diff --git a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/mapper/MaterialsInfoMapper.xml b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/mapper/MaterialsInfoMapper.xml
index c562421..546e98f 100644
--- a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/mapper/MaterialsInfoMapper.xml
+++ b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/mapper/MaterialsInfoMapper.xml
@@ -78,7 +78,7 @@
AND com.company_id = #{companyId}
- order by materials.create_time DESC
+ ORDER BY materials.create_time DESC
\ No newline at end of file
diff --git a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/mapper/MaterialsOutgoingLogMapper.xml b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/mapper/MaterialsOutgoingLogMapper.xml
index 3ff18fa..a73bfa1 100644
--- a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/mapper/MaterialsOutgoingLogMapper.xml
+++ b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/mapper/MaterialsOutgoingLogMapper.xml
@@ -50,11 +50,12 @@
ORDER BY outgoing.create_time DESC
-
- DELETE FROM mt_alone_materials_outgoing_log WHERE id IN
-
- #{ids}
-
+
+ DELETE FROM mt_alone_materials_outgoing_log
+ where 1>2 OR company_id=#{companyId} AND id IN
+
+ #{id}
+
\ No newline at end of file
diff --git a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/MaterialsInfoService.java b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/MaterialsInfoService.java
index 144a465..02bd1bc 100644
--- a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/MaterialsInfoService.java
+++ b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/MaterialsInfoService.java
@@ -1,5 +1,6 @@
package com.deer.wms.produce.manage.service;
+import com.deer.wms.intercept.common.data.CurrentUser;
import com.deer.wms.produce.manage.model.MaterialsInfo;
import com.deer.wms.produce.manage.model.MaterialsInfoDto;
import com.deer.wms.produce.manage.model.MaterialsInfoParams;
@@ -20,5 +21,5 @@ public interface MaterialsInfoService extends Service {
List findMaterialsByKeyWords(MaterialsInfoParams params);
- void deleteRelevantById(Integer materialsId);
+ void deleteRelevantById(Integer materialsId, CurrentUser currentUser);
}
diff --git a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/MaterialsOutgoingLogService.java b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/MaterialsOutgoingLogService.java
index a369cba..047031e 100644
--- a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/MaterialsOutgoingLogService.java
+++ b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/MaterialsOutgoingLogService.java
@@ -21,5 +21,5 @@ public interface MaterialsOutgoingLogService extends Service ids);
+ void deleteByOutgoingIds(HashMap outgoingParam);
}
diff --git a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/impl/MaterialsInfoServiceImpl.java b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/impl/MaterialsInfoServiceImpl.java
index 0e095d7..43e8509 100644
--- a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/impl/MaterialsInfoServiceImpl.java
+++ b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/impl/MaterialsInfoServiceImpl.java
@@ -1,5 +1,6 @@
package com.deer.wms.produce.manage.service.impl;
+import com.deer.wms.intercept.common.data.CurrentUser;
import com.deer.wms.produce.manage.dao.MaterialsInfoMapper;
import com.deer.wms.produce.manage.model.*;
import com.deer.wms.produce.manage.service.MaterialsInfoService;
@@ -52,7 +53,7 @@ public class MaterialsInfoServiceImpl extends AbstractService materialsOutgoingLogList = materialsOutgoingLogService.findListByOneMaterial(params);
- System.out.println("=========="+materialsOutgoingLogList.size());
+
if((null!=materialsOutgoingLogList) && (materialsOutgoingLogList.size()!=0)){
List ids = new ArrayList();
for (MaterialsOutgoingLogVo materialsOutgoingLogVo : materialsOutgoingLogList){
ids.add(materialsOutgoingLogVo.getId());
}
- System.out.println("----------"+ids.size());
if((null!=ids) && (ids.size()!=0)) {
- materialsOutgoingLogService.deleteByOutgoingIds(ids);
+ HashMap outgoingParam = new HashMap();
+ outgoingParam.put("companyId", 1);
+ outgoingParam.put("ids", ids);
+ materialsOutgoingLogService.deleteByOutgoingIds(outgoingParam);
}
}
diff --git a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/impl/MaterialsOutgoingLogServiceImpl.java b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/impl/MaterialsOutgoingLogServiceImpl.java
index be73b51..a59dfa3 100644
--- a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/impl/MaterialsOutgoingLogServiceImpl.java
+++ b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/impl/MaterialsOutgoingLogServiceImpl.java
@@ -39,18 +39,22 @@ public class MaterialsOutgoingLogServiceImpl extends AbstractService ids) {
- materialsOutgoingLogMapper.deleteByOutgoingIds(ids);
+ public void deleteByOutgoingIds(HashMap outgoingParam) {
+ materialsOutgoingLogMapper.deleteByOutgoingIds(outgoingParam);
}
}
diff --git a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/web/MaterialsInfoController.java b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/web/MaterialsInfoController.java
index 8f2dc94..3b3740e 100644
--- a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/web/MaterialsInfoController.java
+++ b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/web/MaterialsInfoController.java
@@ -42,12 +42,6 @@ public class MaterialsInfoController {
@Autowired
private MaterialsInfoService materialsInfoService;
- @Autowired
- private MaterialsStockInfoService materialsStockInfoService;
-
- @Autowired
- private MaterialsOutgoingLogService materialsOutgoingLogService;
-
/**
* hy正在用
* 新增物料信息
@@ -94,7 +88,7 @@ public class MaterialsInfoController {
// return ResultGenerator.genFailResult(CommonCode.SERVICE_ERROR,"未登录错误",null );
//}
- materialsInfoService.deleteRelevantById(materialsId);
+ materialsInfoService.deleteRelevantById(materialsId, currentUser);
return ResultGenerator.genSuccessResult();
}
diff --git a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/web/MaterialsOutgoingLogController.java b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/web/MaterialsOutgoingLogController.java
index d75d2fd..29e1425 100644
--- a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/web/MaterialsOutgoingLogController.java
+++ b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/web/MaterialsOutgoingLogController.java
@@ -35,10 +35,6 @@ public class MaterialsOutgoingLogController {
@Autowired
private MaterialsOutgoingLogService materialsOutgoingLogService;
- @Autowired
- private MaterialsStockInfoService materialsStockInfoService;
-
-
/**
* hy正在用
* 出入库操作,添加一条出入库记录,同时更新对应的库存信息
From f19647144cb068b9fc539f50dfa7eca362f82b35 Mon Sep 17 00:00:00 2001
From: hy2250089
Date: Thu, 9 Jan 2020 17:07:40 +0800
Subject: [PATCH 5/8] =?UTF-8?q?=E7=89=A9=E6=96=99=E7=AE=A1=E7=90=86?=
=?UTF-8?q?=E5=89=8D=E7=AB=AF=E5=AF=B9=E6=8E=A5=E4=BF=AE=E6=94=B9bug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../manage/mapper/MaterialsInfoMapper.xml | 18 ++++++--
.../impl/MaterialsInfoServiceImpl.java | 4 +-
.../manage/web/MaterialsInfoController.java | 14 +++---
.../manage/web/OtherServiceController.java | 44 -------------------
4 files changed, 24 insertions(+), 56 deletions(-)
delete mode 100644 wms-produce-manage/src/main/java/com/deer/wms/produce/manage/web/OtherServiceController.java
diff --git a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/mapper/MaterialsInfoMapper.xml b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/mapper/MaterialsInfoMapper.xml
index 546e98f..a926321 100644
--- a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/mapper/MaterialsInfoMapper.xml
+++ b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/mapper/MaterialsInfoMapper.xml
@@ -25,8 +25,11 @@
+
+
+
@@ -39,12 +42,16 @@