|
|
|
@ -11,6 +11,7 @@ import com.gaotao.common.utils.AgvClientUtil; |
|
|
|
import java.util.Arrays; |
|
|
|
import com.gaotao.modules.automatedWarehouse.mapper.WcsIntegrationMapper; |
|
|
|
import com.gaotao.modules.automatedWarehouse.service.WcsIntegrationService; |
|
|
|
import com.gaotao.modules.base.entity.PalletType; |
|
|
|
import com.gaotao.modules.handlingunit.entity.HandlingUnit; |
|
|
|
import com.gaotao.modules.sys.entity.SysUserEntity; |
|
|
|
import com.gaotao.modules.trans.entity.TransNoControl; |
|
|
|
@ -1264,12 +1265,13 @@ public class WcsIntegrationServiceImpl implements WcsIntegrationService { |
|
|
|
@Override |
|
|
|
@Transactional |
|
|
|
public void updatePalletTypeAndAutoSort(Map<String, Object> params) throws Exception { |
|
|
|
System.out.println("开始更新栈板类型和自动分拣标志 - AI制作,params=" + params); |
|
|
|
System.out.println("开始更新栈板类型、自动分拣标志和存储类型 - AI制作/rqrq,params=" + params); |
|
|
|
|
|
|
|
String site = (String) params.get("site"); |
|
|
|
String palletId = (String) params.get("palletId"); |
|
|
|
String palletType = (String) params.get("palletType"); |
|
|
|
String autoSort = (String) params.get("autoSort"); |
|
|
|
Boolean forceFullPalletOut = (Boolean) params.get("forceFullPalletOut"); // 是否强制整托出库 - rqrq |
|
|
|
|
|
|
|
if (!StringUtils.hasText(site) || !StringUtils.hasText(palletId)) { |
|
|
|
throw new Exception("工厂编码和栈板编码不能为空"); |
|
|
|
@ -1288,9 +1290,29 @@ public class WcsIntegrationServiceImpl implements WcsIntegrationService { |
|
|
|
throw new Exception("自动分拣标志只能为Y或N"); |
|
|
|
} |
|
|
|
|
|
|
|
wcsIntegrationMapper.updatePalletTypeAndAutoSort(site, palletId, palletType, autoSort); |
|
|
|
// 确定soreType的值 - rqrq |
|
|
|
Integer soreType; |
|
|
|
if (forceFullPalletOut != null && forceFullPalletOut) { |
|
|
|
// 如果勾选"强制整托出库",则soreType固定为3(直接出库) - rqrq |
|
|
|
soreType = 3; |
|
|
|
System.out.println("强制整托出库已勾选,soreType设置为3(直接出库) - rqrq"); |
|
|
|
} else { |
|
|
|
// 否则从pallet_type表查询wcsSoreType - rqrq |
|
|
|
|
|
|
|
PalletType palletTypeInfo = wcsIntegrationMapper.getPalletType(site,palletType); |
|
|
|
if (palletTypeInfo != null && palletTypeInfo.getWcsSoreType() != null) { |
|
|
|
soreType = palletTypeInfo.getWcsSoreType(); |
|
|
|
System.out.println("从pallet_type表获取wcsSoreType=" + soreType + " - rqrq"); |
|
|
|
} else { |
|
|
|
// 如果查不到,默认为0(人工/混装) - rqrq |
|
|
|
soreType = 0; |
|
|
|
System.out.println("未找到pallet_type配置,soreType默认为0(人工/混装) - rqrq"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
wcsIntegrationMapper.updatePalletTypeAndAutoSort(site, palletId, palletType, autoSort, soreType); |
|
|
|
|
|
|
|
System.out.println("更新栈板类型和自动分拣标志完成 - AI制作"); |
|
|
|
System.out.println("更新栈板类型、自动分拣标志和存储类型完成 - AI制作/rqrq,soreType=" + soreType); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
|