opt:出库分配优化;
This commit is contained in:
@@ -260,9 +260,8 @@
|
|||||||
|
|
||||||
<if test="params.struct_code != null and params.struct_code != ''">
|
<if test="params.struct_code != null and params.struct_code != ''">
|
||||||
AND
|
AND
|
||||||
(attr.struct_code LIKE CONCAT('%', #{params.struct_code}, '%')
|
(attr.struct_code LIKE CONCAT('%', #{params.struct_code}, '%'))
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
<if test="params.pcsn != null and params.pcsn != ''">
|
<if test="params.pcsn != null and params.pcsn != ''">
|
||||||
AND
|
AND
|
||||||
ext.pcsn LIKE #{params.pcsn}
|
ext.pcsn LIKE #{params.pcsn}
|
||||||
|
|||||||
@@ -3,16 +3,12 @@ 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 cn.hutool.core.util.StrUtil;
|
||||||
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.update.LambdaUpdateWrapper;
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
||||||
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 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;
|
||||||
@@ -26,15 +22,10 @@ import org.nl.wms.basedata_manage.service.dao.BsrealStorattrDto;
|
|||||||
import org.nl.wms.basedata_manage.service.dao.Sectattr;
|
import org.nl.wms.basedata_manage.service.dao.Sectattr;
|
||||||
import org.nl.wms.basedata_manage.service.dao.Structattr;
|
import org.nl.wms.basedata_manage.service.dao.Structattr;
|
||||||
import org.nl.wms.basedata_manage.service.dao.mapper.BsrealStorattrMapper;
|
import org.nl.wms.basedata_manage.service.dao.mapper.BsrealStorattrMapper;
|
||||||
import org.nl.wms.basedata_manage.service.dao.mapper.SectattrMapper;
|
|
||||||
import org.nl.wms.basedata_manage.service.dao.mapper.StructattrMapper;
|
|
||||||
import org.springframework.data.domain.Pageable;
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@@ -85,8 +76,10 @@ public class BsrealStorattrServiceImpl extends ServiceImpl<BsrealStorattrMapper,
|
|||||||
@Override
|
@Override
|
||||||
public BsrealStorattr findByCode(String code) {
|
public BsrealStorattr findByCode(String code) {
|
||||||
LambdaQueryWrapper<BsrealStorattr> queryWrapper = new LambdaQueryWrapper<>(BsrealStorattr.class)
|
LambdaQueryWrapper<BsrealStorattr> queryWrapper = new LambdaQueryWrapper<>(BsrealStorattr.class)
|
||||||
.eq(BsrealStorattr::getStor_code, code)
|
.eq(BsrealStorattr::getIs_delete, BaseDataEnum.IS_YES_NOT.code("否"))
|
||||||
.eq(BsrealStorattr::getIs_delete, BaseDataEnum.IS_YES_NOT.code("否"));
|
.and(r -> r.eq(BsrealStorattr::getStor_code, code)
|
||||||
|
.or()
|
||||||
|
.eq(BsrealStorattr::getStor_id, code));
|
||||||
return bsrealStorattrMapper.selectOne(queryWrapper);
|
return bsrealStorattrMapper.selectOne(queryWrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -130,6 +130,9 @@ public class MdMeMaterialbaseServiceImpl extends ServiceImpl<MdMeMaterialbaseMap
|
|||||||
this.save(dto);
|
this.save(dto);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物料导入
|
||||||
|
*/
|
||||||
//@Override
|
//@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
public void excelImport99(MultipartFile file, HttpServletRequest request, HttpServletResponse response) {
|
public void excelImport99(MultipartFile file, HttpServletRequest request, HttpServletResponse response) {
|
||||||
@@ -179,7 +182,7 @@ public class MdMeMaterialbaseServiceImpl extends ServiceImpl<MdMeMaterialbaseMap
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 仓库导入
|
* 库存导入
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
@@ -194,7 +197,7 @@ public class MdMeMaterialbaseServiceImpl extends ServiceImpl<MdMeMaterialbaseMap
|
|||||||
if (read.size() > 1) {
|
if (read.size() > 1) {
|
||||||
for (int i = 1; i < read.size(); i++) {
|
for (int i = 1; i < read.size(); i++) {
|
||||||
List<Object> list = read.get(i);
|
List<Object> list = read.get(i);
|
||||||
if (ObjectUtil.isEmpty(list.get(0)) || ObjectUtil.isEmpty(list.get(2)) || ObjectUtil.isEmpty(list.get(3)) || ObjectUtil.isEmpty(list.get(4))) {
|
if (ObjectUtil.isEmpty(list.get(1)) || ObjectUtil.isEmpty(list.get(4)) || ObjectUtil.isEmpty(list.get(5)) || ObjectUtil.isEmpty(list.get(6))) {
|
||||||
if (ObjectUtil.isEmpty(list.get(1))) {
|
if (ObjectUtil.isEmpty(list.get(1))) {
|
||||||
throw new BadRequestException("第" + i + "行,物料编码不能为空,请检查。");
|
throw new BadRequestException("第" + i + "行,物料编码不能为空,请检查。");
|
||||||
}
|
}
|
||||||
@@ -224,7 +227,7 @@ public class MdMeMaterialbaseServiceImpl extends ServiceImpl<MdMeMaterialbaseMap
|
|||||||
.eq(Structattr::getStruct_code, m2)
|
.eq(Structattr::getStruct_code, m2)
|
||||||
);
|
);
|
||||||
if (ObjectUtil.isEmpty(structattr)) {
|
if (ObjectUtil.isEmpty(structattr)) {
|
||||||
throw new BadRequestException("第" + i + "行,库位编号不存在【" + m1 + "】,请检查。");
|
throw new BadRequestException("第" + i + "行,库位编号不存在【" + m2 + "】,请检查。");
|
||||||
}
|
}
|
||||||
//托盘编号
|
//托盘编号
|
||||||
String m3 = String.valueOf(list.get(5)).trim();
|
String m3 = String.valueOf(list.get(5)).trim();
|
||||||
@@ -232,7 +235,7 @@ public class MdMeMaterialbaseServiceImpl extends ServiceImpl<MdMeMaterialbaseMap
|
|||||||
.eq(MdPbStoragevehicleinfo::getStoragevehicle_code, m3)
|
.eq(MdPbStoragevehicleinfo::getStoragevehicle_code, m3)
|
||||||
);
|
);
|
||||||
if (ObjectUtil.isEmpty(mdPbStoragevehicleinfo)) {
|
if (ObjectUtil.isEmpty(mdPbStoragevehicleinfo)) {
|
||||||
throw new BadRequestException("第" + i + "行,托盘编号不存在【" + m1 + "】,请检查。");
|
throw new BadRequestException("第" + i + "行,托盘编号不存在【" + m3 + "】,请检查。");
|
||||||
}
|
}
|
||||||
//物料数量
|
//物料数量
|
||||||
Integer m4 = Integer.parseInt(String.valueOf(list.get(6)).trim());
|
Integer m4 = Integer.parseInt(String.valueOf(list.get(6)).trim());
|
||||||
@@ -246,6 +249,14 @@ public class MdMeMaterialbaseServiceImpl extends ServiceImpl<MdMeMaterialbaseMap
|
|||||||
whereJson.put("groupStatus", "02");
|
whereJson.put("groupStatus", "02");
|
||||||
whereJson.put("remark", "该库存通过仓库数据初始化进行仓库盘点,手动导入库存。");
|
whereJson.put("remark", "该库存通过仓库数据初始化进行仓库盘点,手动导入库存。");
|
||||||
pdaIosInService.groupPlate(whereJson);
|
pdaIosInService.groupPlate(whereJson);
|
||||||
|
//判断该载具编号是否已经存在库内
|
||||||
|
Structattr struct = iStructattrService.getOne(
|
||||||
|
new LambdaQueryWrapper<Structattr>()
|
||||||
|
.eq(Structattr::getStoragevehicle_code,m3)
|
||||||
|
);
|
||||||
|
if (struct!=null) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
iStructattrService.update(new LambdaUpdateWrapper<>(Structattr.class)
|
iStructattrService.update(new LambdaUpdateWrapper<>(Structattr.class)
|
||||||
.set(Structattr::getStoragevehicle_code, mdPbStoragevehicleinfo.getStoragevehicle_code())
|
.set(Structattr::getStoragevehicle_code, mdPbStoragevehicleinfo.getStoragevehicle_code())
|
||||||
.set(Structattr::getUpdate_optid, currentUserId)
|
.set(Structattr::getUpdate_optid, currentUserId)
|
||||||
@@ -264,6 +275,7 @@ public class MdMeMaterialbaseServiceImpl extends ServiceImpl<MdMeMaterialbaseMap
|
|||||||
* 仓库导入
|
* 仓库导入
|
||||||
*/
|
*/
|
||||||
@Transactional
|
@Transactional
|
||||||
|
//@Override
|
||||||
public void excelImport98(MultipartFile file, HttpServletRequest request, HttpServletResponse response) {
|
public void excelImport98(MultipartFile file, HttpServletRequest request, HttpServletResponse response) {
|
||||||
try {
|
try {
|
||||||
InputStream inputStream = file.getInputStream();
|
InputStream inputStream = file.getInputStream();
|
||||||
|
|||||||
@@ -107,11 +107,11 @@ public class PdaIosOutController {
|
|||||||
public ResponseEntity<Object> bindOrUnbind(@RequestBody JSONObject whereJson) {
|
public ResponseEntity<Object> bindOrUnbind(@RequestBody JSONObject whereJson) {
|
||||||
assertNotBlankJson(whereJson, "请求参数不能为空", "mode");
|
assertNotBlankJson(whereJson, "请求参数不能为空", "mode");
|
||||||
RedissonUtils.lock(() -> {
|
RedissonUtils.lock(() -> {
|
||||||
if (StringUtils.isBlank( whereJson.getString("siteCode"))&&StringUtils.isBlank( whereJson.getString("shelfCode"))) {
|
if (StringUtils.isBlank(whereJson.getString("siteCode"))&&StringUtils.isBlank( whereJson.getString("shelfCode"))) {
|
||||||
throw new BadRequestException("点位编号和载具编号需要扫其中一个,不能同时为空");
|
throw new BadRequestException("点位编号和载具编号需要扫其中一个,不能同时为空");
|
||||||
}
|
}
|
||||||
pdaIosOutService.bindOrUnbind(whereJson);
|
pdaIosOutService.bindOrUnbind(whereJson.getString("siteCode"), whereJson.getString("shelfCode"), whereJson.getString("mode"));
|
||||||
}, "bindOrUnbind" + whereJson.getString("siteCode") + whereJson.getString("shelfCode"), null);
|
}, "bindOrUnbind" , null);
|
||||||
return new ResponseEntity<>(PdaResponse.requestParamOk(whereJson), HttpStatus.OK);
|
return new ResponseEntity<>(PdaResponse.requestParamOk(whereJson), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -85,15 +85,12 @@ public interface PdaIosOutService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 货架与站点绑定或解绑
|
* 货架与站点绑定或解绑
|
||||||
*
|
* siteCode: 点位
|
||||||
* @param whereJson {
|
*shelfCode: 货架编号
|
||||||
* siteCode: 点位
|
*mode: 0解绑1绑定
|
||||||
* shelfCode: 货架编号
|
|
||||||
* mode: 0解绑1绑定
|
|
||||||
* }
|
|
||||||
* @return PdaResponse
|
* @return PdaResponse
|
||||||
*/
|
*/
|
||||||
PdaResponse bindOrUnbind(JSONObject whereJson);
|
PdaResponse bindOrUnbind(String siteCode, String shelfCode, String mode);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询物料列表
|
* 查询物料列表
|
||||||
|
|||||||
@@ -166,7 +166,7 @@ public class PdaIosInServiceImpl implements PdaIosInService {
|
|||||||
MdMeMaterialbase materDao = iMdMeMaterialbaseService.getByCode(materialId);
|
MdMeMaterialbase materDao = iMdMeMaterialbaseService.getByCode(materialId);
|
||||||
MdPbMeasureunit unitDao = iMdPbMeasureunitService.getById(materDao.getBase_unit_id());
|
MdPbMeasureunit unitDao = iMdPbMeasureunitService.getById(materDao.getBase_unit_id());
|
||||||
// 校验
|
// 校验
|
||||||
if (ObjectUtil.isEmpty(vehicleDao) || ObjectUtil.isEmpty(materDao) || ObjectUtil.isEmpty(materDao)) {
|
if (ObjectUtil.isEmpty(vehicleDao) || ObjectUtil.isEmpty(materDao) || ObjectUtil.isEmpty(unitDao)) {
|
||||||
throw new BadRequestException("载具,物料或单位信息有误!");
|
throw new BadRequestException("载具,物料或单位信息有误!");
|
||||||
}
|
}
|
||||||
whereJson.put("material_id", materDao.getMaterial_id());
|
whereJson.put("material_id", materDao.getMaterial_id());
|
||||||
@@ -177,16 +177,16 @@ public class PdaIosInServiceImpl implements PdaIosInService {
|
|||||||
List<GroupPlate> groupPlateList = iMdPbGroupplateService.list(
|
List<GroupPlate> groupPlateList = iMdPbGroupplateService.list(
|
||||||
new LambdaQueryWrapper<GroupPlate>()
|
new LambdaQueryWrapper<GroupPlate>()
|
||||||
.eq(GroupPlate::getStoragevehicle_code, vehicleDao.getStoragevehicle_code())
|
.eq(GroupPlate::getStoragevehicle_code, vehicleDao.getStoragevehicle_code())
|
||||||
.lt(GroupPlate::getStatus, GROUP_PLATE_STATUS.code("入库"))
|
.lt(GroupPlate::getStatus, IOSEnum.GROUP_PLATE_STATUS.code("出库"))
|
||||||
);
|
);
|
||||||
//判断该载具编号是否已经存在库内
|
//校验该载具编号是否已经存在库内
|
||||||
long count = iStructattrService.count(
|
// long count = iStructattrService.count(
|
||||||
new LambdaQueryWrapper<Structattr>()
|
// new LambdaQueryWrapper<Structattr>()
|
||||||
.eq(Structattr::getStoragevehicle_code, vehicleDao.getStoragevehicle_code())
|
// .eq(Structattr::getStoragevehicle_code, vehicleDao.getStoragevehicle_code())
|
||||||
);
|
// );
|
||||||
if (count > 0) {
|
// if (count > 0) {
|
||||||
throw new BadRequestException("载具编码:" + vehicleDao.getStoragevehicle_code() + "已存在库内,请对数据进行核实!");
|
// throw new BadRequestException("载具编码:" + vehicleDao.getStoragevehicle_code() + "已存在库内,请对数据进行核实!");
|
||||||
}
|
// }
|
||||||
if (ObjectUtils.isNotEmpty(groupPlateList)) {
|
if (ObjectUtils.isNotEmpty(groupPlateList)) {
|
||||||
//出库重新组盘
|
//出库重新组盘
|
||||||
mdPbGroupplateMapper.update(null, new LambdaUpdateWrapper<GroupPlate>()
|
mdPbGroupplateMapper.update(null, new LambdaUpdateWrapper<GroupPlate>()
|
||||||
@@ -206,7 +206,7 @@ public class PdaIosInServiceImpl implements PdaIosInService {
|
|||||||
.qty_unit_id(unitDao.getMeasure_unit_id())
|
.qty_unit_id(unitDao.getMeasure_unit_id())
|
||||||
.qty_unit_name(unitDao.getUnit_name())
|
.qty_unit_name(unitDao.getUnit_name())
|
||||||
.qty(new BigDecimal(qty))
|
.qty(new BigDecimal(qty))
|
||||||
.status(StringUtils.isBlank(whereJson.getString("groupStatus")) ? GROUP_PLATE_STATUS.code("组盘") : whereJson.getString("groupStatus"))
|
.status(StringUtils.isBlank(whereJson.getString("groupStatus")) ? IOSEnum.GROUP_PLATE_STATUS.code("组盘") : whereJson.getString("groupStatus"))
|
||||||
.ext_code(whereJson.getString("ext_code"))
|
.ext_code(whereJson.getString("ext_code"))
|
||||||
.create_id(SecurityUtils.getCurrentUserId())
|
.create_id(SecurityUtils.getCurrentUserId())
|
||||||
.create_name(SecurityUtils.getCurrentNickName())
|
.create_name(SecurityUtils.getCurrentNickName())
|
||||||
@@ -215,10 +215,9 @@ public class PdaIosInServiceImpl implements PdaIosInService {
|
|||||||
.build();
|
.build();
|
||||||
iMdPbGroupplateService.save(groupDao);
|
iMdPbGroupplateService.save(groupDao);
|
||||||
if (StringUtils.isNotBlank(whereJson.getString("siteCode"))) {
|
if (StringUtils.isNotBlank(whereJson.getString("siteCode"))) {
|
||||||
whereJson.put("shelfCode", whereJson.getString("vehicle_code"));
|
|
||||||
whereJson.put("mode", IOSEnum.BIND_OR_UNBIND.code("绑定"));
|
whereJson.put("mode", IOSEnum.BIND_OR_UNBIND.code("绑定"));
|
||||||
//确定点位则绑定
|
//确定点位则绑定
|
||||||
pdaIosOutService.bindOrUnbind(whereJson);
|
pdaIosOutService.bindOrUnbind(whereJson.getString("siteCode"), whereJson.getString("vehicle_code"), whereJson.getString("mode"));
|
||||||
}
|
}
|
||||||
return whereJson;
|
return whereJson;
|
||||||
}
|
}
|
||||||
@@ -312,7 +311,7 @@ public class PdaIosInServiceImpl implements PdaIosInService {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public PdaResponse getReturnMaterial(JSONObject whereJson) {
|
public PdaResponse getReturnMaterial(JSONObject whereJson) {
|
||||||
whereJson.put("status", GROUP_PLATE_STATUS.code("入库"));
|
whereJson.put("status", IOSEnum.GROUP_PLATE_STATUS.code("入库"));
|
||||||
whereJson.put("vehicleCode", whereJson.getString("search"));
|
whereJson.put("vehicleCode", whereJson.getString("search"));
|
||||||
whereJson.put("qty", 0);
|
whereJson.put("qty", 0);
|
||||||
List<JSONObject> list = mdPbGroupplateMapper.getVehicleMaterial(whereJson);
|
List<JSONObject> list = mdPbGroupplateMapper.getVehicleMaterial(whereJson);
|
||||||
@@ -511,7 +510,7 @@ public class PdaIosInServiceImpl implements PdaIosInService {
|
|||||||
.reduce(Double::sum).orElse(0.0);
|
.reduce(Double::sum).orElse(0.0);
|
||||||
// 组织主表数据
|
// 组织主表数据
|
||||||
Map<String, Object> jsonMst = new HashMap<>();
|
Map<String, Object> jsonMst = new HashMap<>();
|
||||||
jsonMst.put("stor_id", whereJson.getString("stor_id"));
|
jsonMst.put("stor_code", whereJson.getString("stor_code"));
|
||||||
jsonMst.put("bill_status", IOSEnum.BILL_STATUS.code("生成"));
|
jsonMst.put("bill_status", IOSEnum.BILL_STATUS.code("生成"));
|
||||||
jsonMst.put("total_qty", total_qty);
|
jsonMst.put("total_qty", total_qty);
|
||||||
jsonMst.put("detail_count", 1);
|
jsonMst.put("detail_count", 1);
|
||||||
|
|||||||
@@ -37,7 +37,6 @@ import org.nl.wms.sch_manage.service.ISchBaseTaskService;
|
|||||||
import org.nl.wms.sch_manage.service.dao.SchBasePoint;
|
import org.nl.wms.sch_manage.service.dao.SchBasePoint;
|
||||||
import org.nl.wms.sch_manage.service.dao.SchBaseTask;
|
import org.nl.wms.sch_manage.service.dao.SchBaseTask;
|
||||||
import org.nl.wms.sch_manage.service.util.AbstractTask;
|
import org.nl.wms.sch_manage.service.util.AbstractTask;
|
||||||
import org.nl.wms.sch_manage.service.util.tasks.StOutTask;
|
|
||||||
import org.nl.wms.warehouse_management.enums.IOSConstant;
|
import org.nl.wms.warehouse_management.enums.IOSConstant;
|
||||||
import org.nl.wms.warehouse_management.enums.IOSEnum;
|
import org.nl.wms.warehouse_management.enums.IOSEnum;
|
||||||
import org.nl.wms.warehouse_management.service.dao.GroupPlate;
|
import org.nl.wms.warehouse_management.service.dao.GroupPlate;
|
||||||
@@ -195,7 +194,7 @@ public class PdaIosOutServiceImpl implements PdaIosOutService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PdaResponse getVehicleMaterial(JSONObject whereJson) {
|
public PdaResponse getVehicleMaterial(JSONObject whereJson) {
|
||||||
List<JSONObject> list = new ArrayList<JSONObject>();
|
List<JSONObject> list = new ArrayList<>();
|
||||||
whereJson.put("status", GROUP_PLATE_STATUS.code("入库"));
|
whereJson.put("status", GROUP_PLATE_STATUS.code("入库"));
|
||||||
whereJson.put("vehicleCode", whereJson.getString("search"));
|
whereJson.put("vehicleCode", whereJson.getString("search"));
|
||||||
whereJson.put("qty", 0);
|
whereJson.put("qty", 0);
|
||||||
@@ -301,7 +300,8 @@ public class PdaIosOutServiceImpl implements PdaIosOutService {
|
|||||||
taskForm.put("point_code1", json.getString("struct_code"));
|
taskForm.put("point_code1", json.getString("struct_code"));
|
||||||
taskForm.put("point_code2", whereJson.getString("siteCode"));
|
taskForm.put("point_code2", whereJson.getString("siteCode"));
|
||||||
taskForm.put("vehicle_code", json.getString("storagevehicle_code"));
|
taskForm.put("vehicle_code", json.getString("storagevehicle_code"));
|
||||||
taskForm.put("is_auto_confirm",(BaseDataEnum.IS_YES_NOT.code("是")));
|
taskForm.put("handle_status", (BaseDataEnum.IS_YES_NOT.code("否")));
|
||||||
|
taskForm.put("is_auto_confirm", (BaseDataEnum.IS_YES_NOT.code("是")));
|
||||||
String taskCode = applyTaskMap.get(IOSConstant.PDA_POINT_TASK).create(taskForm);
|
String taskCode = applyTaskMap.get(IOSConstant.PDA_POINT_TASK).create(taskForm);
|
||||||
GroupPlate plateDao = mdPbGroupplateMapper.selectOne(
|
GroupPlate plateDao = mdPbGroupplateMapper.selectOne(
|
||||||
new LambdaQueryWrapper<GroupPlate>()
|
new LambdaQueryWrapper<GroupPlate>()
|
||||||
@@ -501,13 +501,10 @@ public class PdaIosOutServiceImpl implements PdaIosOutService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public PdaResponse bindOrUnbind(JSONObject whereJson) {
|
public PdaResponse bindOrUnbind(String siteCode, String shelfCode, String mode) {
|
||||||
String siteCode = whereJson.getString("siteCode");
|
SchBasePoint sitePoint = new SchBasePoint();
|
||||||
String shelfCode = whereJson.getString("shelfCode");
|
// 校验站点是否存在、是否可用
|
||||||
String mode = whereJson.getString("mode");
|
if (StringUtils.isNotBlank(siteCode)) {
|
||||||
SchBasePoint sitePoint;
|
|
||||||
if (IOSEnum.BIND_OR_UNBIND.code("绑定").equals(mode)) {
|
|
||||||
// 校验站点是否存在、是否可用
|
|
||||||
sitePoint = iSchBasePointService.getOne(
|
sitePoint = iSchBasePointService.getOne(
|
||||||
new LambdaQueryWrapper<SchBasePoint>()
|
new LambdaQueryWrapper<SchBasePoint>()
|
||||||
.eq(SchBasePoint::getPoint_code, siteCode)
|
.eq(SchBasePoint::getPoint_code, siteCode)
|
||||||
@@ -516,6 +513,9 @@ public class PdaIosOutServiceImpl implements PdaIosOutService {
|
|||||||
if (sitePoint == null) {
|
if (sitePoint == null) {
|
||||||
throw new BadRequestException("输入的站点编号有误或被禁用,请检查!");
|
throw new BadRequestException("输入的站点编号有误或被禁用,请检查!");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
//绑定
|
||||||
|
if (IOSEnum.BIND_OR_UNBIND.code("绑定").equals(mode)) {
|
||||||
Set<String> pointIds = new HashSet<>();
|
Set<String> pointIds = new HashSet<>();
|
||||||
pointIds.add(siteCode);
|
pointIds.add(siteCode);
|
||||||
//校验是否有任务
|
//校验是否有任务
|
||||||
@@ -526,6 +526,7 @@ public class PdaIosOutServiceImpl implements PdaIosOutService {
|
|||||||
",载具号为:" + activeTasks.get(0).getVehicle_code() + ",请稍后操作,或在WMS任务列表中检查。");
|
",载具号为:" + activeTasks.get(0).getVehicle_code() + ",请稍后操作,或在WMS任务列表中检查。");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
//解绑
|
||||||
if (StringUtils.isNotBlank(shelfCode)) {
|
if (StringUtils.isNotBlank(shelfCode)) {
|
||||||
// 校验站点是否存在、是否可用
|
// 校验站点是否存在、是否可用
|
||||||
sitePoint = iSchBasePointService.getOne(
|
sitePoint = iSchBasePointService.getOne(
|
||||||
@@ -538,34 +539,22 @@ public class PdaIosOutServiceImpl implements PdaIosOutService {
|
|||||||
return PdaResponse.requestOk();
|
return PdaResponse.requestOk();
|
||||||
}
|
}
|
||||||
siteCode = sitePoint.getPoint_code();
|
siteCode = sitePoint.getPoint_code();
|
||||||
} else {
|
|
||||||
// 校验站点是否存在、是否可用
|
|
||||||
sitePoint = iSchBasePointService.getOne(
|
|
||||||
new LambdaQueryWrapper<SchBasePoint>()
|
|
||||||
.eq(SchBasePoint::getPoint_code, siteCode)
|
|
||||||
.eq(SchBasePoint::getIs_used, true)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
LambdaUpdateWrapper<SchBasePoint> wrapper = new LambdaUpdateWrapper<>();
|
|
||||||
if (IOSEnum.BIND_OR_UNBIND.code("绑定").equals(mode)) {
|
if (IOSEnum.BIND_OR_UNBIND.code("绑定").equals(mode)) {
|
||||||
checkGroupPlateStatus(shelfCode, sitePoint.getRegion_code());
|
checkGroupPlateStatus(shelfCode, sitePoint.getRegion_code());
|
||||||
doBind(siteCode, shelfCode, wrapper);
|
doBind(siteCode, shelfCode);
|
||||||
} else {
|
} else {
|
||||||
doUnbind(sitePoint, siteCode, wrapper);
|
doUnbind(siteCode, sitePoint.getParent_point_code());
|
||||||
}
|
}
|
||||||
wrapper.set(SchBasePoint::getUpdate_time, DateUtil.now())
|
|
||||||
.set(SchBasePoint::getIs_has_workder, BaseDataEnum.IS_YES_NOT.code("否"))
|
|
||||||
.set(SchBasePoint::getIng_task_code, null)
|
|
||||||
.set(SchBasePoint::getUpdate_name, SecurityUtils.getCurrentNickName());
|
|
||||||
iSchBasePointService.update(wrapper);
|
|
||||||
return PdaResponse.requestOk();
|
return PdaResponse.requestOk();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 绑定
|
* 绑定
|
||||||
*/
|
*/
|
||||||
private void doBind(String siteCode, String shelfCode, LambdaUpdateWrapper<SchBasePoint> wrapper) {
|
private void doBind(String siteCode, String shelfCode) {
|
||||||
|
LambdaUpdateWrapper<SchBasePoint> wrapper = new LambdaUpdateWrapper<>();
|
||||||
SchBasePoint boundPoint = iSchBasePointService.getOne(
|
SchBasePoint boundPoint = iSchBasePointService.getOne(
|
||||||
new LambdaQueryWrapper<SchBasePoint>().eq(SchBasePoint::getVehicle_code, shelfCode)
|
new LambdaQueryWrapper<SchBasePoint>().eq(SchBasePoint::getVehicle_code, shelfCode)
|
||||||
);
|
);
|
||||||
@@ -580,7 +569,12 @@ public class PdaIosOutServiceImpl implements PdaIosOutService {
|
|||||||
}
|
}
|
||||||
wrapper.eq(SchBasePoint::getPoint_code, siteCode)
|
wrapper.eq(SchBasePoint::getPoint_code, siteCode)
|
||||||
.set(SchBasePoint::getVehicle_code, shelfCode)
|
.set(SchBasePoint::getVehicle_code, shelfCode)
|
||||||
.set(SchBasePoint::getPoint_status, IOSEnum.POINT_STATUS.code("有货"));
|
.set(SchBasePoint::getPoint_status, IOSEnum.POINT_STATUS.code("有货"))
|
||||||
|
.set(SchBasePoint::getUpdate_time, DateUtil.now())
|
||||||
|
.set(SchBasePoint::getIs_has_workder, BaseDataEnum.IS_YES_NOT.code("否"))
|
||||||
|
.set(SchBasePoint::getIng_task_code, null)
|
||||||
|
.set(SchBasePoint::getUpdate_name, SecurityUtils.getCurrentNickName());
|
||||||
|
iSchBasePointService.update(wrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -590,7 +584,7 @@ public class PdaIosOutServiceImpl implements PdaIosOutService {
|
|||||||
List<GroupPlate> plates = mdPbGroupplateMapper.selectList(
|
List<GroupPlate> plates = mdPbGroupplateMapper.selectList(
|
||||||
new LambdaQueryWrapper<GroupPlate>()
|
new LambdaQueryWrapper<GroupPlate>()
|
||||||
.eq(GroupPlate::getStoragevehicle_code, shelfCode)
|
.eq(GroupPlate::getStoragevehicle_code, shelfCode)
|
||||||
.lt(GroupPlate::getStatus, IOSEnum.GROUP_PLATE_STATUS.code("出库"))
|
.lt(GroupPlate::getStatus, GROUP_PLATE_STATUS.code("出库"))
|
||||||
);
|
);
|
||||||
if (CollectionUtils.isNotEmpty(plates)) {
|
if (CollectionUtils.isNotEmpty(plates)) {
|
||||||
LambdaUpdateWrapper<GroupPlate> update = new LambdaUpdateWrapper<>();
|
LambdaUpdateWrapper<GroupPlate> update = new LambdaUpdateWrapper<>();
|
||||||
@@ -598,7 +592,7 @@ public class PdaIosOutServiceImpl implements PdaIosOutService {
|
|||||||
if (!regionCode.equals(StatusEnum.REGION_INFO.code("商用线5号线"))) {
|
if (!regionCode.equals(StatusEnum.REGION_INFO.code("商用线5号线"))) {
|
||||||
update.set(GroupPlate::getFrozen_qty, BigDecimal.ZERO);
|
update.set(GroupPlate::getFrozen_qty, BigDecimal.ZERO);
|
||||||
}
|
}
|
||||||
update.set(GroupPlate::getStatus, IOSEnum.GROUP_PLATE_STATUS.code("入库"))
|
update.set(GroupPlate::getStatus, GROUP_PLATE_STATUS.code("入库"))
|
||||||
.in(GroupPlate::getGroup_id, plateCodes);
|
.in(GroupPlate::getGroup_id, plateCodes);
|
||||||
mdPbGroupplateMapper.update(null, update);
|
mdPbGroupplateMapper.update(null, update);
|
||||||
}
|
}
|
||||||
@@ -607,23 +601,33 @@ public class PdaIosOutServiceImpl implements PdaIosOutService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 解绑
|
* 解绑
|
||||||
|
* siteCode:地面站点
|
||||||
|
* parentPointCode:父级点位编码
|
||||||
*/
|
*/
|
||||||
private void doUnbind(SchBasePoint sitePoint, String siteCode, LambdaUpdateWrapper<SchBasePoint> wrapper) {
|
private void doUnbind(String siteCode, String parentPointCode) {
|
||||||
if (!"0".equals(sitePoint.getParent_point_code())) {
|
LambdaUpdateWrapper<SchBasePoint> wrapper = new LambdaUpdateWrapper<>();
|
||||||
|
if (StringUtils.isNotBlank(parentPointCode) && !"0".equals(parentPointCode)) {
|
||||||
// 有同列的子站点,批量解绑
|
// 有同列的子站点,批量解绑
|
||||||
List<SchBasePoint> sameColumnPoints = iSchBasePointService.list(
|
List<SchBasePoint> sameColumnPoints = iSchBasePointService.list(
|
||||||
new LambdaQueryWrapper<SchBasePoint>()
|
new LambdaQueryWrapper<SchBasePoint>()
|
||||||
.eq(SchBasePoint::getParent_point_code, sitePoint.getParent_point_code())
|
.eq(SchBasePoint::getParent_point_code, parentPointCode)
|
||||||
.eq(SchBasePoint::getIs_used, true)
|
.eq(SchBasePoint::getIs_used, true)
|
||||||
);
|
);
|
||||||
wrapper.in(SchBasePoint::getPoint_code, sameColumnPoints.stream()
|
if (CollectionUtils.isNotEmpty(sameColumnPoints)) {
|
||||||
.map(SchBasePoint::getPoint_code)
|
wrapper.in(SchBasePoint::getPoint_code, sameColumnPoints.stream()
|
||||||
.collect(Collectors.toList()));
|
.map(SchBasePoint::getPoint_code)
|
||||||
|
.collect(Collectors.toList()));
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
wrapper.eq(SchBasePoint::getPoint_code, siteCode);
|
wrapper.eq(SchBasePoint::getPoint_code, siteCode);
|
||||||
}
|
}
|
||||||
wrapper.set(SchBasePoint::getVehicle_code, null)
|
wrapper.set(SchBasePoint::getVehicle_code, null)
|
||||||
.set(SchBasePoint::getPoint_status, IOSEnum.POINT_STATUS.code("无货"));
|
.set(SchBasePoint::getPoint_status, IOSEnum.POINT_STATUS.code("无货"))
|
||||||
|
.set(SchBasePoint::getUpdate_time, DateUtil.now())
|
||||||
|
.set(SchBasePoint::getIs_has_workder, BaseDataEnum.IS_YES_NOT.code("否"))
|
||||||
|
.set(SchBasePoint::getIng_task_code, null)
|
||||||
|
.set(SchBasePoint::getUpdate_name, SecurityUtils.getCurrentNickName());
|
||||||
|
iSchBasePointService.update(wrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -165,7 +165,7 @@ public class PdaPointTask extends AbstractTask {
|
|||||||
public void finishTask(SchBaseTask taskObj) {
|
public void finishTask(SchBaseTask taskObj) {
|
||||||
// 更新任务
|
// 更新任务
|
||||||
taskObj.setRemark("已完成");
|
taskObj.setRemark("已完成");
|
||||||
taskObj.setHandle_status(BaseDataEnum.IS_YES_NOT.code("是"));
|
taskObj.setTask_status(TaskStatus.FINISHED.getCode());
|
||||||
taskService.updateById(taskObj);
|
taskService.updateById(taskObj);
|
||||||
//更新单据
|
//更新单据
|
||||||
outBillService.taskFinish(taskObj);
|
outBillService.taskFinish(taskObj);
|
||||||
|
|||||||
@@ -22,11 +22,11 @@ import org.nl.config.IdUtil;
|
|||||||
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;
|
||||||
import org.nl.wms.basedata_manage.service.IBsrealStorattrService;
|
import org.nl.wms.basedata_manage.service.IBsrealStorattrService;
|
||||||
import org.nl.wms.basedata_manage.service.IMdPbStoragevehicleextService;
|
|
||||||
import org.nl.wms.basedata_manage.service.IStructattrService;
|
import org.nl.wms.basedata_manage.service.IStructattrService;
|
||||||
import org.nl.wms.basedata_manage.service.dao.BsrealStorattr;
|
import org.nl.wms.basedata_manage.service.dao.BsrealStorattr;
|
||||||
import org.nl.wms.basedata_manage.service.dao.mapper.MdPbStoragevehicleextMapper;
|
import org.nl.wms.basedata_manage.service.dao.mapper.MdPbStoragevehicleextMapper;
|
||||||
import org.nl.wms.basedata_manage.service.dto.MdPbStoragevehicleextDto;
|
import org.nl.wms.basedata_manage.service.dto.MdPbStoragevehicleextDto;
|
||||||
|
import org.nl.wms.pda.ios_manage.service.PdaIosOutService;
|
||||||
import org.nl.wms.sch_manage.enums.TaskStatus;
|
import org.nl.wms.sch_manage.enums.TaskStatus;
|
||||||
import org.nl.wms.sch_manage.service.ISchBasePointService;
|
import org.nl.wms.sch_manage.service.ISchBasePointService;
|
||||||
import org.nl.wms.sch_manage.service.ISchBaseTaskService;
|
import org.nl.wms.sch_manage.service.ISchBaseTaskService;
|
||||||
@@ -76,9 +76,12 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper, IOStorInv>
|
|||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private IStructattrService iStructattrService;
|
private IStructattrService iStructattrService;
|
||||||
|
/**
|
||||||
|
* 手持出库服务
|
||||||
|
*/
|
||||||
|
@Autowired
|
||||||
|
private PdaIosOutService pdaIosOutService;
|
||||||
|
|
||||||
@Resource
|
|
||||||
private IMdPbStoragevehicleextService iMdPbStoragevehicleextService;
|
|
||||||
/**
|
/**
|
||||||
* 组盘记录mapper
|
* 组盘记录mapper
|
||||||
*/
|
*/
|
||||||
@@ -267,7 +270,6 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper, IOStorInv>
|
|||||||
String now = DateUtil.now();
|
String now = DateUtil.now();
|
||||||
String iostorinv_id = IdUtil.getStringId();
|
String iostorinv_id = IdUtil.getStringId();
|
||||||
String bill_code = CodeUtil.getNewCode("OUT_STORE_CODE");
|
String bill_code = CodeUtil.getNewCode("OUT_STORE_CODE");
|
||||||
|
|
||||||
BsrealStorattr bsrealStorattr = iBsrealStorattrService.findById((String) map.get("stor_id"));
|
BsrealStorattr bsrealStorattr = iBsrealStorattrService.findById((String) map.get("stor_id"));
|
||||||
map.put("iostorinv_id", iostorinv_id);
|
map.put("iostorinv_id", iostorinv_id);
|
||||||
map.put("bill_code", bill_code);
|
map.put("bill_code", bill_code);
|
||||||
@@ -577,11 +579,12 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper, IOStorInv>
|
|||||||
|
|
||||||
// 根据物料和批次号查询库存可用
|
// 根据物料和批次号查询库存可用
|
||||||
BigDecimal canuseSum = mdPbStoragevehicleextMapper.queryCanuseSum(pcsn,material_id);
|
BigDecimal canuseSum = mdPbStoragevehicleextMapper.queryCanuseSum(pcsn,material_id);
|
||||||
|
if (ObjectUtil.isEmpty(canuseSum)){
|
||||||
|
throw new BadRequestException("物料编号:"+ dtl.getMaterial_code() +",无库存可用");
|
||||||
|
}
|
||||||
if (canuseSum.doubleValue()<unassign_qty){
|
if (canuseSum.doubleValue()<unassign_qty){
|
||||||
throw new BadRequestException("物料编号:"+ dtl.getMaterial_code() +"出库分配数量不满足");
|
throw new BadRequestException("物料编号:"+ dtl.getMaterial_code() +",出库分配数量不满足");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 分配规则:
|
* 分配规则:
|
||||||
* 1.按批次先进先出
|
* 1.按批次先进先出
|
||||||
@@ -590,7 +593,6 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper, IOStorInv>
|
|||||||
|
|
||||||
//出库分配查询货位信息
|
//出库分配查询货位信息
|
||||||
List<MdPbStoragevehicleextDto> outAllocationList = mdPbStoragevehicleextMapper.queryOutAllocation(pcsn,material_id);
|
List<MdPbStoragevehicleextDto> outAllocationList = mdPbStoragevehicleextMapper.queryOutAllocation(pcsn,material_id);
|
||||||
|
|
||||||
int seq_no = 1;
|
int seq_no = 1;
|
||||||
double allocation_canuse_qty = 0;
|
double allocation_canuse_qty = 0;
|
||||||
for (MdPbStoragevehicleextDto outAllocation : outAllocationList) {
|
for (MdPbStoragevehicleextDto outAllocation : outAllocationList) {
|
||||||
@@ -815,6 +817,7 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper, IOStorInv>
|
|||||||
ioStorInvDis.setSect_id(ivt.getString("sect_id"));
|
ioStorInvDis.setSect_id(ivt.getString("sect_id"));
|
||||||
ioStorInvDis.setPcsn(ivt.getString("pcsn"));
|
ioStorInvDis.setPcsn(ivt.getString("pcsn"));
|
||||||
ioStorInvDis.setMaterial_id(dtl.getMaterial_id());
|
ioStorInvDis.setMaterial_id(dtl.getMaterial_id());
|
||||||
|
ioStorInvDis.setMaterial_code(dtl.getMaterial_code());
|
||||||
ioStorInvDis.setSect_name(ivt.getString("sect_name"));
|
ioStorInvDis.setSect_name(ivt.getString("sect_name"));
|
||||||
ioStorInvDis.setSect_code(ivt.getString("sect_code"));
|
ioStorInvDis.setSect_code(ivt.getString("sect_code"));
|
||||||
ioStorInvDis.setStruct_id(ivt.getString("struct_id"));
|
ioStorInvDis.setStruct_id(ivt.getString("struct_id"));
|
||||||
@@ -1243,14 +1246,8 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper, IOStorInv>
|
|||||||
} else {
|
} else {
|
||||||
wrapper.set(SchBasePoint::getIs_has_workder, BaseDataEnum.IS_YES_NOT.code("否"));
|
wrapper.set(SchBasePoint::getIs_has_workder, BaseDataEnum.IS_YES_NOT.code("否"));
|
||||||
}
|
}
|
||||||
wrapper.eq(SchBasePoint::getPoint_code, task.getPoint_code2())
|
//绑定载具
|
||||||
.set(SchBasePoint::getVehicle_code, task.getVehicle_code())
|
pdaIosOutService.bindOrUnbind(task.getPoint_code2(), task.getVehicle_code(), IOSEnum.BIND_OR_UNBIND.code("绑定"));
|
||||||
.set(SchBasePoint::getIos_id, null)
|
|
||||||
.set(SchBasePoint::getUpdate_time, DateUtil.now())
|
|
||||||
.set(SchBasePoint::getUpdate_id, SecurityUtils.getCurrentUserId())
|
|
||||||
.set(SchBasePoint::getUpdate_name, SecurityUtils.getCurrentNickName())
|
|
||||||
.set(SchBasePoint::getPoint_status, IOSEnum.POINT_STATUS.code("有货"));
|
|
||||||
iSchBasePointService.update(wrapper);
|
|
||||||
if (BaseDataEnum.IS_YES_NOT.code("是").equals(task.getHandle_status())) {
|
if (BaseDataEnum.IS_YES_NOT.code("是").equals(task.getHandle_status())) {
|
||||||
String currentUserId = SecurityUtils.getCurrentUserId();
|
String currentUserId = SecurityUtils.getCurrentUserId();
|
||||||
String nickName = SecurityUtils.getCurrentNickName();
|
String nickName = SecurityUtils.getCurrentNickName();
|
||||||
@@ -1259,7 +1256,7 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper, IOStorInv>
|
|||||||
.eq(IOStorInvDis::getTask_id, task.getTask_id())
|
.eq(IOStorInvDis::getTask_id, task.getTask_id())
|
||||||
);
|
);
|
||||||
if (ObjectUtil.isEmpty(ioStorInvDis)) {
|
if (ObjectUtil.isEmpty(ioStorInvDis)) {
|
||||||
throw new BadRequestException("未找到任务对应的分配明细");
|
return;
|
||||||
}
|
}
|
||||||
// 完成当前分配明细
|
// 完成当前分配明细
|
||||||
ioStorInvDisMapper.update(ioStorInvDis, new LambdaUpdateWrapper<>(IOStorInvDis.class)
|
ioStorInvDisMapper.update(ioStorInvDis, new LambdaUpdateWrapper<>(IOStorInvDis.class)
|
||||||
|
|||||||
@@ -148,7 +148,7 @@ public class RawAssistIStorServiceImpl extends ServiceImpl<IOStorInvMapper, IOSt
|
|||||||
io_mst.put("io_type", IOSEnum.IO_TYPE.code("入库"));
|
io_mst.put("io_type", IOSEnum.IO_TYPE.code("入库"));
|
||||||
io_mst.put("bill_type", whereJson.get("bill_type"));
|
io_mst.put("bill_type", whereJson.get("bill_type"));
|
||||||
io_mst.put("biz_date", whereJson.get("biz_date").toString().substring(0, 10));
|
io_mst.put("biz_date", whereJson.get("biz_date").toString().substring(0, 10));
|
||||||
BsrealStorattr bsrealStorattr = iBsrealStorattrService.findById((String) whereJson.get("stor_id"));
|
BsrealStorattr bsrealStorattr = iBsrealStorattrService.findByCode(StringUtils.isNotBlank((String) whereJson.get("stor_id"))?(String) whereJson.get("stor_id"):(String) whereJson.get("stor_code"));
|
||||||
String stor_code = bsrealStorattr.getStor_code();
|
String stor_code = bsrealStorattr.getStor_code();
|
||||||
String stor_name = bsrealStorattr.getStor_name();
|
String stor_name = bsrealStorattr.getStor_name();
|
||||||
io_mst.put("stor_id", whereJson.get("stor_id"));
|
io_mst.put("stor_id", whereJson.get("stor_id"));
|
||||||
|
|||||||
@@ -327,7 +327,6 @@ public class UpdateIvtUtils {
|
|||||||
extDao.setUpdate_time(DateUtil.now());
|
extDao.setUpdate_time(DateUtil.now());
|
||||||
extDao.setRemark(where.getString("remark"));
|
extDao.setRemark(where.getString("remark"));
|
||||||
iMdPbGroupPlateService.updateById(extDao);
|
iMdPbGroupPlateService.updateById(extDao);
|
||||||
;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -395,4 +394,6 @@ public class UpdateIvtUtils {
|
|||||||
}
|
}
|
||||||
return sectDao;
|
return sectDao;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user