Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
c0620df13d
@ -1,10 +1,5 @@
|
||||
package com.ktg.mes.md.controller;
|
||||
|
||||
import com.ktg.common.utils.poi.ExcelUtil;
|
||||
import com.ktg.mes.aspect.BarcodeGen;
|
||||
import com.ktg.mes.md.domain.MdUnitMeasure;
|
||||
import com.ktg.mes.md.domain.MdVendor;
|
||||
import com.ktg.mes.md.service.IMdItemService;
|
||||
import com.ktg.common.annotation.Log;
|
||||
import com.ktg.common.constant.UserConstants;
|
||||
import com.ktg.common.core.controller.BaseController;
|
||||
@ -13,8 +8,12 @@ import com.ktg.common.core.domain.entity.ItemType;
|
||||
import com.ktg.common.core.page.TableDataInfo;
|
||||
import com.ktg.common.enums.BusinessType;
|
||||
import com.ktg.common.utils.StringUtils;
|
||||
import com.ktg.common.utils.poi.ExcelUtil;
|
||||
import com.ktg.mes.aspect.BarcodeGen;
|
||||
import com.ktg.mes.md.domain.MdItem;
|
||||
import com.ktg.mes.md.domain.MdUnitMeasure;
|
||||
import com.ktg.mes.md.service.IItemTypeService;
|
||||
import com.ktg.mes.md.service.IMdItemService;
|
||||
import com.ktg.mes.md.service.IMdUnitMeasureService;
|
||||
import com.ktg.mes.wm.utils.WmBarCodeUtil;
|
||||
import com.ktg.system.domain.SysOperLog;
|
||||
@ -26,7 +25,6 @@ import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.constraints.Null;
|
||||
import java.util.*;
|
||||
|
||||
@RestController
|
||||
@ -89,6 +87,11 @@ public class MdItemController extends BaseController {
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 主列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/open/selectProduct")
|
||||
public List<Map<String, String>> selectProduct() {
|
||||
MdItem mdItem = new MdItem();
|
||||
|
@ -1,6 +1,5 @@
|
||||
package com.ktg.mes.md.controller;
|
||||
|
||||
import com.ktg.mes.md.service.IMdUnitMeasureService;
|
||||
import com.ktg.common.annotation.Log;
|
||||
import com.ktg.common.core.controller.BaseController;
|
||||
import com.ktg.common.core.domain.AjaxResult;
|
||||
@ -8,6 +7,7 @@ import com.ktg.common.core.page.TableDataInfo;
|
||||
import com.ktg.common.enums.BusinessType;
|
||||
import com.ktg.common.utils.poi.ExcelUtil;
|
||||
import com.ktg.mes.md.domain.MdUnitMeasure;
|
||||
import com.ktg.mes.md.service.IMdUnitMeasureService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@ -39,6 +39,9 @@ public class MdUnitMeasureController extends BaseController
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询主列表
|
||||
*/
|
||||
@GetMapping("/listprimary")
|
||||
public AjaxResult listPrimary(){
|
||||
MdUnitMeasure mdUnitMeasure = new MdUnitMeasure();
|
||||
@ -47,6 +50,9 @@ public class MdUnitMeasureController extends BaseController
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 选中全部
|
||||
*/
|
||||
@GetMapping("/selectall")
|
||||
public AjaxResult selectAll(){
|
||||
MdUnitMeasure mdUnitMeasure = new MdUnitMeasure();
|
||||
|
@ -7,12 +7,14 @@ import com.ktg.common.core.page.TableDataInfo;
|
||||
import com.ktg.common.enums.BusinessType;
|
||||
import com.ktg.common.utils.poi.ExcelUtil;
|
||||
import com.ktg.mes.md.domain.WmsOutPlan;
|
||||
import com.ktg.mes.md.domain.WmsOutPlanDetailEntity;
|
||||
import com.ktg.mes.md.service.IWmsOutPlanService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@ -27,6 +29,16 @@ public class WmsOutPlanController extends BaseController {
|
||||
@Autowired
|
||||
private IWmsOutPlanService wmsOutPlanService;
|
||||
|
||||
/**
|
||||
* 查询出库计划管理列表
|
||||
*/
|
||||
@GetMapping("/open/list")
|
||||
public TableDataInfo openList(WmsOutPlanDetailEntity wmsOutPlanDetailEntity) {
|
||||
startPage();
|
||||
List<HashMap<String, Object>> list = wmsOutPlanService.selectWmsOutPlanDetailEntityList(wmsOutPlanDetailEntity);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询出库计划管理列表
|
||||
*/
|
||||
|
@ -27,13 +27,6 @@ public class WmsOutTaskController extends BaseController {
|
||||
@Autowired
|
||||
private IWmsOutTaskService wmsOutTaskService;
|
||||
|
||||
@GetMapping("/open/list")
|
||||
public TableDataInfo openList(WmsOutTask wmsOutTask) {
|
||||
startPage();
|
||||
List<WmsOutTask> list = wmsOutTaskService.selectWmsOutTaskList(wmsOutTask);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询出库任务列表
|
||||
*/
|
||||
|
@ -1,7 +1,9 @@
|
||||
package com.ktg.mes.md.service;
|
||||
|
||||
import com.ktg.mes.md.domain.WmsOutPlan;
|
||||
import com.ktg.mes.md.domain.WmsOutPlanDetailEntity;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@ -60,4 +62,6 @@ public interface IWmsOutPlanService {
|
||||
int deleteWmsOutPlanByWmsOutPlanId(Long wmsOutPlanId);
|
||||
|
||||
boolean runWmsOutPlan(Long[] wmsOutPlanIds);
|
||||
|
||||
List<HashMap<String, Object>> selectWmsOutPlanDetailEntityList(WmsOutPlanDetailEntity wmsOutPlanDetailEntity);
|
||||
}
|
||||
|
@ -95,7 +95,10 @@ public class BaseKnifeServiceImpl implements IBaseKnifeService {
|
||||
hashMap.put("wmStorageAreaName", wmsOutPlanDetail.getWmStorageAreaName()); // 库位名称
|
||||
hashMap.put("detailStatus", wmsOutPlanDetail.getDetailState()); // 明细状态
|
||||
/* 实体 */
|
||||
hashMap.put("outTime", new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(nowWmsOutPlanDetailEntity.getCreateTime())); // 出库时间
|
||||
String outTime = null;
|
||||
if (nowWmsOutPlanDetailEntity.getCreateTime() != null)
|
||||
outTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(nowWmsOutPlanDetailEntity.getCreateTime());
|
||||
hashMap.put("outTime", outTime); // 出库时间
|
||||
hashMapList.add(hashMap);
|
||||
|
||||
// 注入出库信息对象
|
||||
|
@ -3,10 +3,7 @@ package com.ktg.mes.md.service.impl;
|
||||
import com.ktg.common.utils.DateUtils;
|
||||
import com.ktg.common.utils.StringUtils;
|
||||
import com.ktg.mes.md.domain.*;
|
||||
import com.ktg.mes.md.mapper.BaseKnifeMapper;
|
||||
import com.ktg.mes.md.mapper.WmsOutPlanDetailEntityMapper;
|
||||
import com.ktg.mes.md.mapper.WmsOutPlanMapper;
|
||||
import com.ktg.mes.md.mapper.WmsOutTaskMapper;
|
||||
import com.ktg.mes.md.mapper.*;
|
||||
import com.ktg.mes.md.service.IWmsOutPlanService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@ -15,6 +12,7 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@ -37,6 +35,12 @@ public class WmsOutPlanServiceImpl implements IWmsOutPlanService {
|
||||
@Autowired
|
||||
private BaseKnifeMapper baseKnifeMapper;
|
||||
|
||||
@Autowired
|
||||
private WmsBusinessTypeMapper wmsBusinessTypeMapper;
|
||||
|
||||
@Autowired
|
||||
private MdItemMapper mdItemMapper;
|
||||
|
||||
/**
|
||||
* 查询出库计划管理
|
||||
*
|
||||
@ -185,6 +189,54 @@ public class WmsOutPlanServiceImpl implements IWmsOutPlanService {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Transactional
|
||||
@Override
|
||||
public List<HashMap<String, Object>> selectWmsOutPlanDetailEntityList(WmsOutPlanDetailEntity wmsOutPlanDetailEntity) {
|
||||
List<WmsOutPlanDetailEntity> wmsOutPlanDetailEntityList = wmsOutPlanDetailEntityMapper.selectWmsOutPlanDetailEntityList(wmsOutPlanDetailEntity);
|
||||
List<HashMap<String, Object>> hashMapList = new ArrayList<>();
|
||||
wmsOutPlanDetailEntityList.forEach(nowWmsOutPlanDetailEntity -> {
|
||||
// 根据出库实例对象获取出库计划明细
|
||||
WmsOutPlanDetail wmsOutPlanDetail = this.wmsOutPlanMapper.selectWmsOutPlanDetailById(nowWmsOutPlanDetailEntity.getWmsOutPlanDetailId());
|
||||
|
||||
// 根据计划明细获得出库计划
|
||||
WmsOutPlan wmsOutPlan = this.wmsOutPlanMapper.selectWmsOutPlanByWmsOutPlanId(wmsOutPlanDetail.getWmsOutPlanId());
|
||||
|
||||
// 根据出库计划获得出库类型
|
||||
WmsBusinessType wmsBusinessType = this.wmsBusinessTypeMapper.selectWmsBusinessTypeByTypeId(wmsOutPlan.getWmsBusinessTypeId().toString());
|
||||
|
||||
MdItem mdItem = this.mdItemMapper.selectMdItemById(wmsOutPlanDetail.getMdItemId());
|
||||
|
||||
// 设定出库信息数据
|
||||
HashMap<String, Object> hashMap = new HashMap<>();
|
||||
/* 来自计划 */
|
||||
hashMap.put("planCode", wmsOutPlan.getPlanCode()); // 计划编号
|
||||
hashMap.put("planStatus", wmsOutPlan.getPlanState()); // 计划状态
|
||||
hashMap.put("planType", wmsOutPlan.getPlanType()); // 计划类型
|
||||
hashMap.put("useUsername", wmsOutPlan.getRecipientUsername()); // 领用人
|
||||
/* 来自出入库计划类型 */
|
||||
hashMap.put("planTypeId", wmsBusinessType.getTypeId()); // 出库类型ID
|
||||
hashMap.put("planTypeCode", wmsBusinessType.getCode()); // 出库类型编码
|
||||
hashMap.put("planTypeName", wmsBusinessType.getName()); // 出库类型名称
|
||||
/* 来自计划明细 */
|
||||
hashMap.put("detailBatchNum", wmsOutPlanDetail.getDetailBatchNum()); // 明细批次
|
||||
hashMap.put("wmStorageAreaId", wmsOutPlanDetail.getWmStorageAreaId()); // 库位ID
|
||||
hashMap.put("wmStorageAreaCode", wmsOutPlanDetail.getWmStorageAreaCode()); // 库位编码
|
||||
hashMap.put("wmStorageAreaName", wmsOutPlanDetail.getWmStorageAreaName()); // 库位名称
|
||||
hashMap.put("detailStatus", wmsOutPlanDetail.getDetailState()); // 明细状态
|
||||
/* 来自台账明细 */
|
||||
hashMap.put("itemId", mdItem.getItemId()); // 物料ID
|
||||
hashMap.put("itemName", mdItem.getItemName()); // 物料名称
|
||||
hashMap.put("itemCode", mdItem.getItemCode()); // 物料编码
|
||||
/* 实体 */
|
||||
String outTime = null;
|
||||
if (nowWmsOutPlanDetailEntity.getCreateTime() != null)
|
||||
outTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(nowWmsOutPlanDetailEntity.getCreateTime());
|
||||
hashMap.put("outTime", outTime); // 出库时间
|
||||
hashMapList.add(hashMap);
|
||||
});
|
||||
return hashMapList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增出库计划明细信息
|
||||
*
|
||||
|
@ -1,31 +1,24 @@
|
||||
package com.ktg.mes.wm.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.ktg.common.constant.UserConstants;
|
||||
import com.ktg.mes.wm.service.IWmStorageAreaService;
|
||||
import com.ktg.mes.wm.service.IWmStorageLocationService;
|
||||
import com.ktg.mes.wm.utils.WmBarCodeUtil;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
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.ktg.common.annotation.Log;
|
||||
import com.ktg.common.constant.UserConstants;
|
||||
import com.ktg.common.core.controller.BaseController;
|
||||
import com.ktg.common.core.domain.AjaxResult;
|
||||
import com.ktg.common.enums.BusinessType;
|
||||
import com.ktg.mes.wm.domain.WmWarehouse;
|
||||
import com.ktg.mes.wm.service.IWmWarehouseService;
|
||||
import com.ktg.common.utils.poi.ExcelUtil;
|
||||
import com.ktg.common.core.page.TableDataInfo;
|
||||
import com.ktg.common.enums.BusinessType;
|
||||
import com.ktg.common.utils.poi.ExcelUtil;
|
||||
import com.ktg.mes.wm.domain.WmWarehouse;
|
||||
import com.ktg.mes.wm.service.IWmStorageAreaService;
|
||||
import com.ktg.mes.wm.service.IWmStorageLocationService;
|
||||
import com.ktg.mes.wm.service.IWmWarehouseService;
|
||||
import com.ktg.mes.wm.utils.WmBarCodeUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 仓库设置Controller
|
||||
@ -133,9 +126,6 @@ public class WmWarehouseController extends BaseController
|
||||
@DeleteMapping("/{warehouseIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] warehouseIds)
|
||||
{
|
||||
|
||||
//TODO:仓库删除之前的逻辑校验
|
||||
|
||||
for (Long wahouseId: warehouseIds
|
||||
) {
|
||||
wmStorageLocationService.deleteByWarehouseId(wahouseId);
|
||||
|
@ -43,13 +43,6 @@ public class WmsInTaskController extends BaseController {
|
||||
@Autowired
|
||||
private IWmStorageAreaService wmStorageAreaService;
|
||||
|
||||
@GetMapping("/open/list")
|
||||
public TableDataInfo openList(WmsInTask wmsInTask) {
|
||||
startPage();
|
||||
List<WmsInTask> list = wmsInTaskService.selectWmsInTaskList(wmsInTask);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询入库任务列表
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user