opt:一期扩容代码改成http调用
This commit is contained in:
@@ -29,6 +29,9 @@ public class CodeUtil {
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
map.put("flag", flag);
|
||||
String code = HttpUtil.get("http://127.0.0.1:8011/api/codeDetail/getNewCode?code=" + ruleCode + "&flag" + flag);
|
||||
if (code.contains("status")){
|
||||
throw new BadRequestException(code);
|
||||
}
|
||||
return code;
|
||||
} else {
|
||||
throw new BadRequestException("系统繁忙,稍后在试!");
|
||||
|
||||
@@ -99,7 +99,7 @@
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// @Transactional(Transactional.TxType.REQUIRES_NEW)
|
||||
// @Transactional(Transactional.TxType.`REQUIRES_NEW`)
|
||||
// public String codeDemo(Map form) {
|
||||
// String code = (String) form.get("code");
|
||||
// String id = this.queryIdByCode(code);
|
||||
|
||||
@@ -3,8 +3,10 @@ package org.nl.system.controller.coderule;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.dev33.satoken.annotation.SaIgnore;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.nl.common.TableDataInfo;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.modules.common.exception.BadRequestException;
|
||||
import org.nl.modules.logging.annotation.Log;
|
||||
import org.nl.system.service.coderule.ISysCodeRuleDetailService;
|
||||
import org.nl.system.service.coderule.dao.SysCodeRuleDetail;
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
package org.nl.wms.st.inbill.rest;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaIgnore;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.b_lms.storage_manage.ios.enums.IOSEnum;
|
||||
import org.nl.b_lms.storage_manage.ios.service.iostorInv.IStIvtIostorinvService;
|
||||
import org.nl.common.utils.MapOf;
|
||||
import org.nl.modules.logging.annotation.Log;
|
||||
import org.nl.wms.st.inbill.service.RawAssistIStorService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -285,4 +287,13 @@ public class RawAssistIStorController {
|
||||
public void download(@RequestParam Map map, HttpServletResponse response) throws IOException {
|
||||
rawAssistIStorService.download(map, response);
|
||||
}
|
||||
|
||||
|
||||
@Log("一期扩容接口")
|
||||
@GetMapping(value = "/updateStructSect")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> updateStructSect(String layer_num) throws IOException {
|
||||
rawAssistIStorService.updateStructSect(layer_num);
|
||||
return new ResponseEntity<>(MapOf.of("status","200","message","sucess"),HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -73,4 +73,10 @@ public interface RawAssistIStorService {
|
||||
* @throws IOException /
|
||||
*/
|
||||
void download(Map map, HttpServletResponse response) throws IOException;
|
||||
|
||||
/**
|
||||
* 一期仓库扩容
|
||||
* @param layer_num
|
||||
*/
|
||||
void updateStructSect(String layer_num);
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.NumberUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.http.HttpUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
@@ -1867,6 +1868,11 @@ public class RawAssistIStorServiceImpl implements RawAssistIStorService {
|
||||
|
||||
if (ObjectUtil.isEmpty(struct_jo)) {
|
||||
// 主存区类型更改成中转区类型:找一排主存区的更改中转区、把一排中转区的更改成主存区(只允许调用一次)
|
||||
String result = HttpUtil.get("http://127.0.0.1:8011/api/in/rawAssist/updateStructSect?layer_num=" + col_num);
|
||||
JSONObject toJSON = (JSONObject)JSONObject.toJSON(result);
|
||||
if (!toJSON.getString("status").equals("200")){
|
||||
throw new BadRequestException(toJSON.getString("message"));
|
||||
}
|
||||
SpringContextHolder.getBean(RawAssistIStorServiceImpl.class).updateStructSect(col_num);
|
||||
struct_jo = autoDisMove2(whereJson);
|
||||
}
|
||||
@@ -2794,7 +2800,7 @@ public class RawAssistIStorServiceImpl implements RawAssistIStorService {
|
||||
/**
|
||||
* 新开事务,把当前事务挂起,(新开事务不回滚)
|
||||
*/
|
||||
@Transactional(propagation=Propagation.REQUIRES_NEW)
|
||||
@Transactional()
|
||||
public void updateStructSect(String layer_num) {
|
||||
WQLObject attr = WQLObject.getWQLObject("st_ivt_structattr");
|
||||
WQLObject point = WQLObject.getWQLObject("sch_base_point");
|
||||
|
||||
@@ -127,6 +127,7 @@ security:
|
||||
- /plumelog/**
|
||||
- /api/esLog/**
|
||||
- /api/codeDetail/getNewCode
|
||||
- /api/in/rawAssist/updateStructSect
|
||||
# Sa-Token配置
|
||||
sa-token:
|
||||
# token 名称 (同时也是cookie名称)
|
||||
|
||||
Reference in New Issue
Block a user