This commit is contained in:
2023-02-15 16:12:26 +08:00
14 changed files with 1007 additions and 51 deletions

View File

@@ -20,7 +20,6 @@ import org.nl.system.service.secutiry.dto.AuthUserDto;
import org.nl.system.service.user.ISysUserService;
import org.nl.system.service.user.dao.SysUser;
import org.nl.system.service.user.dto.CurrentUser;
import org.nl.system.service.user.dto.UserDto;
import org.springframework.http.ResponseEntity;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;

View File

@@ -0,0 +1,48 @@
package org.nl.wms.pda;
/**
* @author ldjun
* @version 1.0
* @date 2023年02月14日 15:20
* @desc desc
*/
import cn.dev33.satoken.annotation.SaIgnore;
import com.alibaba.fastjson.JSONObject;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.nl.modules.logging.annotation.Log;
import org.nl.modules.system.service.ParamService;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
/**
*
*/
@RestController
@RequiredArgsConstructor
@Api(tags = "任务管理")
@RequestMapping("/api/pda/update")
@Slf4j
public class AppUpdateController {
private final ParamService paramService;
@PostMapping
@Log("app更新")
@ApiOperation("app更新")
@SaIgnore
public ResponseEntity<Object> appUpdate() {
JSONObject obj=new JSONObject();
// obj.put("versionName","1.0.1");
String app_rul = paramService.findByCode("APP_URL").getValue();
String app_version = paramService.findByCode("APP_VERSION").getValue();
// obj.put("url","http://172.17.2.163:8080/apk/app.apk");
obj.put("url",app_rul);
obj.put("versionName",app_version);
return new ResponseEntity<>(obj, HttpStatus.OK);
}
}

View File

@@ -288,18 +288,44 @@ public class ProductInstorServiceImpl implements ProductInstorService {
throw new BadRequestException("未查询到该木箱对应的包装关系!");
}
String box_length = sub_jo.getString("box_length");
String box_width = sub_jo.getString("box_width");
String box_high = sub_jo.getString("box_high");
String to_length = sub_jo.getString("box_length"); // 长
String to_weight = sub_jo.getString("box_width"); // 宽
String to_height = sub_jo.getString("box_high"); // 高
String to_strap_times = "2"; // 捆扎次数
String to_command = "4"; // 指令
JSONArray array = new JSONArray();
JSONObject jsonLength = new JSONObject();
jsonLength.put("device_code", point_code);
jsonLength.put("code", "");
jsonLength.put("value", box_length);
jsonLength.put("code", "to_length");
jsonLength.put("value", to_length);
array.add(jsonLength);
JSONObject jsonWeight= new JSONObject();
jsonWeight.put("device_code", point_code);
jsonWeight.put("code", "to_weight");
jsonWeight.put("value", to_weight);
array.add(jsonWeight);
JSONObject jsonHeight= new JSONObject();
jsonHeight.put("device_code", point_code);
jsonHeight.put("code", "to_height");
jsonHeight.put("value", to_height);
array.add(jsonHeight);
JSONObject jsonStrap= new JSONObject();
jsonStrap.put("device_code", point_code);
jsonStrap.put("code", "to_strap_times");
jsonStrap.put("value", to_strap_times);
array.add(jsonStrap);
JSONObject jsonCommand= new JSONObject();
jsonCommand.put("device_code", point_code);
jsonCommand.put("code", "to_command");
jsonCommand.put("value", to_command);
array.add(jsonCommand);
// 调用接口返回数据
WmsToAcsServiceImpl wmsToAcsServiceImpl = SpringContextHolder.getBean(WmsToAcsServiceImpl.class);
wmsToAcsServiceImpl.action(array);