Compare commits

...

2 Commits

Author SHA1 Message Date
judy 3d019bb7f4 盘点测试优化 1 year ago
judy 0ee63a1947 盘点测试优化 1 year ago
  1. 5
      shkj-wms/src/main/java/com/shkj/wms/bo/BusinStockInvQueryBo.java
  2. 3
      shkj-wms/src/main/java/com/shkj/wms/plc/PlcEventTask.java
  3. 2
      shkj-wms/src/main/java/com/shkj/wms/scheduled/ScheduledTasks.java
  4. 11
      shkj-wms/src/main/java/com/shkj/wms/service/IBusinStockInvService.java
  5. 4
      shkj-wms/src/main/java/com/shkj/wms/utils/IntIdUtil.java
  6. 5
      shkj-wms/src/main/java/com/shkj/wms/vo/BusinStockInvVo.java
  7. 2
      shkj-wms/src/main/java/com/shkj/wms/vo/StockLocationInvVo.java
  8. 4
      shkj-wms/src/main/resources/mapper/wms/BusinStockInvMapper.xml

@ -66,5 +66,10 @@ public class BusinStockInvQueryBo extends BaseEntity {
*/
private String invStatus;
/**
* 货位ID
*/
private Long locationId;
}

@ -523,6 +523,9 @@ public class PlcEventTask {
Object temp = redisTemplate.opsForValue().get(RedisConstant.redisSTKWare + taskId);
redisTaskId = ObjectUtils.isNotEmpty(temp) ? Long.valueOf(temp.toString()) : 0L;
}
log.info("堆垛机的数据:taskId="+taskId+" redisTaskId="+redisTaskId);
String tunnel = "";
//判断redis中是否已有此任务号,如果有则不再执行;
if (taskId != 0 && !redisTaskId.equals(taskId) && readValue == 1) {

@ -1722,7 +1722,7 @@ public class ScheduledTasks {
plcToLayerMap.put("SHORT", baseLocation.getLayer());
allMap.put(plcToLayer, plcToLayerMap);
Map<String, Object> plcMLMap = new HashMap<>(1);
plcMLMap.put("Short", 4);
plcMLMap.put("Short", 7);
allMap.put(plcml, plcMLMap);
PLCReadAndWrite plcReadAndWrite = new PLCReadAndWrite();

@ -20,13 +20,14 @@ import java.util.List;
* @author lch
* @date 2022-06-10
*/
public interface IBusinStockInvService extends IService<BusinStockInv> { /**
public interface IBusinStockInvService extends IService<BusinStockInv> {
/**
* 查询列表
*
* @param bo
* @return
*/
List<BusinStockInvVo> queryList(BusinStockInvQueryBo bo);
List<BusinStockInvVo> queryList(BusinStockInvQueryBo bo);
/**
* 通过商品分组查询盘点列表
@ -54,7 +55,6 @@ List<BusinStockInvVo> queryList(BusinStockInvQueryBo bo);
Result<Boolean> invFinish(Long invId);
/**
* 查询需要盘点的货位信息
*
@ -65,15 +65,16 @@ List<BusinStockInvVo> queryList(BusinStockInvQueryBo bo);
/**
* 设置为货位
*
* @param locationId
* @return
*/
Result<Boolean> setEmptyLocation(Long locationId);
/**
* 设置为空托
*
* @param locationId
* @return
*/
@ -81,6 +82,7 @@ List<BusinStockInvVo> queryList(BusinStockInvQueryBo bo);
/**
* 标记差异
*
* @param locationId
* @return
*/
@ -88,6 +90,7 @@ List<BusinStockInvVo> queryList(BusinStockInvQueryBo bo);
/**
* 下发任务
*
* @param locationId
* @return
*/

@ -26,7 +26,7 @@ public class IntIdUtil {
if (seq > ROTATION) {
seq = 0;
}
String str = String.format("%1$01d", seq++);
String str = String.format("%1$02d", seq++);
SpringUtils.getBean(RedisCache.class).setCacheObject("seq", seq);
System.out.println("redis的值为"+seq);
return str;
@ -38,7 +38,7 @@ public class IntIdUtil {
// 因为int的最大数是2147483647 所以前2位=当前年-10
String yearStr = now.getYear() - 10 + "";
yearStr = yearStr.substring(2);
StringBuilder id = new StringBuilder(yearStr + String.format("%1$01d", now.getDayOfYear() )+ next());
StringBuilder id = new StringBuilder(yearStr + String.format("%1$02d", now.getDayOfYear() )+ next());
return Long.parseLong(id.toString());
}

@ -53,6 +53,9 @@ public class BusinStockInvVo {
*/
private String goodQty;
/**
* 盘点单号
*/
private String invOrderNo;
}

@ -44,5 +44,5 @@ public class StockLocationInvVo implements Serializable {
/**
* 保险杠数量
*/
private String goodQty;
private Integer goodQty;
}

@ -39,7 +39,7 @@
<select id="queryList" resultType="com.shkj.wms.vo.BusinStockInvVo"
parameterType="com.shkj.wms.bo.BusinStockInvQueryBo">
SELECT
si.id as invId, loc.id as locationId,loc.location_code,goods.vehiche_model,goods.color,loc.location_status,count(stock.id) goodQty
si.id as invId, loc.id as locationId,loc.location_code,goods.vehiche_model,goods.color,loc.location_status, sum(case when stock.goods_no is null then 0 else 1 end ) as goodQty,inv_order_no
FROM
busin_stock_inv si
JOIN base_location loc ON si.location_id = loc.id
@ -202,7 +202,7 @@
<select id="queryLocatonStocklist" resultType="com.shkj.wms.vo.StockLocationInvVo"
parameterType="com.shkj.wms.bo.BusinStockInvLocQueryBo">
select loc.id as locationId, loc.location_code,goods.vehiche_model,goods.color,loc.location_status,count(stock.id) goodQty
select loc.id as locationId, loc.location_code,goods.vehiche_model,goods.color,loc.location_status, sum(case when stock.goods_no is null then 0 else 1 end ) as goodQty
from base_location loc
left join sys_stock_detail stock on loc.id =stock.location_id
left join base_goods_data goods on stock.goods_no=goods.goods_no

Loading…
Cancel
Save