diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index e5e3687..674d49d 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -7,8 +7,21 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -77,7 +90,7 @@
@@ -138,7 +151,7 @@
-
+
@@ -176,6 +189,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -294,12 +320,10 @@
-
-
@@ -503,8 +527,7 @@
-
-
+
1597716938734
@@ -520,21 +543,7 @@
1597717639939
-
- 1598000490139
-
-
-
- 1598000490139
-
-
- 1598228924143
-
-
-
- 1598228924143
-
-
+
@@ -551,9 +560,7 @@
-
-
-
+
@@ -568,14 +575,17 @@
-
-
+
+
-
+
+
+
+
-
+
@@ -586,39 +596,51 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
+
+
-
-
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/wms-parent.iml b/wms-parent.iml
index 05b3728..260512f 100644
--- a/wms-parent.iml
+++ b/wms-parent.iml
@@ -10,6 +10,15 @@
+
+
+
+
+
+
+
+
+
@@ -95,7 +104,7 @@
-
+
@@ -104,7 +113,7 @@
-
+
diff --git a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/dao/MtAloneByAShelfMapper.java b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/dao/MtAloneByAShelfMapper.java
index 4618985..03adb6d 100644
--- a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/dao/MtAloneByAShelfMapper.java
+++ b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/dao/MtAloneByAShelfMapper.java
@@ -2,5 +2,9 @@ package com.deer.wms.produce.manage.dao;
import com.deer.wms.produce.manage.model.MtAloneByAShelf;
import com.deer.wms.project.seed.core.mapper.Mapper;
+
+import java.util.List;
+
public interface MtAloneByAShelfMapper extends Mapper {
+ List getAllByShelfStatus(MtAloneByAShelf aShelfStatus);
}
\ No newline at end of file
diff --git a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/dao/MtAloneByOrderInfoMapper.java b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/dao/MtAloneByOrderInfoMapper.java
index 788371d..857cb83 100644
--- a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/dao/MtAloneByOrderInfoMapper.java
+++ b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/dao/MtAloneByOrderInfoMapper.java
@@ -2,7 +2,6 @@ package com.deer.wms.produce.manage.dao;
import com.deer.wms.produce.manage.model.MtAloneByOrderInfo;
import com.deer.wms.produce.manage.model.MtAloneByOrderInfoParams;
-import com.deer.wms.produce.manage.model.MtAloneByOrderInfoVo;
import com.deer.wms.project.seed.core.mapper.Mapper;
import java.util.List;
diff --git a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/mapper/MtAloneByAShelfMapper.xml b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/mapper/MtAloneByAShelfMapper.xml
index 83044e8..84cde06 100644
--- a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/mapper/MtAloneByAShelfMapper.xml
+++ b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/mapper/MtAloneByAShelfMapper.xml
@@ -14,4 +14,11 @@
+
+
\ No newline at end of file
diff --git a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/mapper/MtAloneByOrderInfoMapper.xml b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/mapper/MtAloneByOrderInfoMapper.xml
index 4707493..cfcacef 100644
--- a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/mapper/MtAloneByOrderInfoMapper.xml
+++ b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/mapper/MtAloneByOrderInfoMapper.xml
@@ -49,6 +49,7 @@
AND mappb.company_id = #{companyId}
+ AND order_status = 0
\ No newline at end of file
diff --git a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/mapper/MtAloneByProductInfoMapper.xml b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/mapper/MtAloneByProductInfoMapper.xml
index 112c3e8..cbccf27 100644
--- a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/mapper/MtAloneByProductInfoMapper.xml
+++ b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/mapper/MtAloneByProductInfoMapper.xml
@@ -44,5 +44,6 @@
SELECT *
FROM mt_alone_by_product_info
WHERE order_info_id = #{id}
+ AND product_status = 0
\ No newline at end of file
diff --git a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/model/MtAloneByOrderInfoParams.java b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/model/MtAloneByOrderInfoParams.java
index 4588706..861dc21 100644
--- a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/model/MtAloneByOrderInfoParams.java
+++ b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/model/MtAloneByOrderInfoParams.java
@@ -2,6 +2,8 @@ package com.deer.wms.produce.manage.model;
import com.deer.wms.project.seed.core.service.QueryParams;
+import java.util.List;
+
/**
* Created by on 2020/08/18.
*/
@@ -11,6 +13,12 @@ public class MtAloneByOrderInfoParams extends QueryParams {
private String endTime;
+ private Integer id;
+
+ private MtAloneByOrderInfo mtAloneByOrderInfo;
+
+ private List mtAloneByProductInfoList;
+
public String getBeginTime() {
return beginTime;
}
@@ -26,4 +34,28 @@ public class MtAloneByOrderInfoParams extends QueryParams {
public void setEndTime(String endTime) {
this.endTime = endTime;
}
+
+ public Integer getId() {
+ return id;
+ }
+
+ public void setId(Integer id) {
+ this.id = id;
+ }
+
+ public MtAloneByOrderInfo getMtAloneByOrderInfo() {
+ return mtAloneByOrderInfo;
+ }
+
+ public void setMtAloneByOrderInfo(MtAloneByOrderInfo mtAloneByOrderInfo) {
+ this.mtAloneByOrderInfo = mtAloneByOrderInfo;
+ }
+
+ public List getMtAloneByProductInfoList() {
+ return mtAloneByProductInfoList;
+ }
+
+ public void setMtAloneByProductInfoList(List mtAloneByProductInfoList) {
+ this.mtAloneByProductInfoList = mtAloneByProductInfoList;
+ }
}
diff --git a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/MtAloneByAShelfService.java b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/MtAloneByAShelfService.java
index 8495f55..2a8c63e 100644
--- a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/MtAloneByAShelfService.java
+++ b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/MtAloneByAShelfService.java
@@ -1,7 +1,6 @@
package com.deer.wms.produce.manage.service;
import com.deer.wms.produce.manage.model.MtAloneByAShelf;
-import com.deer.wms.produce.manage.model.MtAloneByAShelfParams;
import com.deer.wms.project.seed.core.service.Service;
import java.util.List;
@@ -11,6 +10,6 @@ import java.util.List;
*/
public interface MtAloneByAShelfService extends Service {
-
+ List getAllByShelfStatus(MtAloneByAShelf mtAloneByAShelf);
}
diff --git a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/MtAloneByOrderInfoService.java b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/MtAloneByOrderInfoService.java
index 81dd998..b602bb1 100644
--- a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/MtAloneByOrderInfoService.java
+++ b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/MtAloneByOrderInfoService.java
@@ -14,4 +14,6 @@ public interface MtAloneByOrderInfoService extends Service findList(MtAloneByOrderInfoParams params);
+
+ MtAloneByOrderInfo findByIdStatus(Integer id);
}
diff --git a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/impl/MtAloneByAShelfServiceImpl.java b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/impl/MtAloneByAShelfServiceImpl.java
index c76946b..b0f1ea4 100644
--- a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/impl/MtAloneByAShelfServiceImpl.java
+++ b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/impl/MtAloneByAShelfServiceImpl.java
@@ -2,7 +2,6 @@ package com.deer.wms.produce.manage.service.impl;
import com.deer.wms.produce.manage.dao.MtAloneByAShelfMapper;
import com.deer.wms.produce.manage.model.MtAloneByAShelf;
-import com.deer.wms.produce.manage.model.MtAloneByAShelfParams;
import com.deer.wms.produce.manage.service.MtAloneByAShelfService;
import com.deer.wms.project.seed.core.service.AbstractService;
@@ -22,5 +21,8 @@ public class MtAloneByAShelfServiceImpl extends AbstractService getAllByShelfStatus(MtAloneByAShelf mtAloneByAShelf) {
+ return mtAloneByAShelfMapper.getAllByShelfStatus(mtAloneByAShelf);
+ }
}
diff --git a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/web/MtAloneByAShelfController.java b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/web/MtAloneByAShelfController.java
index 600c9f0..414b487 100644
--- a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/web/MtAloneByAShelfController.java
+++ b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/web/MtAloneByAShelfController.java
@@ -29,7 +29,7 @@ import java.util.List;
/**
* Created by on 2020/08/18.
*/
-@Api(description = "xxx接口")
+@Api(description = "A字架接口")
@RestController
@RequestMapping("/mt/alone/by/a/shelfs")
public class MtAloneByAShelfController {
@@ -90,4 +90,19 @@ public class MtAloneByAShelfController {
return ResultGenerator.genSuccessResult(pageInfo);
}
+ /**
+ * 查询全部可用的a子架
+ */
+ @PostMapping("/get/all/by/shelf/status")
+ public Result getAllByShelfStatus(@ApiIgnore @User CurrentUser currentUser){
+ if(currentUser==null){
+ return ResultGenerator.genFailResult(CommonCode.SERVICE_ERROR,"未登录错误",null );
+ }
+ MtAloneByAShelf mtAloneByAShelf = new MtAloneByAShelf();
+ mtAloneByAShelf.setCompanyId(currentUser.getCompanyId());
+ mtAloneByAShelf.setaShelfStatus(0);
+ List list = mtAloneByAShelfService.getAllByShelfStatus(mtAloneByAShelf);
+ return ResultGenerator.genSuccessResult(list);
+ }
+
}
diff --git a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/web/MtAloneByOrderInfoController.java b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/web/MtAloneByOrderInfoController.java
index d7a539e..0dacb12 100644
--- a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/web/MtAloneByOrderInfoController.java
+++ b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/web/MtAloneByOrderInfoController.java
@@ -59,22 +59,27 @@ public class MtAloneByOrderInfoController {
@Autowired
private MtAloneByOrderInfoMapping mtAloneByOrderInfoMapping;
- @OperateLog(description = "添加xxx", type = "增加")
- @ApiOperation(value = "添加xxx", notes = "添加xxx")
+ @OperateLog(description = "添加订单", type = "增加")
+ @ApiOperation(value = "添加订单", notes = "添加订单")
@PostMapping("/add")
- public Result add(@RequestBody MtAloneByOrderInfo mtAloneByOrderInfo, @ApiIgnore @User CurrentUser currentUser) {
+ public Result add(@RequestBody MtAloneByOrderInfoParams mtAloneByOrderInfoParams, @ApiIgnore @User CurrentUser currentUser) {
if(currentUser==null){
return ResultGenerator.genFailResult( CommonCode.SERVICE_ERROR,"未登录错误",null );
}
- mtAloneByOrderInfo.setCreateTime(new Date());
- mtAloneByOrderInfo.setCompanyId(currentUser.getCompanyId());
- mtAloneByOrderInfoService.save(mtAloneByOrderInfo);
+ mtAloneByOrderInfoParams.getMtAloneByOrderInfo().setCreateTime(new Date());
+ mtAloneByOrderInfoParams.getMtAloneByOrderInfo().setCompanyId(currentUser.getCompanyId());
+ mtAloneByOrderInfoService.save(mtAloneByOrderInfoParams.getMtAloneByOrderInfo());
+ for (MtAloneByProductInfo mtAloneByProductInfo:mtAloneByOrderInfoParams.getMtAloneByProductInfoList()) {
+ mtAloneByProductInfo.setCreateTime(new Date());
+ mtAloneByProductInfo.setCompanyId(currentUser.getCompanyId());
+ }
+ mtAloneByProductInfoService.save(mtAloneByOrderInfoParams.getMtAloneByProductInfoList());
return ResultGenerator.genSuccessResult();
}
@OperateLog(description = "删除订单", type = "删除")
@ApiOperation(value = "删除订单", notes = "删除订单")
- @DeleteMapping("/delete/{id}")
+ @PostMapping("/delete/{id}")
public Result delete(@PathVariable Integer Id) {
mtAloneByProductInfoService.deleteByOrderInfoId(Id);
mtAloneByOrderInfoService.deleteById(Id);
@@ -83,32 +88,54 @@ public class MtAloneByOrderInfoController {
/**
* 修改保存
- * @param mtAloneByOrderInfo
+ * @param mtAloneByOrderInfoParams
* @return
*/
@OperateLog(description = "修改订单", type = "更新")
@ApiOperation(value = "修改订单", notes = "修改订单")
@PostMapping("/update")
- public Result update(@RequestBody MtAloneByOrderInfo mtAloneByOrderInfo) {
- mtAloneByOrderInfo.setUpdateTime(new Date());
- mtAloneByOrderInfoService.update(mtAloneByOrderInfo);
+ public Result update(@RequestBody MtAloneByOrderInfoParams mtAloneByOrderInfoParams) {
+ mtAloneByOrderInfoParams.getMtAloneByOrderInfo().setUpdateTime(new Date());
+ mtAloneByOrderInfoService.update(mtAloneByOrderInfoParams.getMtAloneByOrderInfo());
+ for (MtAloneByProductInfo mtAloneByProductInfo:mtAloneByOrderInfoParams.getMtAloneByProductInfoList()) {
+ mtAloneByProductInfo.setUpdateTime(new Date());
+ mtAloneByProductInfoService.update(mtAloneByProductInfo);
+ }
return ResultGenerator.genSuccessResult();
}
/**
- * 修改订单获取修改的数据并填充
- * @param id
+ * 根据订单id查询出来产品信息并且分页
+ * @param
* @return
*/
- @GetMapping("/update/for/data/{id}")
- public Result updateForData(@PathVariable Integer id){
- MtAloneByOrderInfo mtAloneByOrderInfo = mtAloneByOrderInfoService.findById(id);
+ @GetMapping("/update/for/product/info")
+ public Result updateForProductInfo(MtAloneByOrderInfoParams params, @ApiIgnore @User CurrentUser currentUser){
+ if(currentUser==null){
+ return ResultGenerator.genFailResult(CommonCode.SERVICE_ERROR,"未登录错误",null );
+ }
+
+ if (currentUser.getCompanyType() != SystemManageConstant.COMPANY_TYPE_MT){
+ params.setCompanyId(currentUser.getCompanyId());
+ }else{
+ params.setCompanyId(null);
+ }
+ PageHelper.startPage(params.getPageNum(), params.getPageSize());
+ List mtAloneByProductInfoList = mtAloneByProductInfoService.findByOrderInfoId(params.getId());
+ PageInfo pageInfo = new PageInfo(mtAloneByProductInfoList);
+ /*MtAloneByOrderInfo mtAloneByOrderInfo = mtAloneByOrderInfoService.findById(id);
List mtAloneByProductInfos = mtAloneByProductInfoService.findByOrderInfoId(id);
MtAloneByOrderInfoVo mtAloneByOrderInfoVo = mtAloneByOrderInfoMapping.MtAloneByOrderInfoToMtAloneByOrderInfoVo(mtAloneByOrderInfo);
mtAloneByOrderInfoVo.setMtAloneByProductInfos(mtAloneByProductInfos);
- return ResultGenerator.genSuccessResult(mtAloneByOrderInfoVo);
+ */
+ return ResultGenerator.genSuccessResult(pageInfo);
}
+ /**
+ * 根据订单id查询出来订单详情
+ * @param id
+ * @return
+ */
@GetMapping("/detail/{id}")
public Result detail(@PathVariable Integer id) {
MtAloneByOrderInfo mtAloneByOrderInfo = mtAloneByOrderInfoService.findById(id);
diff --git a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/web/MtAloneByProductInfoController.java b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/web/MtAloneByProductInfoController.java
index 58d5a82..2242619 100644
--- a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/web/MtAloneByProductInfoController.java
+++ b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/web/MtAloneByProductInfoController.java
@@ -1,5 +1,9 @@
package com.deer.wms.produce.manage.web;
+import com.deer.wms.base.system.model.MtAloneProductLibrary;
+import com.deer.wms.base.system.model.MtAloneProductLibraryParams;
+import com.deer.wms.base.system.service.MtAloneProductLibraryService;
+import com.deer.wms.base.system.web.MtAloneProductLibraryController;
import com.deer.wms.produce.manage.model.MtAloneByAShelf;
import com.deer.wms.project.seed.annotation.OperateLog;
import com.deer.wms.project.seed.constant.SystemManageConstant;
@@ -30,7 +34,7 @@ import java.util.List;
/**
* Created by on 2020/08/18.
*/
-@Api(description = "xxx接口")
+@Api(description = "产品信息接口")
@RestController
@RequestMapping("/mt/alone/by/product/infos")
public class MtAloneByProductInfoController {
@@ -38,6 +42,9 @@ public class MtAloneByProductInfoController {
@Autowired
private MtAloneByProductInfoService mtAloneByProductInfoService;
+ @Autowired
+ private MtAloneProductLibraryService mtAloneProductLibraryService;
+
@OperateLog(description = "添加xxx", type = "增加")
@ApiOperation(value = "添加xxx", notes = "添加xxx")
@PostMapping("/add")
@@ -45,8 +52,8 @@ public class MtAloneByProductInfoController {
if(currentUser==null){
return ResultGenerator.genFailResult( CommonCode.SERVICE_ERROR,"未登录错误",null );
}
- mtAloneByProductInfo.setCreateTime(new Date());
- mtAloneByProductInfo.setCompanyId(currentUser.getCompanyId());
+ mtAloneByProductInfo.setCreateTime(new Date());
+ mtAloneByProductInfo.setCompanyId(currentUser.getCompanyId());
mtAloneByProductInfoService.save(mtAloneByProductInfo);
return ResultGenerator.genSuccessResult();
}
@@ -59,8 +66,8 @@ public class MtAloneByProductInfoController {
return ResultGenerator.genSuccessResult();
}
- @OperateLog(description = "修改xxx", type = "更新")
- @ApiOperation(value = "修改xxx", notes = "修改xxx")
+ @OperateLog(description = "修改产品信息", type = "更新")
+ @ApiOperation(value = "修改产品信息", notes = "修改产品信息")
@PostMapping("/update")
public Result update(@RequestBody MtAloneByProductInfo mtAloneByProductInfo) {
mtAloneByProductInfo.setUpdateTime(new Date());
@@ -92,4 +99,18 @@ public class MtAloneByProductInfoController {
return ResultGenerator.genSuccessResult(pageInfo);
}
+ /**
+ * 根据公司id获取到产品池的全部产品
+ */
+ @PostMapping("/get/product/library")
+ public Result getProductLibrary(@ApiIgnore @User CurrentUser currentUser){
+ if(currentUser==null){
+ return ResultGenerator.genFailResult(CommonCode.SERVICE_ERROR,"未登录错误",null );
+ }
+ MtAloneProductLibraryParams mtAloneProductLibraryParams = new MtAloneProductLibraryParams();
+ mtAloneProductLibraryParams.setCompanyId(currentUser.getCompanyId());
+ List list = mtAloneProductLibraryService.findList(mtAloneProductLibraryParams);
+ return ResultGenerator.genSuccessResult(list);
+ }
+
}