Merge remote-tracking branch 'origin/master'
commit
68b752d08e
@ -0,0 +1,105 @@
|
|||||||
|
package com.hw.mes.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.io.IOException;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PutMapping;
|
||||||
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
import com.hw.common.log.annotation.Log;
|
||||||
|
import com.hw.common.log.enums.BusinessType;
|
||||||
|
import com.hw.common.security.annotation.RequiresPermissions;
|
||||||
|
import com.hw.mes.domain.MesProduceStatisticsDetail;
|
||||||
|
import com.hw.mes.service.IMesProduceStatisticsDetailService;
|
||||||
|
import com.hw.common.core.web.controller.BaseController;
|
||||||
|
import com.hw.common.core.web.domain.AjaxResult;
|
||||||
|
import com.hw.common.core.utils.poi.ExcelUtil;
|
||||||
|
import com.hw.common.core.web.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生产完成明细Controller
|
||||||
|
*
|
||||||
|
* @author xins
|
||||||
|
* @date 2024-11-26
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/produceStatisticsDetail")
|
||||||
|
public class MesProduceStatisticsDetailController extends BaseController
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private IMesProduceStatisticsDetailService mesProduceStatisticsDetailService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询生产完成明细列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("mes:produceStatisticsDetail:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(MesProduceStatisticsDetail mesProduceStatisticsDetail)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<MesProduceStatisticsDetail> list = mesProduceStatisticsDetailService.selectMesProduceStatisticsDetailJoinList(mesProduceStatisticsDetail);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出生产完成明细列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("mes:produceStatisticsDetail:export")
|
||||||
|
@Log(title = "生产完成明细", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, MesProduceStatisticsDetail mesProduceStatisticsDetail)
|
||||||
|
{
|
||||||
|
List<MesProduceStatisticsDetail> list = mesProduceStatisticsDetailService.selectMesProduceStatisticsDetailList(mesProduceStatisticsDetail);
|
||||||
|
ExcelUtil<MesProduceStatisticsDetail> util = new ExcelUtil<MesProduceStatisticsDetail>(MesProduceStatisticsDetail.class);
|
||||||
|
util.exportExcel(response, list, "生产完成明细数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取生产完成明细详细信息
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("mes:produceStatisticsDetail:query")
|
||||||
|
@GetMapping(value = "/{statisticsDetailId}")
|
||||||
|
public AjaxResult getInfo(@PathVariable("statisticsDetailId") Long statisticsDetailId)
|
||||||
|
{
|
||||||
|
return success(mesProduceStatisticsDetailService.selectMesProduceStatisticsDetailByStatisticsDetailId(statisticsDetailId));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增生产完成明细
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("mes:produceStatisticsDetail:add")
|
||||||
|
@Log(title = "生产完成明细", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public AjaxResult add(@RequestBody MesProduceStatisticsDetail mesProduceStatisticsDetail)
|
||||||
|
{
|
||||||
|
return toAjax(mesProduceStatisticsDetailService.insertMesProduceStatisticsDetail(mesProduceStatisticsDetail));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改生产完成明细
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("mes:produceStatisticsDetail:edit")
|
||||||
|
@Log(title = "生产完成明细", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public AjaxResult edit(@RequestBody MesProduceStatisticsDetail mesProduceStatisticsDetail)
|
||||||
|
{
|
||||||
|
return toAjax(mesProduceStatisticsDetailService.updateMesProduceStatisticsDetail(mesProduceStatisticsDetail));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除生产完成明细
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("mes:produceStatisticsDetail:remove")
|
||||||
|
@Log(title = "生产完成明细", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{statisticsDetailIds}")
|
||||||
|
public AjaxResult remove(@PathVariable Long[] statisticsDetailIds)
|
||||||
|
{
|
||||||
|
return toAjax(mesProduceStatisticsDetailService.deleteMesProduceStatisticsDetailByStatisticsDetailIds(statisticsDetailIds));
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,69 @@
|
|||||||
|
package com.hw.mes.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.hw.mes.domain.MesProduceStatisticsDetail;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生产完成明细Service接口
|
||||||
|
*
|
||||||
|
* @author xins
|
||||||
|
* @date 2024-11-26
|
||||||
|
*/
|
||||||
|
public interface IMesProduceStatisticsDetailService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询生产完成明细
|
||||||
|
*
|
||||||
|
* @param statisticsDetailId 生产完成明细主键
|
||||||
|
* @return 生产完成明细
|
||||||
|
*/
|
||||||
|
public MesProduceStatisticsDetail selectMesProduceStatisticsDetailByStatisticsDetailId(Long statisticsDetailId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询生产完成明细列表
|
||||||
|
*
|
||||||
|
* @param mesProduceStatisticsDetail 生产完成明细
|
||||||
|
* @return 生产完成明细集合
|
||||||
|
*/
|
||||||
|
public List<MesProduceStatisticsDetail> selectMesProduceStatisticsDetailList(MesProduceStatisticsDetail mesProduceStatisticsDetail);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询生产完成明细列表,join material,process
|
||||||
|
*
|
||||||
|
* @param mesProduceStatisticsDetail 生产完成明细
|
||||||
|
* @return 生产完成明细
|
||||||
|
*/
|
||||||
|
public List<MesProduceStatisticsDetail> selectMesProduceStatisticsDetailJoinList(MesProduceStatisticsDetail mesProduceStatisticsDetail);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增生产完成明细
|
||||||
|
*
|
||||||
|
* @param mesProduceStatisticsDetail 生产完成明细
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertMesProduceStatisticsDetail(MesProduceStatisticsDetail mesProduceStatisticsDetail);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改生产完成明细
|
||||||
|
*
|
||||||
|
* @param mesProduceStatisticsDetail 生产完成明细
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateMesProduceStatisticsDetail(MesProduceStatisticsDetail mesProduceStatisticsDetail);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除生产完成明细
|
||||||
|
*
|
||||||
|
* @param statisticsDetailIds 需要删除的生产完成明细主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteMesProduceStatisticsDetailByStatisticsDetailIds(Long[] statisticsDetailIds);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除生产完成明细信息
|
||||||
|
*
|
||||||
|
* @param statisticsDetailId 生产完成明细主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteMesProduceStatisticsDetailByStatisticsDetailId(Long statisticsDetailId);
|
||||||
|
}
|
@ -0,0 +1,107 @@
|
|||||||
|
package com.hw.mes.service.impl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.hw.common.core.utils.DateUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.hw.mes.mapper.MesProduceStatisticsDetailMapper;
|
||||||
|
import com.hw.mes.domain.MesProduceStatisticsDetail;
|
||||||
|
import com.hw.mes.service.IMesProduceStatisticsDetailService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生产完成明细Service业务层处理
|
||||||
|
*
|
||||||
|
* @author xins
|
||||||
|
* @date 2024-11-26
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class MesProduceStatisticsDetailServiceImpl implements IMesProduceStatisticsDetailService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private MesProduceStatisticsDetailMapper mesProduceStatisticsDetailMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询生产完成明细
|
||||||
|
*
|
||||||
|
* @param statisticsDetailId 生产完成明细主键
|
||||||
|
* @return 生产完成明细
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public MesProduceStatisticsDetail selectMesProduceStatisticsDetailByStatisticsDetailId(Long statisticsDetailId)
|
||||||
|
{
|
||||||
|
return mesProduceStatisticsDetailMapper.selectMesProduceStatisticsDetailByStatisticsDetailId(statisticsDetailId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询生产完成明细列表
|
||||||
|
*
|
||||||
|
* @param mesProduceStatisticsDetail 生产完成明细
|
||||||
|
* @return 生产完成明细
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<MesProduceStatisticsDetail> selectMesProduceStatisticsDetailList(MesProduceStatisticsDetail mesProduceStatisticsDetail)
|
||||||
|
{
|
||||||
|
return mesProduceStatisticsDetailMapper.selectMesProduceStatisticsDetailList(mesProduceStatisticsDetail);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询生产完成明细列表,join material,process
|
||||||
|
*
|
||||||
|
* @param mesProduceStatisticsDetail 生产完成明细
|
||||||
|
* @return 生产完成明细
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<MesProduceStatisticsDetail> selectMesProduceStatisticsDetailJoinList(MesProduceStatisticsDetail mesProduceStatisticsDetail)
|
||||||
|
{
|
||||||
|
return mesProduceStatisticsDetailMapper.selectMesProduceStatisticsDetailJoinList(mesProduceStatisticsDetail);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增生产完成明细
|
||||||
|
*
|
||||||
|
* @param mesProduceStatisticsDetail 生产完成明细
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertMesProduceStatisticsDetail(MesProduceStatisticsDetail mesProduceStatisticsDetail)
|
||||||
|
{
|
||||||
|
mesProduceStatisticsDetail.setCreateTime(DateUtils.getNowDate());
|
||||||
|
return mesProduceStatisticsDetailMapper.insertMesProduceStatisticsDetail(mesProduceStatisticsDetail);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改生产完成明细
|
||||||
|
*
|
||||||
|
* @param mesProduceStatisticsDetail 生产完成明细
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateMesProduceStatisticsDetail(MesProduceStatisticsDetail mesProduceStatisticsDetail)
|
||||||
|
{
|
||||||
|
return mesProduceStatisticsDetailMapper.updateMesProduceStatisticsDetail(mesProduceStatisticsDetail);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除生产完成明细
|
||||||
|
*
|
||||||
|
* @param statisticsDetailIds 需要删除的生产完成明细主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteMesProduceStatisticsDetailByStatisticsDetailIds(Long[] statisticsDetailIds)
|
||||||
|
{
|
||||||
|
return mesProduceStatisticsDetailMapper.deleteMesProduceStatisticsDetailByStatisticsDetailIds(statisticsDetailIds);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除生产完成明细信息
|
||||||
|
*
|
||||||
|
* @param statisticsDetailId 生产完成明细主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteMesProduceStatisticsDetailByStatisticsDetailId(Long statisticsDetailId)
|
||||||
|
{
|
||||||
|
return mesProduceStatisticsDetailMapper.deleteMesProduceStatisticsDetailByStatisticsDetailId(statisticsDetailId);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,51 @@
|
|||||||
|
package com.hw.wms.board.controller;
|
||||||
|
|
||||||
|
import com.hw.common.core.web.domain.AjaxResult;
|
||||||
|
import com.hw.wms.board.service.FirstWmsBorderService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("FirstWmsBorder")
|
||||||
|
public class FirstWmsBorderController {
|
||||||
|
@Autowired
|
||||||
|
private FirstWmsBorderService firstWmsBorderService;
|
||||||
|
/**
|
||||||
|
* 当日出、入库详情
|
||||||
|
*/
|
||||||
|
@GetMapping("/inAndOutInfo")
|
||||||
|
public AjaxResult inAndOutInfo(){
|
||||||
|
return AjaxResult.success(firstWmsBorderService.inAndOutInfo());
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 原材料库存占比
|
||||||
|
*/
|
||||||
|
@GetMapping("stockPercentage")
|
||||||
|
public AjaxResult stockPercentage(){
|
||||||
|
return AjaxResult.success(firstWmsBorderService.stockPercentage());
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 采购订单
|
||||||
|
*/
|
||||||
|
@GetMapping("purchaseInfo")
|
||||||
|
public AjaxResult purchaseInfo(){
|
||||||
|
return AjaxResult.success(firstWmsBorderService.purchaseInfo());
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 生产订单物料需求
|
||||||
|
*/
|
||||||
|
@GetMapping("/bomInfo")
|
||||||
|
public AjaxResult bomInfo(){
|
||||||
|
return AjaxResult.success(firstWmsBorderService.bomInfo());
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 成品出入库
|
||||||
|
*/
|
||||||
|
@GetMapping("/productInAndOutInfo")
|
||||||
|
public AjaxResult productInAndOutInfo(){
|
||||||
|
return AjaxResult.success(firstWmsBorderService.productInAndOutInfo());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,52 @@
|
|||||||
|
package com.hw.wms.board.controller;
|
||||||
|
|
||||||
|
import com.hw.common.core.web.domain.AjaxResult;
|
||||||
|
import com.hw.wms.board.service.FirstWmsBorderService;
|
||||||
|
import com.hw.wms.board.service.FourthWmsBorderService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("FourthWmsBorder")
|
||||||
|
public class FourthWmsBorderController {
|
||||||
|
@Autowired
|
||||||
|
private FourthWmsBorderService fouthWmsBorderService;
|
||||||
|
/**
|
||||||
|
* 当日原材料出、入库详情
|
||||||
|
*/
|
||||||
|
@GetMapping("/inAndOutInfo")
|
||||||
|
public AjaxResult inAndOutInfo(){
|
||||||
|
return AjaxResult.success(fouthWmsBorderService.inAndOutInfo());
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 原材料库存占比
|
||||||
|
*/
|
||||||
|
@GetMapping("stockPercentage")
|
||||||
|
public AjaxResult stockPercentage(){
|
||||||
|
return AjaxResult.success(fouthWmsBorderService.stockPercentage());
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 成品出入库
|
||||||
|
*/
|
||||||
|
@GetMapping("/productInAndOutInfo")
|
||||||
|
public AjaxResult productInAndOutInfo(){
|
||||||
|
return AjaxResult.success(fouthWmsBorderService.productInAndOutInfo());
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 采购订单
|
||||||
|
*/
|
||||||
|
@GetMapping("purchaseInfo")
|
||||||
|
public AjaxResult purchaseInfo(){
|
||||||
|
return AjaxResult.success(fouthWmsBorderService.purchaseInfo());
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 生产订单物料需求
|
||||||
|
*/
|
||||||
|
@GetMapping("/bomInfo")
|
||||||
|
public AjaxResult bomInfo(){
|
||||||
|
return AjaxResult.success(fouthWmsBorderService.bomInfo());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,24 @@
|
|||||||
|
package com.hw.wms.board.service;
|
||||||
|
|
||||||
|
|
||||||
|
import com.hw.wms.domain.MesProductOrder;
|
||||||
|
import com.hw.wms.domain.WmsBaseLocation;
|
||||||
|
import com.hw.wms.domain.WmsProductInstock;
|
||||||
|
import com.hw.wms.domain.WmsRawInstock;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
public interface FirstWmsBorderService {
|
||||||
|
|
||||||
|
|
||||||
|
Map inAndOutInfo();
|
||||||
|
|
||||||
|
Map stockPercentage();
|
||||||
|
|
||||||
|
List<WmsRawInstock> purchaseInfo();
|
||||||
|
|
||||||
|
List<MesProductOrder> bomInfo();
|
||||||
|
|
||||||
|
List<WmsProductInstock> productInAndOutInfo();
|
||||||
|
}
|
@ -0,0 +1,23 @@
|
|||||||
|
package com.hw.wms.board.service;
|
||||||
|
|
||||||
|
|
||||||
|
import com.hw.wms.domain.MesProductOrder;
|
||||||
|
import com.hw.wms.domain.WmsProductInstock;
|
||||||
|
import com.hw.wms.domain.WmsRawInstock;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
public interface FourthWmsBorderService {
|
||||||
|
|
||||||
|
|
||||||
|
Map inAndOutInfo();
|
||||||
|
|
||||||
|
Map stockPercentage();
|
||||||
|
|
||||||
|
List<WmsProductInstock> productInAndOutInfo();
|
||||||
|
|
||||||
|
List<WmsRawInstock> purchaseInfo();
|
||||||
|
|
||||||
|
List<MesProductOrder> bomInfo();
|
||||||
|
}
|
@ -0,0 +1,74 @@
|
|||||||
|
package com.hw.wms.board.service.impl;
|
||||||
|
|
||||||
|
import com.hw.wms.board.service.FifthWmsBorderService;
|
||||||
|
import com.hw.wms.board.service.FirstWmsBorderService;
|
||||||
|
import com.hw.wms.domain.*;
|
||||||
|
import com.hw.wms.mapper.*;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class FirstWmsBoardServiceImpl implements FirstWmsBorderService {
|
||||||
|
@Autowired
|
||||||
|
private WmsRawOutstockMapper wmsRawOutstockMapper;
|
||||||
|
@Autowired
|
||||||
|
private WmsRawInstockMapper wmsRawInstockMapper;
|
||||||
|
@Autowired
|
||||||
|
private WmsBaseLocationMapper wmsBaseLocationMapper;
|
||||||
|
@Autowired
|
||||||
|
private WmsProductInstockMapper wmsProductInstockMapper;
|
||||||
|
@Override
|
||||||
|
public Map inAndOutInfo() {
|
||||||
|
List<WmsRawOutstock> rawOutstocks = wmsRawOutstockMapper.selectInAndOutInfo();
|
||||||
|
List<WmsRawOutstock> inStocks = wmsRawInstockMapper.selectInAndOutInfo();
|
||||||
|
HashMap<String, List<WmsRawOutstock>> map = new HashMap<>();
|
||||||
|
map.put("rawOutstocks",rawOutstocks);
|
||||||
|
map.put("inStocks",inStocks);
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map stockPercentage() {
|
||||||
|
int stockAmount = wmsBaseLocationMapper.stockAmount();
|
||||||
|
int nostockAmount = wmsBaseLocationMapper.nostockAmount();
|
||||||
|
int productstockAmount = wmsBaseLocationMapper.productstockAmount();
|
||||||
|
int noProductstockAmount = wmsBaseLocationMapper.noProductstockAmount();
|
||||||
|
HashMap<String, Integer> map = new HashMap<>();
|
||||||
|
map.put("stockAmount",stockAmount);
|
||||||
|
map.put("nostockAmount",nostockAmount);
|
||||||
|
map.put("productstockAmount",productstockAmount);
|
||||||
|
map.put("noProductstockAmount",noProductstockAmount);
|
||||||
|
return map;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<WmsProductInstock> productInAndOutInfo() {
|
||||||
|
List<WmsProductInstock> instocks = wmsProductInstockMapper.productFirstInInfo();
|
||||||
|
List<WmsProductInstock> outstocks = wmsRawOutstockMapper.productFirstOutInfo();
|
||||||
|
for (WmsProductInstock instock : instocks) {
|
||||||
|
for (WmsProductInstock outstock : outstocks) {
|
||||||
|
if (instock.getDay().equals(outstock.getDay())){
|
||||||
|
instock.setOutStockAmount(outstock.getInstockAmount());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return instocks;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<MesProductOrder> bomInfo() {
|
||||||
|
return wmsRawInstockMapper.bomInfo(1);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<WmsRawInstock> purchaseInfo() {
|
||||||
|
return wmsRawInstockMapper.purchaseInfo();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,77 @@
|
|||||||
|
package com.hw.wms.board.service.impl;
|
||||||
|
|
||||||
|
import com.hw.wms.board.service.FirstWmsBorderService;
|
||||||
|
import com.hw.wms.board.service.FourthWmsBorderService;
|
||||||
|
import com.hw.wms.domain.MesProductOrder;
|
||||||
|
import com.hw.wms.domain.WmsProductInstock;
|
||||||
|
import com.hw.wms.domain.WmsRawInstock;
|
||||||
|
import com.hw.wms.domain.WmsRawOutstock;
|
||||||
|
import com.hw.wms.mapper.*;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class FouthWmsBoardServiceImpl implements FourthWmsBorderService {
|
||||||
|
@Autowired
|
||||||
|
private WmsRawOutstockMapper wmsRawOutstockMapper;
|
||||||
|
@Autowired
|
||||||
|
private WmsRawInstockMapper wmsRawInstockMapper;
|
||||||
|
@Autowired
|
||||||
|
private WmsBaseLocationMapper wmsBaseLocationMapper;
|
||||||
|
@Autowired
|
||||||
|
private WmsProductInstockMapper wmsProductInstockMapper;
|
||||||
|
@Autowired
|
||||||
|
private WmsProductOutstockMapper wmsProductOutstockMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map inAndOutInfo() {
|
||||||
|
List<WmsRawOutstock> rawOutstock = wmsRawOutstockMapper.fourthOutstockList();
|
||||||
|
List<WmsRawOutstock> inStocks = wmsRawInstockMapper.fourthInstockList();
|
||||||
|
HashMap<String, List<WmsRawOutstock>> map = new HashMap<>();
|
||||||
|
map.put("rawOutstock",rawOutstock);
|
||||||
|
map.put("inStocks",inStocks);
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map stockPercentage() {
|
||||||
|
Integer stockAmount = wmsBaseLocationMapper.selectFourthLocation();
|
||||||
|
Integer nostockAmount = wmsBaseLocationMapper.selectFourthNostockLocation();
|
||||||
|
Integer fustockLocation = wmsBaseLocationMapper.selectFourthFustockLocation();
|
||||||
|
Integer noFustockLocation = wmsBaseLocationMapper.selectFourthNoFustockLocation();
|
||||||
|
HashMap<String, Integer> map = new HashMap<>();
|
||||||
|
map.put("stockAmount",stockAmount);
|
||||||
|
map.put("nostockAmount",nostockAmount);
|
||||||
|
map.put("fustockLocation",fustockLocation);
|
||||||
|
map.put("noFustockLocation",noFustockLocation);
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<MesProductOrder> bomInfo() {
|
||||||
|
return wmsRawInstockMapper.bomInfo(3);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<WmsRawInstock> purchaseInfo() {
|
||||||
|
return wmsRawInstockMapper.purchaseFirstInfo();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<WmsProductInstock> productInAndOutInfo() {
|
||||||
|
List<WmsProductInstock> instocks = wmsProductInstockMapper.productInInfo();
|
||||||
|
List<WmsProductInstock> outstocks = wmsRawOutstockMapper.productOutInfo();
|
||||||
|
for (WmsProductInstock instock : instocks) {
|
||||||
|
for (WmsProductInstock outstock : outstocks) {
|
||||||
|
if (instock.getDay().equals(outstock.getDay())){
|
||||||
|
instock.setOutStockAmount(outstock.getInstockAmount());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return instocks;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue