fix
This commit is contained in:
@@ -12,6 +12,7 @@ import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.common.exception.BadRequestException;
|
||||
import org.nl.common.logging.annotation.Log;
|
||||
import org.nl.common.utils.RsaUtils;
|
||||
import org.nl.common.utils.dto.CurrentUser;
|
||||
import org.nl.config.RsaProperties;
|
||||
@@ -19,7 +20,10 @@ import org.nl.system.service.role.ISysRoleService;
|
||||
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.wms.sch.point.service.ISchBasePointService;
|
||||
import org.nl.wms.sch.point.service.dao.SchBasePoint;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
@@ -29,6 +33,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Author: lyd
|
||||
@@ -37,15 +42,17 @@ import java.util.List;
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/mobile/auth")
|
||||
@RequestMapping("/api/pda")
|
||||
@Api(tags = "手持:系统授权接口")
|
||||
public class MobileAuthorizationController {
|
||||
@Autowired
|
||||
private ISysUserService userService;
|
||||
@Autowired
|
||||
private ISysRoleService roleService;
|
||||
@Autowired
|
||||
private ISchBasePointService pointService;
|
||||
@ApiOperation("登录授权")
|
||||
@PostMapping(value = "/login")
|
||||
@PostMapping(value = "/handlogin")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> login(@Validated @RequestBody AuthUserDto authUser, HttpServletRequest request) throws Exception {
|
||||
// 密码解密 - 前端的加密规则: encrypt(根据实际更改)
|
||||
@@ -89,4 +96,16 @@ public class MobileAuthorizationController {
|
||||
|
||||
return ResponseEntity.ok(authInfo);
|
||||
}
|
||||
|
||||
@PostMapping("/point")
|
||||
@Log("查询设备编号及状态")
|
||||
@ApiOperation("查询设备编号及状态")
|
||||
@SaIgnore
|
||||
//@PreAuthorize("@el.check('sect:list')")
|
||||
//@RequestBody JSONObject json
|
||||
public ResponseEntity<Object> queryPoint(@RequestBody Map<String, String> whereJson) {
|
||||
SchBasePoint region = new SchBasePoint();
|
||||
region.setRegion_code(whereJson.get("region_code"));
|
||||
return new ResponseEntity<>(pointService.getPointList(region), HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,6 +15,8 @@ import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* @Author: lyd
|
||||
* @Description: 手持接口
|
||||
@@ -27,6 +29,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
@SaIgnore
|
||||
public class PdaController {
|
||||
|
||||
@Resource
|
||||
private PdaService pdaService;
|
||||
|
||||
|
||||
@@ -37,6 +40,13 @@ public class PdaController {
|
||||
return new ResponseEntity<>(pdaService.outSave(param), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/callingEmpty")
|
||||
@Log("涂板线叫空架")
|
||||
@ApiOperation("涂板线叫空架")
|
||||
public ResponseEntity<Object> callingEmpty(@RequestBody JSONObject param){
|
||||
return new ResponseEntity<>(pdaService.callingEmpty(param), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/cleanVehicle")
|
||||
@Log("清空物料信息")
|
||||
@ApiOperation("清空物料信息")
|
||||
|
||||
@@ -11,6 +11,8 @@ import org.nl.wms.pda.service.dao.vo.PdaResponseVo;
|
||||
public interface PdaService {
|
||||
PdaResponseVo outSave(JSONObject param);
|
||||
|
||||
PdaResponseVo callingEmpty(JSONObject param);
|
||||
|
||||
PdaResponseVo cleanVehicle(JSONObject param);
|
||||
|
||||
PdaResponseVo callingMaterialTask(JSONObject param);
|
||||
|
||||
@@ -52,6 +52,19 @@ public class PdaServiceImpl implements PdaService {
|
||||
acsToWmsService.acsApply(param);
|
||||
return PdaResponseVo.pdaResultOk("涂板线满架下料请求成功");
|
||||
}
|
||||
|
||||
@Override
|
||||
public PdaResponseVo callingEmpty(JSONObject param) {
|
||||
param.put("device_code",param.getString("point_code"));
|
||||
if(!param.getString("point_code").startsWith("TBX")){
|
||||
throw new BadRequestException("非涂板线禁止补空架!");
|
||||
}
|
||||
param.put("request_medthod_code","TBXBKJTask");
|
||||
param.put("request_medthod_name","涂板线补空架");
|
||||
acsToWmsService.acsApply(param);
|
||||
return PdaResponseVo.pdaResultOk("涂板线补空架");
|
||||
}
|
||||
|
||||
@Override
|
||||
public PdaResponseVo cleanVehicle(JSONObject param) {
|
||||
//根据载具编码寻找点位,并且将它更新掉
|
||||
@@ -64,7 +77,7 @@ public class PdaServiceImpl implements PdaService {
|
||||
groupEntity.setUpdate_id(GeneralDefinition.ACS_ID);
|
||||
groupEntity.setUpdate_name(GeneralDefinition.ACS_NAME);
|
||||
groupEntity.setUpdate_time(DateUtil.now());
|
||||
vehiclematerialgroupService.save(groupEntity);
|
||||
vehiclematerialgroupService.update(groupEntity);
|
||||
SchBasePoint pointObj=pointService.getById(groupEntity.getPoint_code());
|
||||
if(pointObj.getVehicle_code().contains(",")){
|
||||
vehicleCode+=',';
|
||||
@@ -73,7 +86,7 @@ public class PdaServiceImpl implements PdaService {
|
||||
pointObj.setVehicle_qty(pointObj.getVehicle_qty()-1);
|
||||
pointService.update(pointObj);
|
||||
//清空组盘表的信息
|
||||
return PdaResponseVo.pdaResultOk("呼叫物料请求成功");
|
||||
return PdaResponseVo.pdaResultOk("清空物料信息请求成功");
|
||||
}
|
||||
@Override
|
||||
public PdaResponseVo callingMaterialTask(JSONObject param) {
|
||||
|
||||
@@ -182,7 +182,7 @@ public class SchBasePointServiceImpl extends ServiceImpl<SchBasePointMapper, Sch
|
||||
if (ObjectUtil.isEmpty(region)) return this.list();
|
||||
return pointMapper.selectList(new LambdaQueryWrapper<SchBasePoint>()
|
||||
.eq(SchBasePoint::getRegion_code, region.getRegion_code())
|
||||
.eq(SchBasePoint::getIs_has_workder, true));
|
||||
.eq(SchBasePoint::getIs_has_workder, 1));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -116,9 +116,9 @@ public class BPSLTask extends AbstractTask {
|
||||
if("1".equals(materialType)){
|
||||
regionCode="HCQ4";
|
||||
}else if("2".equals(materialType)){
|
||||
regionCode="HCQ1";
|
||||
}else if ("3".equals(materialType)){
|
||||
regionCode="HCQ2";
|
||||
}else if ("3".equals(materialType)){
|
||||
regionCode="HCQ3";
|
||||
}
|
||||
List<SchBasePoint> schBasePointList = pointMapper.findPointByRegion(regionCode,"1");
|
||||
for(int i=schBasePointList.size()-1;i>=0;i--){
|
||||
|
||||
@@ -162,7 +162,7 @@ public class MJXLTask extends AbstractTask {
|
||||
.eq(PdmBdWorkorder::getWorkorder_code, extGroupData.getString("workorder_code")))
|
||||
: null;
|
||||
String startPoint = taskObj.getPoint_code1(); // 获取起点
|
||||
String endPoint = taskObj.getPoint_code2().substring(0,taskObj.getPoint_code2().length()-2); // 获取终点
|
||||
String endPoint = ObjectUtil.isNotEmpty(taskObj.getPoint_code2())?taskObj.getPoint_code2().substring(0,taskObj.getPoint_code2().length()-2):"0"; // 获取终点
|
||||
SchBasePoint startPointObj = pointService.getById(startPoint);
|
||||
SchBasePoint endPointObj = pointService.getById(endPoint);
|
||||
// 根据传来的类型去对任务进行操作
|
||||
|
||||
@@ -114,11 +114,11 @@ public class TBXBKJTask extends AbstractTask {
|
||||
String regionCode = null;
|
||||
if ("TBX1".equals(startPoint.getRegion_code())) {
|
||||
//TBX1找A区
|
||||
regionCode = "HCQ3";
|
||||
regionCode = "HCQ1";
|
||||
|
||||
} else if ("TBX2".equals(startPoint.getRegion_code())) {
|
||||
//TBX2找B区
|
||||
regionCode = "KGHJ1";
|
||||
regionCode = "HCQ5";
|
||||
}
|
||||
List<SchBasePoint> schBasePointList = pointMapper.findPointByRegion(regionCode,null);
|
||||
for (SchBasePoint schBasePoint : schBasePointList) {
|
||||
|
||||
@@ -156,7 +156,7 @@ public class GHSQHTask extends AbstractTask {
|
||||
|
||||
/**
|
||||
* 1.根据当前固化室所处区域,判断到哪个区的缓存位
|
||||
* 正极板到HCQ4,负极板到HCQ1,边负极板到HCQ2
|
||||
* 正极板到HCQ4,负极板到HCQ2,边负极板到HCQ3
|
||||
* 2.从1010列到0101列倒叙判断当前列物料类型是否与起点一致且存在空位
|
||||
* 3.将当前点位设置为目标点
|
||||
* 4.如果没有符合条件的点位,跳过执行暂时等待
|
||||
@@ -169,11 +169,11 @@ public class GHSQHTask extends AbstractTask {
|
||||
regionCode = "HCQ4";
|
||||
|
||||
} else if ("2".equals(startPoint.getVehicle_type())) {
|
||||
//负极板到缓存区1
|
||||
regionCode = "HCQ1";
|
||||
} else if ("3".equals(startPoint.getVehicle_type())) {
|
||||
//边负极板到缓存区1
|
||||
//负极板到缓存区2
|
||||
regionCode = "HCQ2";
|
||||
} else if ("3".equals(startPoint.getVehicle_type())) {
|
||||
//边负极板到缓存区3
|
||||
regionCode = "HCQ3";
|
||||
}
|
||||
List<SchBasePoint> schBasePointList = pointMapper.findPointByRegion(regionCode, "1");
|
||||
for (int i = schBasePointList.size() - 1; i >= 0; i--) {
|
||||
|
||||
Reference in New Issue
Block a user