add:增加物料分区功能;
This commit is contained in:
@@ -60,6 +60,14 @@ public class MaterialbaseController {
|
|||||||
return new ResponseEntity<>(TableDataInfo.build(),HttpStatus.OK);
|
return new ResponseEntity<>(TableDataInfo.build(),HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/excelImport1")
|
||||||
|
public ResponseEntity<Object> excelImport1(@RequestParam("file") MultipartFile file, HttpServletRequest request, HttpServletResponse response) {
|
||||||
|
RedissonUtils.lock(() -> {
|
||||||
|
iMdMeMaterialbaseService.excelImport1(file, request, response);
|
||||||
|
}, "分区信息导入", null);
|
||||||
|
return new ResponseEntity<>(TableDataInfo.build(),HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
@PutMapping
|
@PutMapping
|
||||||
@Log("修改物料")
|
@Log("修改物料")
|
||||||
public ResponseEntity<Object> update(@Validated @RequestBody MdMeMaterialbase dto) {
|
public ResponseEntity<Object> update(@Validated @RequestBody MdMeMaterialbase dto) {
|
||||||
|
|||||||
@@ -42,6 +42,15 @@ public interface IMdMeMaterialbaseService extends IService<MdMeMaterialbase> {
|
|||||||
*/
|
*/
|
||||||
void excelImport(MultipartFile file, HttpServletRequest request, HttpServletResponse response);
|
void excelImport(MultipartFile file, HttpServletRequest request, HttpServletResponse response);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导入分区信息
|
||||||
|
* @param file
|
||||||
|
* @param request
|
||||||
|
* @param response
|
||||||
|
*/
|
||||||
|
void excelImport1(MultipartFile file, HttpServletRequest request, HttpServletResponse response);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改物料
|
* 修改物料
|
||||||
* @param dto 物料实体类
|
* @param dto 物料实体类
|
||||||
|
|||||||
@@ -179,6 +179,10 @@ public class MdMeMaterialbase implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private String ext_id;
|
private String ext_id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户id
|
||||||
|
*/
|
||||||
|
private String user_id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 外部标识
|
* 外部标识
|
||||||
|
|||||||
@@ -300,6 +300,11 @@ public class Structattr implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private String ext_id;
|
private String ext_id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户id
|
||||||
|
*/
|
||||||
|
private String user_id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 备注
|
* 备注
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -53,6 +53,19 @@ public class StrategyStructParam {
|
|||||||
*/
|
*/
|
||||||
private String ext_type;
|
private String ext_type;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 特殊物料标识
|
||||||
|
*/
|
||||||
|
private String ext_id;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户ID
|
||||||
|
*/
|
||||||
|
private String user_id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 出入库类型
|
* 出入库类型
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -18,6 +18,8 @@ import org.nl.common.domain.query.PageQuery;
|
|||||||
import org.nl.common.exception.BadRequestException;
|
import org.nl.common.exception.BadRequestException;
|
||||||
import org.nl.common.utils.IdUtil;
|
import org.nl.common.utils.IdUtil;
|
||||||
import org.nl.common.utils.SecurityUtils;
|
import org.nl.common.utils.SecurityUtils;
|
||||||
|
import org.nl.system.service.user.ISysUserService;
|
||||||
|
import org.nl.system.service.user.dao.SysUser;
|
||||||
import org.nl.wms.basedata_manage.service.IMdMeMaterialbaseService;
|
import org.nl.wms.basedata_manage.service.IMdMeMaterialbaseService;
|
||||||
import org.nl.wms.basedata_manage.service.IMdPbStoragevehicleinfoService;
|
import org.nl.wms.basedata_manage.service.IMdPbStoragevehicleinfoService;
|
||||||
import org.nl.wms.basedata_manage.service.IStructattrService;
|
import org.nl.wms.basedata_manage.service.IStructattrService;
|
||||||
@@ -69,6 +71,13 @@ public class MdMeMaterialbaseServiceImpl extends ServiceImpl<MdMeMaterialbaseMap
|
|||||||
@Autowired
|
@Autowired
|
||||||
private PdaIosInService pdaIosInService;
|
private PdaIosInService pdaIosInService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户服务
|
||||||
|
*/
|
||||||
|
@Autowired
|
||||||
|
private ISysUserService iSysUserService;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* wms调用erp服务
|
* wms调用erp服务
|
||||||
*/
|
*/
|
||||||
@@ -333,6 +342,105 @@ public class MdMeMaterialbaseServiceImpl extends ServiceImpl<MdMeMaterialbaseMap
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分区信息导入
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void excelImport1(MultipartFile file, HttpServletRequest request, HttpServletResponse response) {
|
||||||
|
Integer in = 1;
|
||||||
|
try {
|
||||||
|
String currentUserId = SecurityUtils.getCurrentUserId();
|
||||||
|
String nickName = SecurityUtils.getCurrentNickName();
|
||||||
|
String now = DateUtil.now();
|
||||||
|
InputStream inputStream = file.getInputStream();
|
||||||
|
ExcelReader excelReader = ExcelUtil.getReader(inputStream);
|
||||||
|
List<List<Object>> read = excelReader.read();
|
||||||
|
if (read.size() > 1) {
|
||||||
|
for (int i = 1; i < read.size(); i++) {
|
||||||
|
in = i;
|
||||||
|
if (i == 12) {
|
||||||
|
int a = 0;
|
||||||
|
}
|
||||||
|
List<Object> list = read.get(i);
|
||||||
|
if (list.size() < 2) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (ObjectUtil.isEmpty(list.get(1))) {
|
||||||
|
throw new BadRequestException("第" + i + "行,库位号不能为空,请检查。");
|
||||||
|
}
|
||||||
|
//库位编码
|
||||||
|
String m1 = String.valueOf(list.get(0)).trim();
|
||||||
|
if (ObjectUtil.isNotEmpty(m1)) {
|
||||||
|
if (m1.contains("L")) {
|
||||||
|
Structattr structattr = iStructattrService.getOne(
|
||||||
|
new QueryWrapper<Structattr>().lambda()
|
||||||
|
.eq(Structattr::getStruct_code, m1)
|
||||||
|
);
|
||||||
|
if (ObjectUtil.isEmpty(structattr)) {
|
||||||
|
throw new BadRequestException("第" + i + "行,库位编号不存在【" + m1 + "】,请检查。");
|
||||||
|
}
|
||||||
|
//用户账号
|
||||||
|
String m2 = String.valueOf(list.get(1)).trim();
|
||||||
|
if (ObjectUtil.isNotEmpty(m2)) {
|
||||||
|
List<SysUser> sysUserList = iSysUserService.list(
|
||||||
|
new QueryWrapper<SysUser>().lambda()
|
||||||
|
.eq(SysUser::getUsername, m2)
|
||||||
|
);
|
||||||
|
if (ObjectUtil.isNotEmpty(sysUserList)) {
|
||||||
|
iStructattrService.update(new LambdaUpdateWrapper<>(Structattr.class)
|
||||||
|
.set(Structattr::getUser_id, sysUserList.get(0).getUser_id())
|
||||||
|
.set(Structattr::getUpdate_optid, currentUserId)
|
||||||
|
.set(Structattr::getUpdate_optname, nickName)
|
||||||
|
.set(Structattr::getUpdate_time, now)
|
||||||
|
.set(Structattr::getIs_used, 1)
|
||||||
|
.eq(Structattr::getStruct_code, m1));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
//物料编码
|
||||||
|
String m3 = String.valueOf(list.get(2)).trim();
|
||||||
|
if (ObjectUtil.isNotEmpty(m3)) {
|
||||||
|
MdMeMaterialbase mdMeMaterialbase = this.baseMapper.selectOne(
|
||||||
|
new QueryWrapper<MdMeMaterialbase>().lambda()
|
||||||
|
.eq(MdMeMaterialbase::getMaterial_code, m3)
|
||||||
|
);
|
||||||
|
if (ObjectUtil.isEmpty(mdMeMaterialbase)) {
|
||||||
|
throw new BadRequestException("第" + i + "行,物料编码不存在【" + m3 + "】,请检查。");
|
||||||
|
}
|
||||||
|
//用户账号
|
||||||
|
String m4 = String.valueOf(list.get(3)).trim();
|
||||||
|
//用户账号
|
||||||
|
if (ObjectUtil.isNotEmpty(m4)) {
|
||||||
|
List<SysUser> sysUserList = iSysUserService.list(
|
||||||
|
new QueryWrapper<SysUser>().lambda()
|
||||||
|
.eq(SysUser::getUsername, m4)
|
||||||
|
);
|
||||||
|
if (ObjectUtil.isNotEmpty(sysUserList)) {
|
||||||
|
// 直接使用 update 方法,传入包装器
|
||||||
|
this.baseMapper.update(
|
||||||
|
null,
|
||||||
|
new LambdaUpdateWrapper<MdMeMaterialbase>()
|
||||||
|
.set(MdMeMaterialbase::getUser_id, sysUserList.get(0).getUser_id())
|
||||||
|
.set(MdMeMaterialbase::getUpdate_optid, currentUserId)
|
||||||
|
.set(MdMeMaterialbase::getUpdate_optname, nickName)
|
||||||
|
.set(MdMeMaterialbase::getUpdate_time, now)
|
||||||
|
.set(MdMeMaterialbase::getIs_used, 1)
|
||||||
|
.eq(MdMeMaterialbase::getMaterial_id, mdMeMaterialbase.getMaterial_id())
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (Exception ex) {
|
||||||
|
throw new BadRequestException("导入失败" + ex.getMessage() + ":" + in);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 仓库导入
|
* 仓库导入
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -2,22 +2,20 @@ package org.nl.wms.basedata_manage.service.impl;
|
|||||||
|
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.alibaba.fastjson.JSONArray;
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.nl.common.domain.query.PageQuery;
|
import org.nl.common.domain.query.PageQuery;
|
||||||
import org.nl.common.exception.BadRequestException;
|
import org.nl.common.exception.BadRequestException;
|
||||||
import org.nl.common.utils.IdUtil;
|
import org.nl.common.utils.IdUtil;
|
||||||
import org.nl.common.utils.MapOf;
|
|
||||||
import org.nl.common.utils.SecurityUtils;
|
import org.nl.common.utils.SecurityUtils;
|
||||||
import org.nl.config.SpringContextHolder;
|
import org.nl.config.SpringContextHolder;
|
||||||
import org.nl.wms.basedata_manage.enums.BaseDataEnum;
|
import org.nl.wms.basedata_manage.enums.BaseDataEnum;
|
||||||
@@ -42,7 +40,6 @@ import org.nl.wms.warehouse_management.record.service.IStIvtStructivtflowService
|
|||||||
import org.nl.wms.warehouse_management.record.service.dao.StIvtStructivtflow;
|
import org.nl.wms.warehouse_management.record.service.dao.StIvtStructivtflow;
|
||||||
import org.nl.wms.warehouse_management.service.IMdPbGroupplateService;
|
import org.nl.wms.warehouse_management.service.IMdPbGroupplateService;
|
||||||
import org.nl.wms.warehouse_management.service.dao.GroupPlate;
|
import org.nl.wms.warehouse_management.service.dao.GroupPlate;
|
||||||
import org.nl.wms.warehouse_management.service.dao.IOStorInv;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
@@ -52,10 +49,8 @@ import org.springframework.util.CollectionUtils;
|
|||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.function.Consumer;
|
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -374,24 +369,34 @@ public class StructattrServiceImpl extends ServiceImpl<StructattrMapper, Structa
|
|||||||
.eq(StSectStrategy::getSect_code, param.getSect_code())
|
.eq(StSectStrategy::getSect_code, param.getSect_code())
|
||||||
.eq(StSectStrategy::getStrategy_type, StatusEnum.STRATEGY_TYPE.code("入库")));
|
.eq(StSectStrategy::getStrategy_type, StatusEnum.STRATEGY_TYPE.code("入库")));
|
||||||
if (one==null){
|
if (one==null){
|
||||||
throw new BadRequestException("当前库区"+param.getSect_code()+"未配置入库规则");
|
throw new BadRequestException("当前库区" + param.getSect_code() + "未配置入库规则");
|
||||||
}
|
}
|
||||||
List<String> strategy = one.getStrategy();
|
List<String> strategy = one.getStrategy();
|
||||||
Map<String, Decisioner> decisionerMap = SpringContextHolder.getBeansOfType(Decisioner.class);
|
Map<String, Decisioner> decisionerMap = SpringContextHolder.getBeansOfType(Decisioner.class);
|
||||||
QueryWrapper<Structattr> query = new QueryWrapper<Structattr>()
|
QueryWrapper<Structattr> query = new QueryWrapper<Structattr>()
|
||||||
.eq("is_used", true)
|
.eq("is_used", true)
|
||||||
.eq("lock_type",IOSEnum.LOCK_TYPE.code("未锁定"))
|
.eq("lock_type", IOSEnum.LOCK_TYPE.code("未锁定"))
|
||||||
.eq("stor_code", param.getStor_code())
|
.eq("stor_code", param.getStor_code())
|
||||||
.eq("sect_code", param.getSect_code())
|
.eq("sect_code", param.getSect_code())
|
||||||
.isNull("storagevehicle_code");
|
.isNull("storagevehicle_code");
|
||||||
|
if (StringUtils.isNotBlank(param.getExt_id())) {
|
||||||
|
query.eq("ext_id", param.getExt_id());
|
||||||
|
} else {
|
||||||
|
query.eq("ext_id", 0);
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(param.getUser_id())) {
|
||||||
|
query.eq("user_id", param.getUser_id());
|
||||||
|
} else {
|
||||||
|
query.eq("user_id", 0);
|
||||||
|
}
|
||||||
List<Structattr> list = this.list(query);
|
List<Structattr> list = this.list(query);
|
||||||
for (String decisionerType : strategy) {
|
for (String decisionerType : strategy) {
|
||||||
Decisioner decisioner = decisionerMap.get(decisionerType);
|
Decisioner decisioner = decisionerMap.get(decisionerType);
|
||||||
log.info("执行入库规格:"+decisioner.strategyConfig.getStrategy_name());
|
log.info("执行入库规格:" + decisioner.strategyConfig.getStrategy_name());
|
||||||
JSONObject params = (JSONObject) JSON.toJSON(param);
|
JSONObject params = (JSONObject) JSON.toJSON(param);
|
||||||
list = decisioner.handler(list, params);
|
list = decisioner.handler(list, params);
|
||||||
if (CollectionUtils.isEmpty(list)){
|
if (CollectionUtils.isEmpty(list)) {
|
||||||
throw new BadRequestException("当前策略"+decisioner.strategyConfig.getStrategy_name()+"无可用货位,分配前数量:"+list.size());
|
throw new BadRequestException("当前策略" + decisioner.strategyConfig.getStrategy_name() + "无可用货位,分配前数量:" + list.size());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
|
|||||||
@@ -261,6 +261,16 @@ public class PdaIosInServiceImpl implements PdaIosInService {
|
|||||||
if (qtyIsEmpty) {
|
if (qtyIsEmpty) {
|
||||||
throw new BadRequestException("物料数量不能为空");
|
throw new BadRequestException("物料数量不能为空");
|
||||||
}
|
}
|
||||||
|
if (vehicleCode.contains("LX")) {
|
||||||
|
// 校验物料归属
|
||||||
|
MdMeMaterialbase materInfo = iMdMeMaterialbaseService.getByCode(dataArray.getJSONObject(0).getString("material_id"));
|
||||||
|
if (ObjectUtil.isEmpty(materInfo)) {
|
||||||
|
throw new BadRequestException("物料信息错误:" + dataArray.getJSONObject(0).getString("material_id"));
|
||||||
|
}
|
||||||
|
if (!materInfo.getUser_id().equals(SecurityUtils.getCurrentUserId())) {
|
||||||
|
throw new BadRequestException("该物料:" + materInfo.getMaterial_name() + "不属于管理员:" + SecurityUtils.getCurrentNickName() + "管理范畴,请勿组盘!");
|
||||||
|
}
|
||||||
|
}
|
||||||
if (StringUtils.isBlank(whereJson.getString("nonClear"))) {
|
if (StringUtils.isBlank(whereJson.getString("nonClear"))) {
|
||||||
// 判断该载具是否存在组盘信息(出库前清理)
|
// 判断该载具是否存在组盘信息(出库前清理)
|
||||||
List<GroupPlate> groupPlateList = iMdPbGroupplateService.list(
|
List<GroupPlate> groupPlateList = iMdPbGroupplateService.list(
|
||||||
@@ -531,6 +541,8 @@ public class PdaIosInServiceImpl implements PdaIosInService {
|
|||||||
params.put("material_code", whereJson.getString("material_code"));
|
params.put("material_code", whereJson.getString("material_code"));
|
||||||
params.put("qty", whereJson.getString("qty"));
|
params.put("qty", whereJson.getString("qty"));
|
||||||
params.put("pcsn", whereJson.getString("pcsn"));
|
params.put("pcsn", whereJson.getString("pcsn"));
|
||||||
|
params.put("ext_id", whereJson.getString("ext_id"));
|
||||||
|
params.put("user_id", whereJson.getString("ext_id"));
|
||||||
Structattr attrDao = iRawAssistIStorService.getStructattr(params);
|
Structattr attrDao = iRawAssistIStorService.getStructattr(params);
|
||||||
//确定起点
|
//确定起点
|
||||||
SchBasePoint schBasePoint = iSchBasePointService.getOne(new LambdaQueryWrapper<SchBasePoint>().eq(SchBasePoint::getPoint_code, whereJson.getString("site_code")));
|
SchBasePoint schBasePoint = iSchBasePointService.getOne(new LambdaQueryWrapper<SchBasePoint>().eq(SchBasePoint::getPoint_code, whereJson.getString("site_code")));
|
||||||
@@ -590,7 +602,28 @@ public class PdaIosInServiceImpl implements PdaIosInService {
|
|||||||
String iostorinvId = iRawAssistIStorService.insertDtl(jsonMst);
|
String iostorinvId = iRawAssistIStorService.insertDtl(jsonMst);
|
||||||
// 预组织出入库单据明细的分配数据
|
// 预组织出入库单据明细的分配数据
|
||||||
whereJson.put("iostorinv_id", iostorinvId);
|
whereJson.put("iostorinv_id", iostorinvId);
|
||||||
JSONObject jsonDtl = organizeDivData(whereJson);
|
JSONObject jsonDtl = organizeDivData(whereJson);
|
||||||
|
if (!"CTU".equals(whereJson.getString("stor_code"))) {
|
||||||
|
//更新组盘表状态
|
||||||
|
mdPbGroupplateMapper.update(new GroupPlate(), new LambdaUpdateWrapper<GroupPlate>()
|
||||||
|
.set(GroupPlate::getStatus, IOSEnum.GROUP_PLATE_STATUS.code("组盘"))
|
||||||
|
.eq(GroupPlate::getStoragevehicle_code, whereJson.getString("vehicle_code"))
|
||||||
|
.eq(GroupPlate::getStatus, IOSEnum.GROUP_PLATE_STATUS.code("出库")));
|
||||||
|
} else {
|
||||||
|
//判断是否特殊物料
|
||||||
|
List<GroupPlate> groupPlateList = iMdPbGroupplateService.list(
|
||||||
|
new LambdaQueryWrapper<GroupPlate>()
|
||||||
|
.eq(GroupPlate::getStoragevehicle_code, whereJson.getString("vehicle_code"))
|
||||||
|
.gt(GroupPlate::getQty, 0).eq(GroupPlate::getStatus, IOSEnum.GROUP_PLATE_STATUS.code("组盘"))
|
||||||
|
);
|
||||||
|
if (CollectionUtils.isEmpty(groupPlateList)) {
|
||||||
|
throw new BadRequestException("此载具:" + whereJson.getString("vehicle_code") + "组盘信息不存在,请检查!");
|
||||||
|
}
|
||||||
|
// 校验物料信息
|
||||||
|
MdMeMaterialbase materDao = iMdMeMaterialbaseService.getById(groupPlateList.get(0).getMaterial_id());
|
||||||
|
jsonDtl.put("ext_id", materDao.getExt_id());
|
||||||
|
jsonDtl.put("user_id",SecurityUtils.getCurrentUserId());
|
||||||
|
}
|
||||||
// 调用分配,默认自动分配库位
|
// 调用分配,默认自动分配库位
|
||||||
iRawAssistIStorService.divStruct(jsonDtl);
|
iRawAssistIStorService.divStruct(jsonDtl);
|
||||||
// 下发任务
|
// 下发任务
|
||||||
@@ -612,13 +645,7 @@ public class PdaIosInServiceImpl implements PdaIosInService {
|
|||||||
});
|
});
|
||||||
taskJson.put("tableMater", tableMater);
|
taskJson.put("tableMater", tableMater);
|
||||||
iRawAssistIStorService.divPoint(taskJson);
|
iRawAssistIStorService.divPoint(taskJson);
|
||||||
if (!"CTU".equals(whereJson.getString("stor_code"))) {
|
|
||||||
//更新组盘表状态
|
|
||||||
mdPbGroupplateMapper.update(new GroupPlate(), new LambdaUpdateWrapper<GroupPlate>()
|
|
||||||
.set(GroupPlate::getStatus, IOSEnum.GROUP_PLATE_STATUS.code("组盘"))
|
|
||||||
.eq(GroupPlate::getStoragevehicle_code, whereJson.getString("storagevehicle_code"))
|
|
||||||
.eq(GroupPlate::getStatus, IOSEnum.GROUP_PLATE_STATUS.code("出库")));
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
//空载具入库
|
//空载具入库
|
||||||
whereJson.put("qty", 1);
|
whereJson.put("qty", 1);
|
||||||
|
|||||||
@@ -454,6 +454,8 @@ public class RawAssistIStorServiceImpl extends ServiceImpl<IOStorInvMapper, IOSt
|
|||||||
.material_code(param.getString("material_code"))
|
.material_code(param.getString("material_code"))
|
||||||
.qty(new BigDecimal(param.getString("qty")))
|
.qty(new BigDecimal(param.getString("qty")))
|
||||||
.pcsn(param.getString("pcsn"))
|
.pcsn(param.getString("pcsn"))
|
||||||
|
.ext_id(param.getString("ext_id"))
|
||||||
|
.user_id(param.getString("user_id"))
|
||||||
.build());
|
.build());
|
||||||
if (CollectionUtils.isEmpty(structattrs)) {
|
if (CollectionUtils.isEmpty(structattrs)) {
|
||||||
throw new BadRequestException("无可用货位");
|
throw new BadRequestException("无可用货位");
|
||||||
|
|||||||
@@ -117,6 +117,7 @@
|
|||||||
<el-table-column prop="material_name" label="物料名称" width="180" show-overflow-tooltip />
|
<el-table-column prop="material_name" label="物料名称" width="180" show-overflow-tooltip />
|
||||||
<el-table-column prop="material_spec" show-overflow-tooltip show-tooltip-when-overflow :min-width="flexWidth('material_spec',crud.data,'物料规格')" label="物料规格" />
|
<el-table-column prop="material_spec" show-overflow-tooltip show-tooltip-when-overflow :min-width="flexWidth('material_spec',crud.data,'物料规格')" label="物料规格" />
|
||||||
<el-table-column prop="material_model" label="物料型号" />
|
<el-table-column prop="material_model" label="物料型号" />
|
||||||
|
<el-table-column prop="ext_id" label="外部标识" />
|
||||||
<!-- <el-table-column prop="class_name" label="物料分类" width="140"/>-->
|
<!-- <el-table-column prop="class_name" label="物料分类" width="140"/>-->
|
||||||
<!-- <el-table-column prop="unit_name" label="计量单位"/>-->
|
<!-- <el-table-column prop="unit_name" label="计量单位"/>-->
|
||||||
<!-- <el-table-column prop="standing_time" label="静置时间(分钟)" width="130px"/>-->
|
<!-- <el-table-column prop="standing_time" label="静置时间(分钟)" width="130px"/>-->
|
||||||
@@ -195,7 +196,6 @@ const defaultForm = {
|
|||||||
is_used_time: null,
|
is_used_time: null,
|
||||||
is_used: null,
|
is_used: null,
|
||||||
is_delete: null,
|
is_delete: null,
|
||||||
ext_id: 'YZHJ',
|
|
||||||
material_height_type: null,
|
material_height_type: null,
|
||||||
product_series: null
|
product_series: null
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -62,5 +62,12 @@ export function excelImport(data) {
|
|||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
export function excelImport1(data) {
|
||||||
|
return request({
|
||||||
|
url: '/api/Materia/excelImport1',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
export default { add, edit, del, getMaterOptType, isAlongMaterType, getProductSeries, materialSync, excelImport }
|
export default { add, edit, del, getMaterOptType, isAlongMaterType, getProductSeries, materialSync, excelImport, excelImport1 }
|
||||||
|
|||||||
@@ -363,13 +363,15 @@
|
|||||||
:min-width="flexWidth('ing_task_code',crud.data,'在执行的任务标识')"
|
:min-width="flexWidth('ing_task_code',crud.data,'在执行的任务标识')"
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="is_has _workder"
|
prop="is_has_workder"
|
||||||
label="是否有工单"
|
label="是否有工单"
|
||||||
:min-width="flexWidth('is_has_workder',crud.data,'是否有工单')"
|
:min-width="flexWidth('is_has_workder',crud.data,'是否有工单')"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.is_has_workder ? '是' : '否' }}
|
{{ scope.row.is_has_workder ? '是' : '否' }}
|
||||||
</template>
|
</template>2
|
||||||
|
|
||||||
|
..
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- <el-table-column prop="is_auto" label="是否自动" :min-width="flexWidth('is_auto',crud.data,'是否自动')">-->
|
<!-- <el-table-column prop="is_auto" label="是否自动" :min-width="flexWidth('is_auto',crud.data,'是否自动')">-->
|
||||||
<!-- <template slot-scope="scope">-->
|
<!-- <template slot-scope="scope">-->
|
||||||
|
|||||||
@@ -77,9 +77,20 @@
|
|||||||
>
|
>
|
||||||
库存导入
|
库存导入
|
||||||
</el-button>
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
slot="right"
|
||||||
|
class="filter-item"
|
||||||
|
type="warning"
|
||||||
|
icon="el-icon-upload2"
|
||||||
|
size="mini"
|
||||||
|
@click="uploadShow1 = true"
|
||||||
|
>
|
||||||
|
分区信息导入
|
||||||
|
</el-button>
|
||||||
</crudOperation>
|
</crudOperation>
|
||||||
<!--表格渲染-->
|
<!--表格渲染-->
|
||||||
<UploadDialog :dialog-show.sync="uploadShow" @tableChanged3="crud.toQuery()" />
|
<UploadDialog :dialog-show.sync="uploadShow" @tableChanged3="crud.toQuery()" />
|
||||||
|
<UploadDialog1 :dialog-show.sync="uploadShow1" @tableChanged1="crud.toQuery()" />
|
||||||
<el-table
|
<el-table
|
||||||
ref="table"
|
ref="table"
|
||||||
v-loading="crud.loading"
|
v-loading="crud.loading"
|
||||||
@@ -123,11 +134,12 @@ import crudSectattr from '@/views/wms/basedata/sectattr/sectattr'
|
|||||||
import { download } from '@/api/data'
|
import { download } from '@/api/data'
|
||||||
import { downloadFile } from '@/utils'
|
import { downloadFile } from '@/utils'
|
||||||
import UploadDialog from '@/views/wms/basedata/material/UploadDialog.vue'
|
import UploadDialog from '@/views/wms/basedata/material/UploadDialog.vue'
|
||||||
|
import UploadDialog1 from '@/views/wms/basedata/material/UploadDialog1.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Structivt',
|
name: 'Structivt',
|
||||||
dicts: ['d_lock_type'],
|
dicts: ['d_lock_type'],
|
||||||
components: { UploadDialog, pagination, crudOperation, rrOperation },
|
components: { UploadDialog, UploadDialog1, pagination, crudOperation, rrOperation },
|
||||||
mixins: [presenter(), header(), crud()],
|
mixins: [presenter(), header(), crud()],
|
||||||
cruds() {
|
cruds() {
|
||||||
return CRUD({
|
return CRUD({
|
||||||
@@ -146,6 +158,7 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
uploadShow: false,
|
uploadShow: false,
|
||||||
|
uploadShow1: false,
|
||||||
sects: [],
|
sects: [],
|
||||||
permission: {},
|
permission: {},
|
||||||
rules: {}
|
rules: {}
|
||||||
|
|||||||
Reference in New Issue
Block a user