opt:优化

This commit is contained in:
DESKTOP-5DIJMF9\admin
2025-07-28 13:18:38 +08:00
parent 92c00a502d
commit 971e1c99ae
9 changed files with 14 additions and 39 deletions

View File

@@ -344,7 +344,7 @@ public class StructattrServiceImpl extends ServiceImpl<StructattrMapper, Structa
List<String> strategy = one.getStrategy();
Map<String, Decisioner> decisionerMap = SpringContextHolder.getBeansOfType(Decisioner.class);
QueryWrapper<Structattr> query = new QueryWrapper<Structattr>()
.eq("is_used", true)
.eq("is_used", "1")
.eq("lock_type",IOSEnum.LOCK_TYPE.code("未锁定"))
.eq("sect_code", param.getSect_code())
.isNull("storagevehicle_code");

View File

@@ -20,9 +20,11 @@ import org.nl.common.utils.SecurityUtils;
import org.nl.config.SpringContextHolder;
import org.nl.wms.basedata_manage.enums.BaseDataEnum;
import org.nl.wms.basedata_manage.service.IBsrealStorattrService;
import org.nl.wms.basedata_manage.service.ISectattrService;
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.MdPbStoragevehicleinfo;
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.mapper.MdPbStoragevehicleinfoMapper;
import org.nl.wms.basedata_manage.service.dto.StrategyStructParam;
@@ -66,6 +68,9 @@ public class RawAssistIStorServiceImpl extends ServiceImpl<IOStorInvMapper, IOSt
@Resource
private IBsrealStorattrService iBsrealStorattrService;
@Resource
private ISectattrService iSectattrService;
@Resource
private IStructattrService iStructattrService;
@@ -132,6 +137,7 @@ public class RawAssistIStorServiceImpl extends ServiceImpl<IOStorInvMapper, IOSt
}
@Override
@Transactional(rollbackFor = Exception.class)
public String insertDtl(Map whereJson) {
ArrayList<HashMap> rows = (ArrayList<HashMap>) whereJson.get("tableData");
String currentUserId = SecurityUtils.getCurrentUserId();
@@ -217,6 +223,7 @@ public class RawAssistIStorServiceImpl extends ServiceImpl<IOStorInvMapper, IOSt
}
@Override
@Transactional(rollbackFor = Exception.class)
public void deleteAll(String[] ids) {
String currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getCurrentNickName();
@@ -344,6 +351,8 @@ public class RawAssistIStorServiceImpl extends ServiceImpl<IOStorInvMapper, IOSt
String struct_name = "";
//是否自动分配仓位
Boolean checked = mst.getBoolean("checked");
BsrealStorattr stor = iBsrealStorattrService.findById(param.getString("stor_code"));
Sectattr sect = iSectattrService.findById(param.getString("sect_code"));
if (ObjectUtil.isNotEmpty(checked) && checked) {
param.put("qty", map.get("plan_qty"));
param.put("material_code", map.get("material_code"));
@@ -352,8 +361,8 @@ public class RawAssistIStorServiceImpl extends ServiceImpl<IOStorInvMapper, IOSt
List<Structattr> structattrs = iStructattrService.inBoundSectDiv(
StrategyStructParam.builder()
.ioType(param.getString("ioType"))
.sect_code(param.getString("sect_code"))
.stor_code(param.getString("stor_code"))
.sect_code(sect.getSect_code())
.stor_code(stor.getStor_code())
.material_code(param.getString("material_code"))
.qty(new BigDecimal(param.getString("qty")))
.pcsn(param.getString("pcsn"))