Browse Source

栈板初始化

master
常熟吴彦祖 8 months ago
parent
commit
04a6cb56b6
  1. 1
      src/main/java/com/gaotao/modules/api/entity/NotifyDataToWcs.java
  2. 8
      src/main/java/com/gaotao/modules/automatedWarehouse/mapper/WcsIntegrationMapper.java
  3. 28
      src/main/java/com/gaotao/modules/automatedWarehouse/service/impl/WcsIntegrationServiceImpl.java
  4. 1
      src/main/java/com/gaotao/modules/notify/service/impl/NewIssureServiceImpl.java
  5. 6
      src/main/java/com/gaotao/modules/warehouse/entity/Pallet.java
  6. 8
      src/main/resources/mapper/automatedWarehouse/WcsIntegrationMapper.xml

1
src/main/java/com/gaotao/modules/api/entity/NotifyDataToWcs.java

@ -10,5 +10,6 @@ public class NotifyDataToWcs {
private String site;//工厂编码
private String taskNo;//任务单号
private Integer itemNo; //任务行号
private String orderNo;//生产订单
private List<NotifyDataToWcsPalletList> materialRequisitions;
}

8
src/main/java/com/gaotao/modules/automatedWarehouse/mapper/WcsIntegrationMapper.java

@ -1,6 +1,7 @@
package com.gaotao.modules.automatedWarehouse.mapper;
import com.gaotao.modules.automatedWarehouse.entity.*;
import com.gaotao.modules.base.entity.PalletType;
import com.gaotao.modules.warehouse.entity.PalletData;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@ -367,10 +368,11 @@ public interface WcsIntegrationMapper {
com.gaotao.modules.warehouse.entity.PalletData getPalletInfoWithTypeDetails(@Param("site") String site, @Param("palletId") String palletId);
/**
* 更新栈板类型和自动分拣标志 - AI制作
* 更新栈板类型自动分拣标志和存储类型 - AI制作/rqrq
*/
void updatePalletTypeAndAutoSort(@Param("site") String site, @Param("palletId") String palletId,
@Param("palletType") String palletType, @Param("autoSort") String autoSort);
@Param("palletType") String palletType, @Param("autoSort") String autoSort,
@Param("soreType") Integer soreType);
/**
* 获取指定层已占用的位置列表 - rqrq
@ -385,4 +387,6 @@ public interface WcsIntegrationMapper {
* @date 2025/10/07
*/
void insertCallbackPalletScan(@Param("callback") WcsCallbackPalletScan callback);
PalletType getPalletType(@Param("site") String site, @Param("palletType") String palletType);
}

28
src/main/java/com/gaotao/modules/automatedWarehouse/service/impl/WcsIntegrationServiceImpl.java

@ -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);
}
/**

1
src/main/java/com/gaotao/modules/notify/service/impl/NewIssureServiceImpl.java

@ -894,6 +894,7 @@ public class NewIssureServiceImpl implements NewIssureService {
NotifyDataToWcs wcsData = new NotifyDataToWcs();
wcsData.setSite(site);
wcsData.setTaskNo(taskNo);
wcsData.setOrderNo(productionOrderNo);
wcsData.setItemNo(orderTask.getItemNo());
// 构建栈板列表 - rqrq

6
src/main/java/com/gaotao/modules/warehouse/entity/Pallet.java

@ -68,7 +68,11 @@ public class Pallet {
private String palletFamily; // 托盘大分类关联pallet_family表固定不可改
private Integer soreType; // 分拣方式存储类型
/**
* 分拣方式存储类型- rqrq
* 0=人工/混装, 1=气胀轴自动分拣每层只能放1个, 2=抱箱自动分拣每层可以放多个, 3=直接出库强制整托出库
*/
private Integer soreType;
private String autoSort; // 是否自动分拣 Y=自动分拣, N=手动分拣

8
src/main/resources/mapper/automatedWarehouse/WcsIntegrationMapper.xml

@ -794,11 +794,12 @@
AND p.is_deleted = '0'
</select>
<!-- 更新栈板类型和自动分拣标志 - AI制作 -->
<!-- 更新栈板类型、自动分拣标志和存储类型 - AI制作/rqrq -->
<update id="updatePalletTypeAndAutoSort">
UPDATE pallet
SET pallet_type = #{palletType},
auto_sort = #{autoSort},
sore_type = #{soreType},
updated_time = GETDATE()
WHERE site = #{site}
AND pallet_id = #{palletId}
@ -830,4 +831,9 @@
)
</insert>
<select id="getPalletType" resultType="PalletType">
SELECT site, pallet_type, type_desc, active, remark, pallet_family, wcs_pallet_type, wcs_base_pallet_type, wcs_auto_sort, wcs_sore_type, max_layer
FROM pallet_type WHERE site = #{site} AND pallet_type = #{palletType}
</select>
</mapper>
Loading…
Cancel
Save