Merge remote-tracking branch 'origin/master'

# Conflicts:
#	mes/hd/nladmin-system/src/main/java/org/nl/wms/pf/service/FlourworkService.java
#	mes/hd/nladmin-system/src/main/java/org/nl/wms/pf/service/impl/FlourworkServiceImpl.java
#	mes/hd/nladmin-system/src/main/java/org/nl/wms/st/instor/service/impl/HandMoveStorServiceImpl.java
This commit is contained in:
zhangzhiqiang
2023-11-04 16:02:38 +08:00
3 changed files with 30 additions and 6 deletions

View File

@@ -8,20 +8,17 @@ import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.nl.annotation.Log;
import org.nl.modules.mnt.service.dto.AppQueryCriteria;
import org.nl.wms.common.util.RedissonUtils;
import org.nl.wms.pf.service.FlourworkService;
import org.nl.wms.pf.service.FormingmaterialService;
import org.nl.wms.pf.service.dto.FormingmaterialDto;
import org.springframework.data.domain.Pageable;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.Map;
import java.util.concurrent.atomic.AtomicReference;
/**
* @author Lxy
@@ -90,7 +87,11 @@ public class FlourworkController {
@Log("自动叫料")
@ApiOperation("自动叫料")
public ResponseEntity<Object> autoCalledMater(@RequestBody JSONObject whereJson){
return new ResponseEntity<>(flourworkService.autoCalledMater(whereJson),HttpStatus.OK);
AtomicReference<JSONObject> result = new AtomicReference<>(new JSONObject());
RedissonUtils.lock(a -> {
result.set(flourworkService.autoCalledMater(whereJson));
}, "autoCalledMater", 1);
return new ResponseEntity<>(result.get(),HttpStatus.OK);
}
@PostMapping("/startWork")

View File

@@ -22,6 +22,7 @@
输入.device_id TYPEAS s_string
输入.formula_id TYPEAS s_string
输入.storagevehicle_id TYPEAS s_string
输入.point_uuid_in TYPEAS f_string
[临时表]
@@ -75,6 +76,27 @@
ENDQUERY
ENDIF
IF 输入.flag = "11"
QUERY
SELECT
SUM(ivt.canuse_qty) AS canuse_qty,
ivt.material_id,
ivt.pcsn
FROM
ST_IVT_StructIvt ivt
WHERE
1=1
OPTION 输入.point_uuid_in <> ""
ivt.struct_id in 输入.point_uuid_in
ENDOPTION
group by ivt.material_id,ivt.pcsn
ENDSELECT
ENDQUERY
ENDIF
IF 输入.flag = "2"
QUERY
SELECT

View File

@@ -3,6 +3,7 @@ package org.nl.wms.st.instor.service;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import org.springframework.data.domain.Pageable;
import org.springframework.scheduling.annotation.Async;
import java.util.Map;