起重机械调整
This commit is contained in:
parent
0e6c16340b
commit
94af58bf6c
@ -63,7 +63,7 @@ public class EntLiftingDeviceController {
|
||||
public Result<IPage<LiftingDevice>> queryPageList(@ApiIgnore @RequestBody Map<String, Object> map) {
|
||||
QueryWrapper<LiftingDevice> queryWrapper = QueryGenerator.initPageQueryWrapper(LiftingDevice.class, map);
|
||||
Page<LiftingDevice> page = PageUtil.getPage(map);
|
||||
IPage<LiftingDevice> pageList = liftingDeviceService.page(page, queryWrapper);
|
||||
IPage<LiftingDevice> pageList = liftingDeviceService.pageList(page, queryWrapper);
|
||||
return Result.success(pageList);
|
||||
}
|
||||
|
||||
@ -116,6 +116,10 @@ public class EntLiftingDeviceController {
|
||||
result.error500("有未通过的申请,请通过后再提交申请");
|
||||
return result;
|
||||
}
|
||||
if (liftingDevice.getEquipmentType() == 6 && (liftingDeviceExamineVo.getType() == 5 || liftingDeviceExamineVo.getType() == 4)) {
|
||||
result.error500("设备已安装,请先拆卸再申请!");
|
||||
return result;
|
||||
}
|
||||
boolean apply = liftingDeviceService.apply(liftingDeviceExamineVo);
|
||||
if (apply) {
|
||||
result.success("修改成功!");
|
||||
|
||||
@ -2,6 +2,7 @@ package com.zhgd.xmgl.modules.basicdata.controller.government;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.zhgd.annotation.OperLog;
|
||||
import com.zhgd.jeecg.common.api.vo.Result;
|
||||
@ -24,6 +25,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@ -63,13 +65,20 @@ public class GovLiftingDeviceController {
|
||||
})
|
||||
@PostMapping(value = "/page")
|
||||
public Result<IPage<LiftingDevice>> queryPageList(@ApiIgnore @RequestBody Map<String, Object> map) {
|
||||
QueryWrapper<LiftingDevice> queryWrapper = QueryGenerator.initPageQueryWrapper(LiftingDevice.class, map);
|
||||
Page<LiftingDevice> page = PageUtil.getPage(map);
|
||||
Integer identification = MapUtils.getInteger(map, "identification");
|
||||
Integer equipmentType = MapUtils.getInteger(map, "equipmentType");
|
||||
QueryWrapper<LiftingDevice> queryWrapper = Wrappers.<LiftingDevice>query();
|
||||
Page<LiftingDevice> page = PageUtil.getPage(map);
|
||||
if (identification != null && identification == 6) {
|
||||
queryWrapper.in("identification", "6,7");
|
||||
map.put("identification" , null);
|
||||
queryWrapper.lambda().in(LiftingDevice::getIdentification, Arrays.asList(6,7));
|
||||
}
|
||||
IPage<LiftingDevice> pageList = liftingDeviceService.page(page, queryWrapper);
|
||||
if (equipmentType != null && equipmentType == 6) {
|
||||
map.put("equipmentType" , null);
|
||||
queryWrapper.lambda().in(LiftingDevice::getEquipmentType, Arrays.asList(6,7));
|
||||
}
|
||||
queryWrapper = QueryGenerator.initPageQueryWrapper(LiftingDevice.class, map);
|
||||
IPage<LiftingDevice> pageList = liftingDeviceService.pageList(page, queryWrapper);
|
||||
return Result.success(pageList);
|
||||
}
|
||||
|
||||
|
||||
@ -67,7 +67,7 @@ public class LiftingDeviceController {
|
||||
if (StringUtils.isNotBlank(MapUtils.getString(map, ParamConstants.PROJECT_SN))) {
|
||||
queryWrapper.lambda().eq(LiftingDevice::getEngineeringSn, StrUtil.EMPTY);
|
||||
}
|
||||
IPage<LiftingDevice> pageList = liftingDeviceService.page(page, queryWrapper);
|
||||
IPage<LiftingDevice> pageList = liftingDeviceService.pageList(page, queryWrapper);
|
||||
return Result.success(pageList);
|
||||
}
|
||||
|
||||
|
||||
@ -112,10 +112,10 @@ public class LiftingDevice implements Serializable {
|
||||
@ApiModelProperty(value = "是否原购产品(1:是,0不是)")
|
||||
private Integer theShipper;
|
||||
/**
|
||||
* 设备状态(0:提交未审核1:正常,2:临期,3:延期,4:注销禁用,5:报废)
|
||||
* 设备状态(0:提交未审核 1:产权备案,2:临期,3:延期,4:报废,5:注销禁用;6:安装;7:拆卸)
|
||||
*/
|
||||
@Excel(name = "设备状态(0:提交未审核 ;1:正常,2:临期,3:延期,4:注销禁用,5:报废)", width = 15)
|
||||
@ApiModelProperty(value = "设备状态(0:提交未审核 1:正常,2:临期,3:延期,4:注销禁用,5:报废)")
|
||||
@Excel(name = "设备状态(0:提交未审核 1:产权备案,2:临期,3:延期,4:报废,5:注销禁用;6:安装;7:拆卸)", width = 15)
|
||||
@ApiModelProperty(value = "设备状态(0:提交未审核 1:产权备案,2:临期,3:延期,4:报废,5:注销禁用;6:安装;7:拆卸)")
|
||||
private Integer equipmentType;
|
||||
/**
|
||||
* 设备使用状态(0:闲置,1:在用)
|
||||
@ -184,7 +184,7 @@ public class LiftingDevice implements Serializable {
|
||||
*/
|
||||
@Excel(name = "设备用途(1:自用,2:租赁)", width = 15)
|
||||
@ApiModelProperty(value = "设备用途(1:自用,2:租赁)")
|
||||
private String equipmentUseType;
|
||||
private Integer equipmentUseType;
|
||||
/**
|
||||
* 产权申请表
|
||||
*/
|
||||
@ -300,9 +300,9 @@ public class LiftingDevice implements Serializable {
|
||||
@ApiModelProperty(value = "制造许可证编号")
|
||||
private String manufacturingLicense;
|
||||
/**
|
||||
* 申请标识,0正常,1产权备案,2安装,3:拆卸; 4延期,5:遗失补证 6:报废 7注销
|
||||
* 申请标识,申请标识 0:正常;1:产权备案;2:延期;3:遗失补证;4:报废;5:注销;6:安装;7:拆卸
|
||||
*/
|
||||
@Excel(name = "申请标识 0正常,1产权备案,2安装,3:拆卸; 4延期,5:遗失补证 6:报废 7注销", width = 15)
|
||||
@Excel(name = "申请标识 申请标识 0:正常;1:产权备案;2:延期;3:遗失补证;4:报废;5:注销;6:安装;7:拆卸", width = 15)
|
||||
@ApiModelProperty(value = "申请标识 0:正常;1:产权备案;2:延期;3:遗失补证;4:报废;5:注销;6:安装;7:拆卸")
|
||||
private Integer identification;
|
||||
/**
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
package com.zhgd.xmgl.modules.safety.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.zhgd.xmgl.modules.safety.dto.LiftingDeviceExamineDto;
|
||||
import com.zhgd.xmgl.modules.safety.entity.LiftingDevice;
|
||||
@ -15,6 +17,8 @@ import com.zhgd.xmgl.modules.safety.vo.LiftingDeviceVo;
|
||||
*/
|
||||
public interface ILiftingDeviceService extends IService<LiftingDevice> {
|
||||
|
||||
Page<LiftingDevice> pageList(Page page, QueryWrapper<LiftingDevice> wrapper);
|
||||
|
||||
boolean saveInfo(LiftingDeviceVo liftingDeviceVo);
|
||||
|
||||
boolean examine(LiftingDeviceExamineVo liftingDeviceExamineVo);
|
||||
|
||||
@ -29,6 +29,6 @@ public class LiftingDeviceExamineServiceImpl extends ServiceImpl<LiftingDeviceEx
|
||||
@Override
|
||||
public List<AnnexFile> queryAnnexFile(Long id) {
|
||||
return annexFileService.list(Wrappers.<AnnexFile>lambdaQuery().eq(AnnexFile::getRelevanceId, id)
|
||||
.eq(AnnexFile::getFileType, ParamEnum.AnnexFileType.LIFTER_DEVICE_EXAMINE));
|
||||
.eq(AnnexFile::getFileType, ParamEnum.AnnexFileType.LIFTER_DEVICE_EXAMINE.getValue()));
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,8 +1,10 @@
|
||||
package com.zhgd.xmgl.modules.safety.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.zhgd.xmgl.modules.basicdata.entity.AnnexFile;
|
||||
import com.zhgd.xmgl.modules.basicdata.entity.Engineering;
|
||||
@ -57,6 +59,12 @@ public class LiftingDeviceServiceImpl extends ServiceImpl<LiftingDeviceMapper, L
|
||||
@Autowired
|
||||
private IEngineeringService engineeringService;
|
||||
|
||||
@Override
|
||||
public Page<LiftingDevice> pageList(Page page, QueryWrapper<LiftingDevice> wrapper) {
|
||||
wrapper.lambda().orderByDesc(LiftingDevice::getCreateTime);
|
||||
return baseMapper.selectPage(page, wrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean saveInfo(LiftingDeviceVo liftingDeviceVo) {
|
||||
SecurityUser user = SecurityUtil.getUser();
|
||||
@ -93,7 +101,7 @@ public class LiftingDeviceServiceImpl extends ServiceImpl<LiftingDeviceMapper, L
|
||||
liftingDeviceUse.setId(liftingDeviceExamineVo.getId());
|
||||
liftingDeviceUseService.updateById(liftingDeviceUse);
|
||||
if (liftingDeviceExamineVo.getState() == 1) {
|
||||
updateWrapper.set(LiftingDevice::getEquipmentType, getEquipmentType(liftingDeviceExamineVo.getType()));
|
||||
updateWrapper.set(LiftingDevice::getEquipmentType, liftingDeviceExamineVo.getType());
|
||||
updateWrapper.set(LiftingDevice::getEquipmentUse, liftingDeviceExamineVo.getType() == 6 ? 1 : 0);
|
||||
if (liftingDeviceExamineVo.getType() == 6) {
|
||||
updateWrapper.set(LiftingDevice::getEngineeringSn, liftingDeviceUse.getEngineeringSn());
|
||||
@ -114,8 +122,11 @@ public class LiftingDeviceServiceImpl extends ServiceImpl<LiftingDeviceMapper, L
|
||||
wrapper.eq(LiftingDeviceExamine::getType, liftingDeviceExamineVo.getType());
|
||||
liftingDeviceExamineService.update(wrapper);
|
||||
if (liftingDeviceExamineVo.getState() == 1) {
|
||||
updateWrapper.set(LiftingDevice::getEquipmentType, getEquipmentType(liftingDeviceExamineVo.getType()));
|
||||
updateWrapper.set(LiftingDevice::getEquipmentType, liftingDeviceExamineVo.getType());
|
||||
updateWrapper.set(LiftingDevice::getIsInitiate, 1);
|
||||
buildProjectInspectNumber(liftingDeviceExamineVo);
|
||||
} else {
|
||||
updateWrapper.set(LiftingDevice::getEquipmentType, -1);
|
||||
}
|
||||
} else {
|
||||
// 其他审批
|
||||
@ -127,8 +138,10 @@ public class LiftingDeviceServiceImpl extends ServiceImpl<LiftingDeviceMapper, L
|
||||
wrapper.set(LiftingDeviceExamine::getExamineBy, user.getUserId());
|
||||
wrapper.eq(LiftingDeviceExamine::getId, liftingDeviceExamineVo.getId());
|
||||
liftingDeviceExamineService.update(wrapper);
|
||||
if (liftingDeviceExamineVo.getState() == 1) {
|
||||
updateWrapper.set(LiftingDevice::getEquipmentType, getEquipmentType(liftingDeviceExamineVo.getType()));
|
||||
if (liftingDeviceExamineVo.getState() == 1 && liftingDeviceExamineVo.getType() != 3 && liftingDeviceExamineVo.getType() != 2) {
|
||||
updateWrapper.set(LiftingDevice::getEquipmentType, liftingDeviceExamineVo.getType());
|
||||
updateWrapper.set(LiftingDevice::getIsInitiate, 2);
|
||||
updateWrapper.set(LiftingDevice::getEquipmentUse, 0);
|
||||
}
|
||||
}
|
||||
updateWrapper.set(LiftingDevice::getIdentification, 0);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user