设备代码提交
parent
76e3df3611
commit
6c66ec37ca
@ -0,0 +1,105 @@
|
|||||||
|
package com.glxp.api.controller.inv;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.IdUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.glxp.api.common.res.BaseResponse;
|
||||||
|
import com.glxp.api.common.util.ResultVOUtils;
|
||||||
|
import com.glxp.api.entity.auth.AuthAdmin;
|
||||||
|
import com.glxp.api.entity.inv.DeviceInspectPlanDelectEntity;
|
||||||
|
import com.glxp.api.entity.inv.DeviceInspectSetEntity;
|
||||||
|
import com.glxp.api.req.inv.AddDeviceInspectSetRequest;
|
||||||
|
import com.glxp.api.res.inv.DeviceInspectSetResponse;
|
||||||
|
import com.glxp.api.service.auth.CustomerService;
|
||||||
|
import com.glxp.api.service.inv.DeviceInspectPlanDelectService;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.lucene.util.CollectionUtil;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
@RestController
|
||||||
|
public class DeviceInspectPlanDelectController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
DeviceInspectPlanDelectService deviceInspectPlanDelectService;
|
||||||
|
@Resource
|
||||||
|
CustomerService customerService;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询巡检设置配置项
|
||||||
|
*
|
||||||
|
* @param deviceInspectPlanDelectEntity
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/udiwms/inv/device/inspect/plan/selectDeviceInspectPlanDelect")
|
||||||
|
public BaseResponse selectDeviceInspectPlanDelect(DeviceInspectPlanDelectEntity deviceInspectPlanDelectEntity) {
|
||||||
|
List<DeviceInspectPlanDelectEntity> deviceInspectPlanDelectEntityList = deviceInspectPlanDelectService.selectDeviceInspectPlanDelect(deviceInspectPlanDelectEntity);
|
||||||
|
return ResultVOUtils.success(deviceInspectPlanDelectEntityList);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加巡检设置配置项
|
||||||
|
*
|
||||||
|
* @param deviceInspectPlanDelectEntity
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping("/udiwms/inv/device/inspect/plan/addDeviceInspectPlanDelect")
|
||||||
|
public BaseResponse addDeviceInspectPlanDelect(@RequestBody DeviceInspectPlanDelectEntity deviceInspectPlanDelectEntity) {
|
||||||
|
|
||||||
|
AuthAdmin authAdmin=customerService.getUserBean();
|
||||||
|
deviceInspectPlanDelectEntity.setId(IdUtil.getSnowflakeNextId());
|
||||||
|
deviceInspectPlanDelectEntity.setUpdateTime(new Date());
|
||||||
|
deviceInspectPlanDelectEntity.setUpdateUser(authAdmin.getId() + "");
|
||||||
|
Boolean falg=deviceInspectPlanDelectService.addDeviceInspectPlanDelectEntity(deviceInspectPlanDelectEntity);
|
||||||
|
if(!falg){
|
||||||
|
return ResultVOUtils.error(999,"添加失败!");
|
||||||
|
}
|
||||||
|
return ResultVOUtils.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新巡检设置配置项
|
||||||
|
*
|
||||||
|
* @param deviceInspectPlanDelectEntity
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping("/udiwms/inv/device/inspect/plan/uploadDeviceInspectPlanDelect")
|
||||||
|
public BaseResponse uploadDeviceInspectPlanDelect(@RequestBody DeviceInspectPlanDelectEntity deviceInspectPlanDelectEntity) {
|
||||||
|
|
||||||
|
|
||||||
|
AuthAdmin authAdmin=customerService.getUserBean();
|
||||||
|
deviceInspectPlanDelectEntity.setUpdateTime(new Date());
|
||||||
|
deviceInspectPlanDelectEntity.setUpdateUser(authAdmin.getId() + "");
|
||||||
|
Boolean falg=deviceInspectPlanDelectService.uploadDeviceInspectPlanDelectEntity(deviceInspectPlanDelectEntity);
|
||||||
|
if(!falg){
|
||||||
|
return ResultVOUtils.error(999,"更新失败!");
|
||||||
|
}
|
||||||
|
return ResultVOUtils.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除巡检设置配置项
|
||||||
|
*
|
||||||
|
* @param deviceInspectPlanDelectEntity
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping("/udiwms/inv/device/inspect/plan/delectDeviceInspectPlanDelect")
|
||||||
|
public BaseResponse delectDeviceInspectPlanDelect(@RequestBody DeviceInspectPlanDelectEntity deviceInspectPlanDelectEntity) {
|
||||||
|
|
||||||
|
Boolean falg=deviceInspectPlanDelectService.delectDeviceInspectPlanDelectEntity(deviceInspectPlanDelectEntity);
|
||||||
|
if(!falg){
|
||||||
|
return ResultVOUtils.error(999,"删除失败!");
|
||||||
|
}
|
||||||
|
return ResultVOUtils.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,106 @@
|
|||||||
|
package com.glxp.api.controller.inv;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import com.glxp.api.common.req.UpdateRequest;
|
||||||
|
import com.glxp.api.common.res.BaseResponse;
|
||||||
|
import com.glxp.api.common.util.ResultVOUtils;
|
||||||
|
import com.glxp.api.entity.inv.DeviceInspectPlanDelectEntity;
|
||||||
|
import com.glxp.api.entity.inv.DeviceInspectPlanEntity;
|
||||||
|
import com.glxp.api.entity.inv.DeviceInspectTaskDetailEntity;
|
||||||
|
import com.glxp.api.entity.inv.DeviceInspectTaskEntity;
|
||||||
|
import com.glxp.api.req.inv.AddDeviceInspectPlanRequest;
|
||||||
|
import com.glxp.api.req.inv.FilterDeviceInspectPlanRequest;
|
||||||
|
import com.glxp.api.req.inv.FilterDeviceInspectTakeRequest;
|
||||||
|
import com.glxp.api.req.system.DeleteRequest;
|
||||||
|
import com.glxp.api.res.inv.DeviceInspectPlanResponse;
|
||||||
|
import com.glxp.api.res.inv.DeviceInspectTakeResponse;
|
||||||
|
import com.glxp.api.service.inv.DeviceInspectPlanService;
|
||||||
|
import com.glxp.api.service.inv.DeviceInspectTaskDetailService;
|
||||||
|
import com.glxp.api.service.inv.DeviceInspectTaskService;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备巡检任务接口
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@RestController
|
||||||
|
public class DeviceInspectTakeController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
DeviceInspectTaskService deviceInspectTaskService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
DeviceInspectTaskDetailService deviceInspectTaskDetailService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询设设备巡检任务接口
|
||||||
|
*
|
||||||
|
* @param filterDeviceInspectTakeRequest
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/udiwms/inv/device/inspect/take/filter")
|
||||||
|
public BaseResponse filterList(FilterDeviceInspectTakeRequest filterDeviceInspectTakeRequest) {
|
||||||
|
List<DeviceInspectTakeResponse> list = deviceInspectTaskService.filterList(filterDeviceInspectTakeRequest);
|
||||||
|
PageInfo<DeviceInspectTakeResponse> pageInfo = new PageInfo<>(list);
|
||||||
|
return ResultVOUtils.page(pageInfo);
|
||||||
|
}
|
||||||
|
@PostMapping("/udiwms/inv/device/inspect/take/uploadDeviceInspecTake")
|
||||||
|
public BaseResponse uploadDeviceInspecTake(@RequestBody DeviceInspectTaskEntity deviceInspectTaskEntity) {
|
||||||
|
deviceInspectTaskEntity.setUpdateTime(new Date());
|
||||||
|
if(deviceInspectTaskEntity.getStatus() == 1){
|
||||||
|
deviceInspectTaskEntity.setStrartTime(new Date());
|
||||||
|
}else{
|
||||||
|
deviceInspectTaskEntity.setEndTime(new Date());
|
||||||
|
}
|
||||||
|
boolean falg=deviceInspectTaskService.updateById(deviceInspectTaskEntity);
|
||||||
|
if(!falg){
|
||||||
|
return ResultVOUtils.error(999,"更新失败");
|
||||||
|
}
|
||||||
|
return ResultVOUtils.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//------------------------------------------ 详情方法--------------------------------------------------------------//
|
||||||
|
@GetMapping("/udiwms/inv/device/inspect/take/detail/selectDeviceInspecTakeDetail")
|
||||||
|
public BaseResponse selectDeviceInspecTakeDetail(DeviceInspectTaskDetailEntity deviceInspectTaskDetailEntity) {
|
||||||
|
List<DeviceInspectTaskDetailEntity> deviceInspectPlanDelectEntityList = deviceInspectTaskDetailService.selectDeviceInspectTakeDetail(deviceInspectTaskDetailEntity);
|
||||||
|
return ResultVOUtils.success(deviceInspectPlanDelectEntityList);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/udiwms/inv/device/inspect/take/detail/uploadDeviceInspecTakeDetail")
|
||||||
|
public BaseResponse uploadDeviceInspecTakeDetail(@RequestBody DeviceInspectTaskDetailEntity deviceInspectTaskDetailEntity) {
|
||||||
|
deviceInspectTaskDetailEntity.setUpdateTime(new Date());
|
||||||
|
boolean falg=deviceInspectTaskDetailService.uploadDeviceInspecTakeDetail(deviceInspectTaskDetailEntity);
|
||||||
|
if(!falg){
|
||||||
|
return ResultVOUtils.error(999,"更新失败");
|
||||||
|
}
|
||||||
|
return ResultVOUtils.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/udiwms/inv/device/inspect/take/detail/addDeviceInspecTakeDetail")
|
||||||
|
public BaseResponse addDeviceInspecTakeDetail(@RequestBody DeviceInspectTaskDetailEntity deviceInspectTaskDetailEntity) {
|
||||||
|
|
||||||
|
boolean falg=deviceInspectTaskDetailService.addDeviceInspectTaskDelect(deviceInspectTaskDetailEntity);
|
||||||
|
if(!falg){
|
||||||
|
return ResultVOUtils.error(999,"更新失败");
|
||||||
|
}
|
||||||
|
return ResultVOUtils.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,9 @@
|
|||||||
|
package com.glxp.api.dao.inv;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.glxp.api.entity.inv.DeviceInspectPlanDelectEntity;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface DeviceInspectPlanDelectMapper extends BaseMapper<DeviceInspectPlanDelectEntity> {
|
||||||
|
}
|
@ -1,9 +1,12 @@
|
|||||||
package com.glxp.api.dao.inv;
|
package com.glxp.api.dao.inv;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.glxp.api.entity.inv.DeviceInspectTaskDetail;
|
import com.glxp.api.dao.BaseMapperPlus;
|
||||||
|
import com.glxp.api.dao.purchase.PurOrderDao;
|
||||||
|
import com.glxp.api.entity.inv.DeviceInspectTaskDetailEntity;
|
||||||
|
import com.glxp.api.entity.purchase.PurOrderEntity;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface DeviceInspectTaskDetailMapper extends BaseMapper<DeviceInspectTaskDetail> {
|
public interface DeviceInspectTaskDetailMapper extends BaseMapperPlus<DeviceInspectTaskDetailMapper, DeviceInspectTaskDetailEntity, DeviceInspectTaskDetailEntity> {
|
||||||
}
|
}
|
@ -1,9 +1,17 @@
|
|||||||
package com.glxp.api.dao.inv;
|
package com.glxp.api.dao.inv;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.glxp.api.entity.inv.DeviceInspectTask;
|
import com.glxp.api.entity.inv.DeviceInspectTaskEntity;
|
||||||
|
import com.glxp.api.req.inv.FilterDeviceInspectPlanRequest;
|
||||||
|
import com.glxp.api.req.inv.FilterDeviceInspectTakeRequest;
|
||||||
|
import com.glxp.api.res.inv.DeviceInspectPlanResponse;
|
||||||
|
import com.glxp.api.res.inv.DeviceInspectTakeResponse;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface DeviceInspectTaskMapper extends BaseMapper<DeviceInspectTask> {
|
public interface DeviceInspectTaskMapper extends BaseMapper<DeviceInspectTaskEntity> {
|
||||||
|
|
||||||
|
List<DeviceInspectTakeResponse> filterList(FilterDeviceInspectTakeRequest filterDeviceInspectTakeRequest);
|
||||||
}
|
}
|
@ -0,0 +1,20 @@
|
|||||||
|
package com.glxp.api.service.inv;
|
||||||
|
|
||||||
|
import com.glxp.api.dao.inv.DeviceInspectPlanDelectMapper;
|
||||||
|
import com.glxp.api.entity.inv.DeviceInspectPlanDelectEntity;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface DeviceInspectPlanDelectService extends IService<DeviceInspectPlanDelectEntity> {
|
||||||
|
|
||||||
|
List<DeviceInspectPlanDelectEntity> selectDeviceInspectPlanDelect(DeviceInspectPlanDelectEntity deviceInspectPlanDelectEntity);
|
||||||
|
|
||||||
|
Boolean addDeviceInspectPlanDelectEntity(DeviceInspectPlanDelectEntity deviceInspectPlanDelectEntity);
|
||||||
|
|
||||||
|
Boolean uploadDeviceInspectPlanDelectEntity(DeviceInspectPlanDelectEntity deviceInspectPlanDelectEntity);
|
||||||
|
|
||||||
|
Boolean delectDeviceInspectPlanDelectEntity(DeviceInspectPlanDelectEntity deviceInspectPlanDelectEntity);
|
||||||
|
|
||||||
|
}
|
@ -1,12 +1,60 @@
|
|||||||
package com.glxp.api.service.inv;
|
package com.glxp.api.service.inv;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.glxp.api.dao.inv.DeviceInspectTaskMapper;
|
||||||
|
import com.glxp.api.entity.inv.DeviceInspectPlanDelectEntity;
|
||||||
|
import com.glxp.api.entity.inv.DeviceInspectTaskEntity;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import javax.annotation.Resource;
|
|
||||||
import java.util.List;
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.glxp.api.entity.inv.DeviceInspectTaskDetail;
|
import com.glxp.api.entity.inv.DeviceInspectTaskDetailEntity;
|
||||||
import com.glxp.api.dao.inv.DeviceInspectTaskDetailMapper;
|
import com.glxp.api.dao.inv.DeviceInspectTaskDetailMapper;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
public class DeviceInspectTaskDetailService extends ServiceImpl<DeviceInspectTaskDetailMapper, DeviceInspectTaskDetail> {
|
public class DeviceInspectTaskDetailService extends ServiceImpl<DeviceInspectTaskDetailMapper, DeviceInspectTaskDetailEntity> {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private DeviceInspectTaskDetailMapper deviceInspectTaskDetailMapper;
|
||||||
|
|
||||||
|
public Boolean addDeviceInspectTaskDelect(DeviceInspectTaskDetailEntity deviceInspectTaskDetailEntity){
|
||||||
|
deviceInspectTaskDetailEntity.setUpdateTime(new Date());
|
||||||
|
deviceInspectTaskDetailMapper.insert(deviceInspectTaskDetailEntity);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Boolean addDeviceInspectTaskDelectList(List<DeviceInspectTaskDetailEntity> deviceInspectTaskDetailEntityList){
|
||||||
|
deviceInspectTaskDetailMapper.insertBatch(deviceInspectTaskDetailEntityList);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public List<DeviceInspectTaskDetailEntity> selectDeviceInspectTakeDetail(DeviceInspectTaskDetailEntity deviceInspectTaskDetailEntity) {
|
||||||
|
|
||||||
|
QueryWrapper<DeviceInspectTaskDetailEntity> ew = new QueryWrapper<>();
|
||||||
|
if(deviceInspectTaskDetailEntity.getProjectCode() != null){
|
||||||
|
ew.eq("projectCode",deviceInspectTaskDetailEntity.getProjectCode());
|
||||||
|
}
|
||||||
|
if(deviceInspectTaskDetailEntity.getId() != null){
|
||||||
|
ew.eq("id",deviceInspectTaskDetailEntity.getId());
|
||||||
|
}
|
||||||
|
if(deviceInspectTaskDetailEntity.getTaskOrderIdFk() != null){
|
||||||
|
ew.eq("taskOrderIdFk",deviceInspectTaskDetailEntity.getTaskOrderIdFk());
|
||||||
|
}
|
||||||
|
if(deviceInspectTaskDetailEntity.getStatus() != null){
|
||||||
|
ew.like("status",deviceInspectTaskDetailEntity.getStatus());
|
||||||
|
}
|
||||||
|
ew.select("*, ( SELECT `employeeName` FROM auth_user WHERE id = device_inspect_task_detail.inspectUser ) inspectName");
|
||||||
|
List<DeviceInspectTaskDetailEntity> deviceInspectPlanDelectEntities=deviceInspectTaskDetailMapper.selectList(ew);
|
||||||
|
return deviceInspectPlanDelectEntities;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Boolean uploadDeviceInspecTakeDetail(DeviceInspectTaskDetailEntity deviceInspectTaskDetailEntityList){
|
||||||
|
return deviceInspectTaskDetailMapper.updateById(deviceInspectTaskDetailEntityList) > 0 ? true : false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,42 @@
|
|||||||
package com.glxp.api.service.inv;
|
package com.glxp.api.service.inv;
|
||||||
|
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
|
import com.glxp.api.req.inv.FilterDeviceInspectPlanRequest;
|
||||||
|
import com.glxp.api.req.inv.FilterDeviceInspectTakeRequest;
|
||||||
|
import com.glxp.api.res.inv.DeviceInspectPlanResponse;
|
||||||
|
import com.glxp.api.res.inv.DeviceInspectTakeResponse;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import javax.annotation.Resource;
|
|
||||||
import java.util.List;
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.glxp.api.dao.inv.DeviceInspectTaskMapper;
|
import com.glxp.api.dao.inv.DeviceInspectTaskMapper;
|
||||||
import com.glxp.api.entity.inv.DeviceInspectTask;
|
import com.glxp.api.entity.inv.DeviceInspectTaskEntity;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
public class DeviceInspectTaskService extends ServiceImpl<DeviceInspectTaskMapper, DeviceInspectTask> {
|
public class DeviceInspectTaskService extends ServiceImpl<DeviceInspectTaskMapper, DeviceInspectTaskEntity> {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private DeviceInspectTaskMapper deviceInspectTaskMapper;
|
||||||
|
|
||||||
|
public Boolean addDeviceInspectTask(DeviceInspectTaskEntity deviceInspectTaskEntity){
|
||||||
|
deviceInspectTaskEntity.setUpdateTime(new Date());
|
||||||
|
deviceInspectTaskMapper.insert(deviceInspectTaskEntity);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public List<DeviceInspectTakeResponse> filterList(FilterDeviceInspectTakeRequest filterDeviceInspectTakeRequest) {
|
||||||
|
if (null == filterDeviceInspectTakeRequest) {
|
||||||
|
return Collections.emptyList();
|
||||||
|
}
|
||||||
|
if (null != filterDeviceInspectTakeRequest.getPage() && null != filterDeviceInspectTakeRequest.getLimit()) {
|
||||||
|
PageHelper.offsetPage((filterDeviceInspectTakeRequest.getPage() - 1) * filterDeviceInspectTakeRequest.getLimit(), filterDeviceInspectTakeRequest.getLimit());
|
||||||
|
}
|
||||||
|
return deviceInspectTaskMapper.filterList(filterDeviceInspectTakeRequest);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,56 @@
|
|||||||
|
package com.glxp.api.service.inv.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.glxp.api.dao.inv.DeviceInspectPlanDelectMapper;
|
||||||
|
import com.glxp.api.entity.inv.DeviceInspectPlanDelectEntity;
|
||||||
|
import com.glxp.api.service.inv.DeviceInspectPlanDelectService;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class DeviceInspectPlanDelectServiceImpl extends ServiceImpl<DeviceInspectPlanDelectMapper, DeviceInspectPlanDelectEntity> implements DeviceInspectPlanDelectService {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
DeviceInspectPlanDelectMapper deviceInspectPlanDelectMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<DeviceInspectPlanDelectEntity> selectDeviceInspectPlanDelect(DeviceInspectPlanDelectEntity deviceInspectPlanDelectEntity) {
|
||||||
|
|
||||||
|
QueryWrapper<DeviceInspectPlanDelectEntity> ew = new QueryWrapper<>();
|
||||||
|
if(deviceInspectPlanDelectEntity.getOrderIdFk() != null){
|
||||||
|
ew.eq("orderIdFk",deviceInspectPlanDelectEntity.getOrderIdFk());
|
||||||
|
}
|
||||||
|
if(deviceInspectPlanDelectEntity.getId() != null){
|
||||||
|
ew.eq("id",deviceInspectPlanDelectEntity.getId());
|
||||||
|
}
|
||||||
|
if(deviceInspectPlanDelectEntity.getCode() != null){
|
||||||
|
ew.eq("code",deviceInspectPlanDelectEntity.getCode());
|
||||||
|
}
|
||||||
|
if(deviceInspectPlanDelectEntity.getContent() != null){
|
||||||
|
ew.like("content",deviceInspectPlanDelectEntity.getContent());
|
||||||
|
}
|
||||||
|
if(deviceInspectPlanDelectEntity.getType() != null){
|
||||||
|
ew.eq("type",deviceInspectPlanDelectEntity.getType());
|
||||||
|
}
|
||||||
|
List<DeviceInspectPlanDelectEntity> deviceInspectPlanDelectEntities=deviceInspectPlanDelectMapper.selectList(ew);
|
||||||
|
return deviceInspectPlanDelectEntities;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Boolean addDeviceInspectPlanDelectEntity(DeviceInspectPlanDelectEntity deviceInspectPlanDelectEntity) {
|
||||||
|
return deviceInspectPlanDelectMapper.insert(deviceInspectPlanDelectEntity) > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Boolean uploadDeviceInspectPlanDelectEntity(DeviceInspectPlanDelectEntity deviceInspectPlanDelectEntity) {
|
||||||
|
return deviceInspectPlanDelectMapper.updateById(deviceInspectPlanDelectEntity) > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Boolean delectDeviceInspectPlanDelectEntity(DeviceInspectPlanDelectEntity deviceInspectPlanDelectEntity) {
|
||||||
|
return deviceInspectPlanDelectMapper.deleteById(deviceInspectPlanDelectEntity) > 0;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,16 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.glxp.api.dao.inv.DeviceInspectPlanDelectMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="com.glxp.api.entity.inv.DeviceInspectPlanDelectEntity">
|
||||||
|
|
||||||
|
<id column="id" jdbcType="INTEGER" property="id" />
|
||||||
|
<result column="orderIdFk" jdbcType="VARCHAR" property="orderIdFk" />
|
||||||
|
<result column="code" jdbcType="VARCHAR" property="code" />
|
||||||
|
<result column="content" jdbcType="VARCHAR" property="content" />
|
||||||
|
<result column="type" jdbcType="INTEGER" property="type" />
|
||||||
|
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
||||||
|
<result column="updateUser" jdbcType="VARCHAR" property="updateUser" />
|
||||||
|
<result column="updateTime" jdbcType="TIMESTAMP" property="updateTime" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
</mapper>
|
Loading…
Reference in New Issue