Browse Source

opt:开发手持清空点位功能

master
zds 1 month ago
parent
commit
bc67669d14
  1. 16
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/controller/PdaController.java
  2. 2
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/PdaService.java
  3. 38
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/impl/PdaServiceImpl.java

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

@ -66,6 +66,15 @@ public class PdaController {
return new ResponseEntity<>(pointService.getPointListByPda(region), HttpStatus.OK);
}
@PostMapping("/queryCleanPoint")
@Log("查询设备编号及状态")
@ApiOperation("查询设备编号及状态")
@SaIgnore
public ResponseEntity<Object> queryCleanPoint(@RequestBody Map<String, String> whereJson) {
String region = whereJson.get("region_code");
return new ResponseEntity<>(pointService.getPointsByRegionCodes(region), HttpStatus.OK);
}
@PostMapping("/region")
@Log("区域列表")
@ApiOperation("区域列表")
@ -123,4 +132,11 @@ public class PdaController {
public ResponseEntity<Object> ycck(){
return new ResponseEntity<>(pdaService.ycck(), HttpStatus.OK);
}
@PostMapping("/pointclean")
@Log("点位清空")
@ApiOperation("点位清空")
public ResponseEntity<Object> pointclean(@RequestBody JSONObject param){
return new ResponseEntity<>(pdaService.pointclean(param), HttpStatus.OK);
}
}

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

@ -23,4 +23,6 @@ public interface PdaService {
PdaResponseVo ycck();
PdaResponseVo pointclean(JSONObject param);
}

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

@ -21,6 +21,7 @@ import org.nl.wms.sch.material.service.dao.Material;
import org.nl.wms.sch.material.service.dao.mapper.MaterialMapper;
import org.nl.wms.sch.point.service.ISchBasePointService;
import org.nl.wms.sch.point.service.dao.SchBasePoint;
import org.nl.wms.sch.region.service.dao.SchBaseRegion;
import org.nl.wms.sch.task.service.ISchBaseTaskService;
import org.nl.wms.sch.task.service.dao.SchBaseTask;
import org.nl.wms.sch.task_manage.GeneralDefinition;
@ -272,4 +273,41 @@ public class PdaServiceImpl implements PdaService {
}
return result;
}
@Override
public PdaResponseVo pointclean(JSONObject param) {
PdaResponseVo result = new PdaResponseVo();
String point_code = param.getString("point");
point_code = point_code.trim();
String currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getCurrentNickName();
String now = DateUtil.now();
if(ObjectUtil.isEmpty(point_code)){
result = PdaResponseVo.pdaResultError("点位编码不能为空:"+point_code);
return result;
}
SchBasePoint nowPoint = pointMapper.selectById(point_code);
if(ObjectUtil.isEmpty(nowPoint)){
result = PdaResponseVo.pdaResultError("该点位信息查询失败:"+point_code);
return result;
}
if(ObjectUtil.isNotEmpty(nowPoint.getIng_task_code())){
result = PdaResponseVo.pdaResultError("该点位有未完成的任务不允许清空信息:"+point_code);
return result;
}
log.info("pointclean手持管理端变更点位信息前为:{}",nowPoint.toString());
nowPoint.setUpdate_id(currentUserId);
nowPoint.setUpdate_name(nickName);
nowPoint.setUpdate_time(now);
nowPoint.setVehicle_code("");
nowPoint.setVehicle_code2("");
nowPoint.setVehicle_qty(0);
pointMapper.updateById(nowPoint);
log.info("pointclean手持管理端变更点位信息前后:{}",nowPoint.toString());
return PdaResponseVo.pdaResultOk("点位清空成功");
}
}

Loading…
Cancel
Save