psh 12 months ago
parent
commit
9096f100c9
  1. 7
      acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/basedriver/standard_autodoor/StandardAutodoorDefination.java
  2. 4
      acs/nladmin-ui/src/views/acs/device/opc/index.vue
  3. 23
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/system/controller/secutiry/MobileAuthorizationController.java
  4. 10
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/controller/PdaController.java
  5. 2
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/PdaService.java
  6. 17
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/impl/PdaServiceImpl.java
  7. 2
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/impl/SchBasePointServiceImpl.java
  8. 4
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/BPSLTask.java
  9. 2
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/MJXLTask.java
  10. 4
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/TBXBKJTask.java
  11. 10
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/ghs/GHSQHTask.java

7
acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/basedriver/standard_autodoor/StandardAutodoorDefination.java

@ -55,12 +55,7 @@ public class StandardAutodoorDefination implements OpcDeviceDriverDefination {
}
public static List<ItemDto> getReadableItemDtos2() {
List<ItemDto> list = new ArrayList();
list.add(new ItemDto(ItemProtocol.item_heartbeat, "心跳", "DB600.B0"));
list.add(new ItemDto(ItemProtocol.item_mode, "工作状态", "DB600.B1", true));
list.add(new ItemDto(ItemProtocol.item_action, "动作信号", "DB600.B2"));
list.add(new ItemDto(ItemProtocol.item_error, "报警信号", "DB600.B4"));
return list;
return ItemProtocol.getReadableItemDtos();
}
@Override

4
acs/nladmin-ui/src/views/acs/device/opc/index.vue

@ -92,7 +92,7 @@
row-key="opc_id"
border
default-expand-all
:tree-props="{children: 'children', has_children: 'has_children'}"
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
@select="crud.selectChange"
@select-all="crud.selectAllChange"
@selection-change="crud.selectionChangeHandler"
@ -108,7 +108,7 @@
<el-table-column prop="cls_id" label="注册表ID" min-width="150"/>
<el-table-column prop="domain" label="domain"/>
<el-table-column prop="remark" label="备注" min-width="100"/>
<el-table-column prop="create_time" label="创建时间" />
<el-table-column prop="createtime" label="创建时间"/>
<el-table-column label="操作" width="200px" align="center" fixed="right">
<template slot-scope="scope">
<el-button type="text" size="small" @click="handleClick(scope.row,'1')">修改</el-button>

23
lms/nladmin-system/nlsso-server/src/main/java/org/nl/system/controller/secutiry/MobileAuthorizationController.java

@ -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);
}
}

10
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/controller/PdaController.java

@ -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("清空物料信息")

2
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/PdaService.java

@ -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);

17
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/impl/PdaServiceImpl.java

@ -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) {

2
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/impl/SchBasePointServiceImpl.java

@ -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

4
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/BPSLTask.java

@ -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--){

2
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/MJXLTask.java

@ -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);
// 根据传来的类型去对任务进行操作

4
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/TBXBKJTask.java

@ -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) {

10
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/ghs/GHSQHTask.java

@ -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--) {

Loading…
Cancel
Save