优化
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
package org.dromara.machinery.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
@ -86,7 +86,7 @@ public interface IBusMachineryDetailService extends IService<BusMachineryDetail>
|
||||
* @param req 机械详情查询条件
|
||||
* @return 机械详情查询条件封装
|
||||
*/
|
||||
QueryWrapper<BusMachineryDetail> getQueryWrapper(MachineryDetailQueryReq req);
|
||||
LambdaQueryWrapper<BusMachineryDetail> buildQuery(MachineryDetailQueryReq req);
|
||||
|
||||
/**
|
||||
* 获取机械详情分页对象视图
|
||||
|
@ -1,6 +1,6 @@
|
||||
package org.dromara.machinery.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
@ -86,7 +86,7 @@ public interface IBusMachineryService extends IService<BusMachinery> {
|
||||
* @param req 机械查询条件
|
||||
* @return 机械查询条件封装
|
||||
*/
|
||||
QueryWrapper<BusMachinery> getQueryWrapper(MachineryQueryReq req);
|
||||
LambdaQueryWrapper<BusMachinery> buildQuery(MachineryQueryReq req);
|
||||
|
||||
/**
|
||||
* 获取机械分页对象视图
|
||||
|
@ -1,6 +1,7 @@
|
||||
package org.dromara.machinery.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
@ -77,7 +78,7 @@ public class BusMachineryDetailServiceImpl extends ServiceImpl<BusMachineryDetai
|
||||
@Override
|
||||
public TableDataInfo<BusMachineryDetailVo> queryPageList(MachineryDetailQueryReq req, PageQuery pageQuery) {
|
||||
// 查询数据库
|
||||
Page<BusMachineryDetail> result = this.page(pageQuery.build(), this.getQueryWrapper(req));
|
||||
Page<BusMachineryDetail> result = this.page(pageQuery.build(), this.buildQuery(req));
|
||||
return TableDataInfo.build(this.getVoPage(result));
|
||||
}
|
||||
|
||||
@ -89,8 +90,8 @@ public class BusMachineryDetailServiceImpl extends ServiceImpl<BusMachineryDetai
|
||||
*/
|
||||
@Override
|
||||
public List<BusMachineryDetailVo> queryList(MachineryDetailQueryReq req) {
|
||||
QueryWrapper<BusMachineryDetail> queryWrapper = this.getQueryWrapper(req);
|
||||
List<BusMachineryDetail> list = this.list(queryWrapper);
|
||||
LambdaQueryWrapper<BusMachineryDetail> lqw = this.buildQuery(req);
|
||||
List<BusMachineryDetail> list = this.list(lqw);
|
||||
return list.stream().map(this::getVo).toList();
|
||||
}
|
||||
|
||||
@ -214,10 +215,10 @@ public class BusMachineryDetailServiceImpl extends ServiceImpl<BusMachineryDetai
|
||||
* @return 机械详情查询条件封装
|
||||
*/
|
||||
@Override
|
||||
public QueryWrapper<BusMachineryDetail> getQueryWrapper(MachineryDetailQueryReq req) {
|
||||
QueryWrapper<BusMachineryDetail> queryWrapper = new QueryWrapper<>();
|
||||
public LambdaQueryWrapper<BusMachineryDetail> buildQuery(MachineryDetailQueryReq req) {
|
||||
LambdaQueryWrapper<BusMachineryDetail> lqw = new LambdaQueryWrapper<>();
|
||||
if (req == null) {
|
||||
return queryWrapper;
|
||||
return lqw;
|
||||
}
|
||||
// 从对象中取值
|
||||
Long id = req.getId();
|
||||
@ -230,17 +231,17 @@ public class BusMachineryDetailServiceImpl extends ServiceImpl<BusMachineryDetai
|
||||
String remark = req.getRemark();
|
||||
Long machineryId = req.getMachineryId();
|
||||
// 模糊查询
|
||||
queryWrapper.like(StringUtils.isNotBlank(checkoutNumber), "checkout_number", checkoutNumber);
|
||||
queryWrapper.like(StringUtils.isNotBlank(checkoutUnit), "checkout_unit", checkoutUnit);
|
||||
queryWrapper.like(StringUtils.isNotBlank(checkoutDate), "checkout_date", checkoutDate);
|
||||
queryWrapper.like(StringUtils.isNotBlank(remark), "remark", remark);
|
||||
lqw.like(StringUtils.isNotBlank(checkoutNumber), BusMachineryDetail::getCheckoutNumber, checkoutNumber);
|
||||
lqw.like(StringUtils.isNotBlank(checkoutUnit), BusMachineryDetail::getCheckoutUnit, checkoutUnit);
|
||||
lqw.like(StringUtils.isNotBlank(checkoutDate), BusMachineryDetail::getCheckoutDate, checkoutDate);
|
||||
lqw.like(StringUtils.isNotBlank(remark), BusMachineryDetail::getRemark, remark);
|
||||
// 精确查询
|
||||
queryWrapper.eq(ObjectUtils.isNotEmpty(id), "id", id);
|
||||
queryWrapper.eq(ObjectUtils.isNotEmpty(status), "status", status);
|
||||
queryWrapper.eq(ObjectUtils.isNotEmpty(type), "type", type);
|
||||
queryWrapper.eq(ObjectUtils.isNotEmpty(entryTime), "entryTime", entryTime);
|
||||
queryWrapper.eq(ObjectUtils.isNotEmpty(machineryId), "machinery_id", machineryId);
|
||||
return queryWrapper;
|
||||
lqw.eq(ObjectUtils.isNotEmpty(id), BusMachineryDetail::getId, id);
|
||||
lqw.eq(ObjectUtils.isNotEmpty(status), BusMachineryDetail::getStatus, status);
|
||||
lqw.eq(ObjectUtils.isNotEmpty(type), BusMachineryDetail::getType, type);
|
||||
lqw.eq(ObjectUtils.isNotEmpty(entryTime), BusMachineryDetail::getEntryTime, entryTime);
|
||||
lqw.eq(ObjectUtils.isNotEmpty(machineryId), BusMachineryDetail::getMachineryId, machineryId);
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2,6 +2,7 @@ package org.dromara.machinery.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
@ -73,7 +74,7 @@ public class BusMachineryServiceImpl extends ServiceImpl<BusMachineryMapper, Bus
|
||||
@Override
|
||||
public TableDataInfo<BusMachineryVo> queryPageList(MachineryQueryReq req, PageQuery pageQuery) {
|
||||
// 查询数据库
|
||||
Page<BusMachinery> result = this.page(pageQuery.build(), this.getQueryWrapper(req));
|
||||
Page<BusMachinery> result = this.page(pageQuery.build(), this.buildQuery(req));
|
||||
return TableDataInfo.build(this.getVoPage(result));
|
||||
}
|
||||
|
||||
@ -85,8 +86,8 @@ public class BusMachineryServiceImpl extends ServiceImpl<BusMachineryMapper, Bus
|
||||
*/
|
||||
@Override
|
||||
public List<BusMachineryVo> queryList(MachineryQueryReq req) {
|
||||
QueryWrapper<BusMachinery> queryWrapper = this.getQueryWrapper(req);
|
||||
List<BusMachinery> list = this.list(queryWrapper);
|
||||
LambdaQueryWrapper<BusMachinery> lqw = this.buildQuery(req);
|
||||
List<BusMachinery> list = this.list(lqw);
|
||||
return list.stream().map(this::getVo).toList();
|
||||
}
|
||||
|
||||
@ -209,10 +210,10 @@ public class BusMachineryServiceImpl extends ServiceImpl<BusMachineryMapper, Bus
|
||||
* @return 机械查询条件封装
|
||||
*/
|
||||
@Override
|
||||
public QueryWrapper<BusMachinery> getQueryWrapper(MachineryQueryReq req) {
|
||||
QueryWrapper<BusMachinery> queryWrapper = new QueryWrapper<>();
|
||||
public LambdaQueryWrapper<BusMachinery> buildQuery(MachineryQueryReq req) {
|
||||
LambdaQueryWrapper<BusMachinery> lqw = new LambdaQueryWrapper<>();
|
||||
if (req == null) {
|
||||
return queryWrapper;
|
||||
return lqw;
|
||||
}
|
||||
// 从对象中取值
|
||||
Long id = req.getId();
|
||||
@ -223,15 +224,15 @@ public class BusMachineryServiceImpl extends ServiceImpl<BusMachineryMapper, Bus
|
||||
String principal = req.getPrincipal();
|
||||
String remark = req.getRemark();
|
||||
// 模糊查询
|
||||
queryWrapper.like(StringUtils.isNotBlank(machineryName), "machinery_name", machineryName);
|
||||
queryWrapper.like(StringUtils.isNotBlank(principal), "principal", principal);
|
||||
queryWrapper.like(StringUtils.isNotBlank(machineryNumber), "machinery_number", machineryNumber);
|
||||
queryWrapper.like(StringUtils.isNotBlank(remark), "remark", remark);
|
||||
lqw.like(StringUtils.isNotBlank(machineryName), BusMachinery::getMachineryName, machineryName);
|
||||
lqw.like(StringUtils.isNotBlank(principal), BusMachinery::getPrincipal, principal);
|
||||
lqw.like(StringUtils.isNotBlank(machineryNumber), BusMachinery::getMachineryNumber, machineryNumber);
|
||||
lqw.like(StringUtils.isNotBlank(remark), BusMachinery::getRemark, remark);
|
||||
// 精确查询
|
||||
queryWrapper.eq(ObjectUtils.isNotEmpty(id), "id", id);
|
||||
queryWrapper.eq(ObjectUtils.isNotEmpty(projectId), "project_id", projectId);
|
||||
queryWrapper.eq(ObjectUtils.isNotEmpty(number), "number", number);
|
||||
return queryWrapper;
|
||||
lqw.eq(ObjectUtils.isNotEmpty(id), BusMachinery::getId, id);
|
||||
lqw.eq(ObjectUtils.isNotEmpty(projectId), BusMachinery::getProjectId, projectId);
|
||||
lqw.eq(ObjectUtils.isNotEmpty(number), BusMachinery::getNumber, number);
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1,6 +1,6 @@
|
||||
package org.dromara.materials.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
@ -78,7 +78,7 @@ public interface IBusCompanyService extends IService<BusCompany> {
|
||||
* @param req 查询条件
|
||||
* @return 查询条件封装
|
||||
*/
|
||||
QueryWrapper<BusCompany> getQueryWrapper(CompanyQueryReq req);
|
||||
LambdaQueryWrapper<BusCompany> buildQuery(CompanyQueryReq req);
|
||||
|
||||
/**
|
||||
* 获取公司分页对象视图
|
||||
|
@ -1,6 +1,6 @@
|
||||
package org.dromara.materials.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
@ -86,7 +86,7 @@ public interface IBusMaterialsInventoryService extends IService<BusMaterialsInve
|
||||
* @param req 查询条件
|
||||
* @return 查询条件封装
|
||||
*/
|
||||
QueryWrapper<BusMaterialsInventory> getQueryWrapper(MaterialsInventoryQueryReq req);
|
||||
LambdaQueryWrapper<BusMaterialsInventory> buildQuery(MaterialsInventoryQueryReq req);
|
||||
|
||||
/**
|
||||
* 获取材料出/入库分页对象视图
|
||||
|
@ -1,6 +1,6 @@
|
||||
package org.dromara.materials.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
@ -86,7 +86,7 @@ public interface IBusMaterialsService extends IService<BusMaterials> {
|
||||
* @param req 查询条件
|
||||
* @return 查询条件封装
|
||||
*/
|
||||
QueryWrapper<BusMaterials> getQueryWrapper(MaterialsQueryReq req);
|
||||
LambdaQueryWrapper<BusMaterials> buildQuery(MaterialsQueryReq req);
|
||||
|
||||
/**
|
||||
* 获取材料分页对象视图
|
||||
|
@ -70,7 +70,7 @@ public class BusCompanyServiceImpl extends ServiceImpl<BusCompanyMapper, BusComp
|
||||
@Override
|
||||
public TableDataInfo<BusCompanyVo> queryPageList(CompanyQueryReq req, PageQuery pageQuery) {
|
||||
// 查询数据库
|
||||
Page<BusCompany> result = this.page(pageQuery.build(), this.getQueryWrapper(req));
|
||||
Page<BusCompany> result = this.page(pageQuery.build(), this.buildQuery(req));
|
||||
return TableDataInfo.build(this.getCompanyVoPage(result));
|
||||
}
|
||||
|
||||
@ -82,8 +82,8 @@ public class BusCompanyServiceImpl extends ServiceImpl<BusCompanyMapper, BusComp
|
||||
*/
|
||||
@Override
|
||||
public List<BusCompanyVo> queryList(CompanyQueryReq req) {
|
||||
QueryWrapper<BusCompany> queryWrapper = this.getQueryWrapper(req);
|
||||
return baseMapper.selectVoList(queryWrapper);
|
||||
LambdaQueryWrapper<BusCompany> lqw = this.buildQuery(req);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -194,10 +194,10 @@ public class BusCompanyServiceImpl extends ServiceImpl<BusCompanyMapper, BusComp
|
||||
* @return 查询条件封装
|
||||
*/
|
||||
@Override
|
||||
public QueryWrapper<BusCompany> getQueryWrapper(CompanyQueryReq req) {
|
||||
QueryWrapper<BusCompany> queryWrapper = new QueryWrapper<>();
|
||||
public LambdaQueryWrapper<BusCompany> buildQuery(CompanyQueryReq req) {
|
||||
LambdaQueryWrapper<BusCompany> lqw = new LambdaQueryWrapper<>();
|
||||
if (req == null) {
|
||||
return queryWrapper;
|
||||
return lqw;
|
||||
}
|
||||
// 从对象中取值
|
||||
Long id = req.getId();
|
||||
@ -207,14 +207,14 @@ public class BusCompanyServiceImpl extends ServiceImpl<BusCompanyMapper, BusComp
|
||||
String remark = req.getRemark();
|
||||
String qualification = req.getQualification();
|
||||
// 模糊查询
|
||||
queryWrapper.like(StringUtils.isNotBlank(companyName), "company_name", companyName);
|
||||
queryWrapper.like(StringUtils.isNotBlank(qualification), "qualification", qualification);
|
||||
queryWrapper.like(StringUtils.isNotBlank(remark), "remark", remark);
|
||||
lqw.like(StringUtils.isNotBlank(companyName), BusCompany::getCompanyName, companyName);
|
||||
lqw.like(StringUtils.isNotBlank(qualification), BusCompany::getQualification, qualification);
|
||||
lqw.like(StringUtils.isNotBlank(remark), BusCompany::getRemark, remark);
|
||||
// 精确查询
|
||||
queryWrapper.eq(ObjectUtils.isNotEmpty(status), "status", status);
|
||||
queryWrapper.eq(ObjectUtils.isNotEmpty(id), "id", id);
|
||||
queryWrapper.eq(ObjectUtils.isNotEmpty(projectId), "project_id", projectId);
|
||||
return queryWrapper;
|
||||
lqw.eq(ObjectUtils.isNotEmpty(status), BusCompany::getStatus, status);
|
||||
lqw.eq(ObjectUtils.isNotEmpty(id), BusCompany::getId, id);
|
||||
lqw.eq(ObjectUtils.isNotEmpty(projectId), BusCompany::getProjectId, projectId);
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1,6 +1,7 @@
|
||||
package org.dromara.materials.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
@ -72,7 +73,7 @@ public class BusMaterialsInventoryServiceImpl extends ServiceImpl<BusMaterialsIn
|
||||
@Override
|
||||
public TableDataInfo<BusMaterialsInventoryVo> queryPageList(MaterialsInventoryQueryReq req, PageQuery pageQuery) {
|
||||
// 查询数据库
|
||||
Page<BusMaterialsInventory> result = this.page(pageQuery.build(), this.getQueryWrapper(req));
|
||||
Page<BusMaterialsInventory> result = this.page(pageQuery.build(), this.buildQuery(req));
|
||||
return TableDataInfo.build(this.getVoPage(result));
|
||||
}
|
||||
|
||||
@ -84,8 +85,8 @@ public class BusMaterialsInventoryServiceImpl extends ServiceImpl<BusMaterialsIn
|
||||
*/
|
||||
@Override
|
||||
public List<BusMaterialsInventoryVo> queryList(MaterialsInventoryQueryReq req) {
|
||||
QueryWrapper<BusMaterialsInventory> queryWrapper = this.getQueryWrapper(req);
|
||||
List<BusMaterialsInventory> list = this.list(queryWrapper);
|
||||
LambdaQueryWrapper<BusMaterialsInventory> lqw = this.buildQuery(req);
|
||||
List<BusMaterialsInventory> list = this.list(lqw);
|
||||
return list.stream().map(this::getVo).toList();
|
||||
}
|
||||
|
||||
@ -211,10 +212,10 @@ public class BusMaterialsInventoryServiceImpl extends ServiceImpl<BusMaterialsIn
|
||||
* @return 查询条件封装
|
||||
*/
|
||||
@Override
|
||||
public QueryWrapper<BusMaterialsInventory> getQueryWrapper(MaterialsInventoryQueryReq req) {
|
||||
QueryWrapper<BusMaterialsInventory> queryWrapper = new QueryWrapper<>();
|
||||
public LambdaQueryWrapper<BusMaterialsInventory> buildQuery(MaterialsInventoryQueryReq req) {
|
||||
LambdaQueryWrapper<BusMaterialsInventory> lqw = new LambdaQueryWrapper<>();
|
||||
if (req == null) {
|
||||
return queryWrapper;
|
||||
return lqw;
|
||||
}
|
||||
// 从对象中取值
|
||||
Long id = req.getId();
|
||||
@ -236,23 +237,23 @@ public class BusMaterialsInventoryServiceImpl extends ServiceImpl<BusMaterialsIn
|
||||
materialsQueryWrapper.select("id");
|
||||
materialsQueryWrapper.like("materials_name", materialsName);
|
||||
List<Long> materialsIdList = materialsService.listObjs(materialsQueryWrapper, obj -> (Long) obj);
|
||||
queryWrapper.in("materials_id", materialsIdList);
|
||||
lqw.in(BusMaterialsInventory::getMaterialsId, materialsIdList);
|
||||
}
|
||||
// 模糊查询
|
||||
queryWrapper.like(StringUtils.isNotBlank(operator), "operator", operator);
|
||||
queryWrapper.like(StringUtils.isNotBlank(remark), "remark", remark);
|
||||
queryWrapper.like(StringUtils.isNotBlank(disposition), "disposition", disposition);
|
||||
queryWrapper.like(StringUtils.isNotBlank(recipient), "recipient", recipient);
|
||||
queryWrapper.like(StringUtils.isNotBlank(shipper), "shipper", shipper);
|
||||
lqw.like(StringUtils.isNotBlank(operator), BusMaterialsInventory::getOperator, operator);
|
||||
lqw.like(StringUtils.isNotBlank(remark), BusMaterialsInventory::getRemark, remark);
|
||||
lqw.like(StringUtils.isNotBlank(disposition), BusMaterialsInventory::getDisposition, disposition);
|
||||
lqw.like(StringUtils.isNotBlank(recipient), BusMaterialsInventory::getRecipient, recipient);
|
||||
lqw.like(StringUtils.isNotBlank(shipper), BusMaterialsInventory::getShipper, shipper);
|
||||
// 精确查询
|
||||
queryWrapper.eq(ObjectUtils.isNotEmpty(id), "id", id);
|
||||
queryWrapper.eq(ObjectUtils.isNotEmpty(projectId), "project_id", projectId);
|
||||
queryWrapper.eq(ObjectUtils.isNotEmpty(materialsId), "materials_id", materialsId);
|
||||
queryWrapper.eq(ObjectUtils.isNotEmpty(number), "number", number);
|
||||
queryWrapper.eq(ObjectUtils.isNotEmpty(outPutTime), "out_put_time", outPutTime);
|
||||
queryWrapper.eq(ObjectUtils.isNotEmpty(residue), "residue", residue);
|
||||
queryWrapper.eq(ObjectUtils.isNotEmpty(outPut), "out_put", outPut);
|
||||
return queryWrapper;
|
||||
lqw.eq(ObjectUtils.isNotEmpty(id), BusMaterialsInventory::getId, id);
|
||||
lqw.eq(ObjectUtils.isNotEmpty(projectId), BusMaterialsInventory::getProjectId, projectId);
|
||||
lqw.eq(ObjectUtils.isNotEmpty(materialsId), BusMaterialsInventory::getMaterialsId, materialsId);
|
||||
lqw.eq(ObjectUtils.isNotEmpty(number), BusMaterialsInventory::getNumber, number);
|
||||
lqw.eq(ObjectUtils.isNotEmpty(outPutTime), BusMaterialsInventory::getOutPutTime, outPutTime);
|
||||
lqw.eq(ObjectUtils.isNotEmpty(residue), BusMaterialsInventory::getResidue, residue);
|
||||
lqw.eq(ObjectUtils.isNotEmpty(outPut), BusMaterialsInventory::getOutPut, outPut);
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -3,6 +3,7 @@ package org.dromara.materials.service.impl;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.json.JSONObject;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
@ -85,7 +86,7 @@ public class BusMaterialsServiceImpl extends ServiceImpl<BusMaterialsMapper, Bus
|
||||
@Override
|
||||
public TableDataInfo<BusMaterialsVo> queryPageList(MaterialsQueryReq req, PageQuery pageQuery) {
|
||||
// 查询数据库
|
||||
Page<BusMaterials> result = this.page(pageQuery.build(), this.getQueryWrapper(req));
|
||||
Page<BusMaterials> result = this.page(pageQuery.build(), this.buildQuery(req));
|
||||
return TableDataInfo.build(this.getMaterialsVoPage(result));
|
||||
}
|
||||
|
||||
@ -97,8 +98,8 @@ public class BusMaterialsServiceImpl extends ServiceImpl<BusMaterialsMapper, Bus
|
||||
*/
|
||||
@Override
|
||||
public List<BusMaterialsVo> queryList(MaterialsQueryReq req) {
|
||||
QueryWrapper<BusMaterials> queryWrapper = this.getQueryWrapper(req);
|
||||
return baseMapper.selectVoList(queryWrapper);
|
||||
LambdaQueryWrapper<BusMaterials> lqw = this.buildQuery(req);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -246,10 +247,10 @@ public class BusMaterialsServiceImpl extends ServiceImpl<BusMaterialsMapper, Bus
|
||||
* @return 查询条件封装
|
||||
*/
|
||||
@Override
|
||||
public QueryWrapper<BusMaterials> getQueryWrapper(MaterialsQueryReq req) {
|
||||
QueryWrapper<BusMaterials> queryWrapper = new QueryWrapper<>();
|
||||
public LambdaQueryWrapper<BusMaterials> buildQuery(MaterialsQueryReq req) {
|
||||
LambdaQueryWrapper<BusMaterials> lqw = new LambdaQueryWrapper<>();
|
||||
if (req == null) {
|
||||
return queryWrapper;
|
||||
return lqw;
|
||||
}
|
||||
// 从对象中取值
|
||||
Long id = req.getId();
|
||||
@ -263,18 +264,18 @@ public class BusMaterialsServiceImpl extends ServiceImpl<BusMaterialsMapper, Bus
|
||||
String quantityCount = req.getQuantityCount();
|
||||
String status = req.getStatus();
|
||||
// 模糊查询
|
||||
queryWrapper.like(StringUtils.isNotBlank(materialsName), "materials_name", materialsName);
|
||||
queryWrapper.like(StringUtils.isNotBlank(typeSpecificationName), "type_specification_name", typeSpecificationName);
|
||||
queryWrapper.like(StringUtils.isNotBlank(usePart), "use_part", usePart);
|
||||
queryWrapper.like(StringUtils.isNotBlank(remark), "remark", remark);
|
||||
queryWrapper.like(StringUtils.isNotBlank(weightId), "weight_id", weightId);
|
||||
queryWrapper.like(StringUtils.isNotBlank(quantityCount), "quantity_count", quantityCount);
|
||||
lqw.like(StringUtils.isNotBlank(materialsName), BusMaterials::getMaterialsName, materialsName);
|
||||
lqw.like(StringUtils.isNotBlank(typeSpecificationName), BusMaterials::getTypeSpecificationName, typeSpecificationName);
|
||||
lqw.like(StringUtils.isNotBlank(usePart), BusMaterials::getUsePart, usePart);
|
||||
lqw.like(StringUtils.isNotBlank(remark), BusMaterials::getRemark, remark);
|
||||
lqw.like(StringUtils.isNotBlank(weightId), BusMaterials::getWeightId, weightId);
|
||||
lqw.like(StringUtils.isNotBlank(quantityCount), BusMaterials::getQuantityCount, quantityCount);
|
||||
// 精确查询
|
||||
queryWrapper.eq(ObjectUtils.isNotEmpty(status), "status", status);
|
||||
queryWrapper.eq(ObjectUtils.isNotEmpty(id), "id", id);
|
||||
queryWrapper.eq(ObjectUtils.isNotEmpty(projectId), "project_id", projectId);
|
||||
queryWrapper.eq(ObjectUtils.isNotEmpty(companyId), "company_id", companyId);
|
||||
return queryWrapper;
|
||||
lqw.eq(ObjectUtils.isNotEmpty(status), BusMaterials::getStatus, status);
|
||||
lqw.eq(ObjectUtils.isNotEmpty(id), BusMaterials::getId, id);
|
||||
lqw.eq(ObjectUtils.isNotEmpty(projectId), BusMaterials::getProjectId, projectId);
|
||||
lqw.eq(ObjectUtils.isNotEmpty(companyId), BusMaterials::getCompanyId, companyId);
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1,6 +1,6 @@
|
||||
package org.dromara.project.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
@ -86,7 +86,7 @@ public interface IBusConstructionUserService extends IService<BusConstructionUse
|
||||
* @param req 查询条件
|
||||
* @return 查询条件封装
|
||||
*/
|
||||
QueryWrapper<BusConstructionUser> getQueryWrapper(ConstructionUserQueryReq req);
|
||||
LambdaQueryWrapper<BusConstructionUser> buildQuery(ConstructionUserQueryReq req);
|
||||
|
||||
/**
|
||||
* 获取施工人员分页对象视图
|
||||
|
@ -1,6 +1,6 @@
|
||||
package org.dromara.project.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
@ -86,7 +86,7 @@ public interface IBusContractorService extends IService<BusContractor> {
|
||||
* @param req 分包公司查询条件
|
||||
* @return 分包公司查询条件封装
|
||||
*/
|
||||
QueryWrapper<BusContractor> getQueryWrapper(ContractorQueryReq req);
|
||||
LambdaQueryWrapper<BusContractor> buildQuery(ContractorQueryReq req);
|
||||
|
||||
/**
|
||||
* 获取分包公司分页对象视图
|
||||
|
@ -1,6 +1,6 @@
|
||||
package org.dromara.project.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
@ -86,7 +86,7 @@ public interface IBusProjectService extends IService<BusProject> {
|
||||
* @param req 查询条件
|
||||
* @return 查询条件封装
|
||||
*/
|
||||
QueryWrapper<BusProject> getQueryWrapper(ProjectQueryReq req);
|
||||
LambdaQueryWrapper<BusProject> buildQuery(ProjectQueryReq req);
|
||||
|
||||
/**
|
||||
* 获取项目分页对象视图
|
||||
|
@ -1,6 +1,6 @@
|
||||
package org.dromara.project.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
@ -86,7 +86,7 @@ public interface IBusProjectTeamMemberService extends IService<BusProjectTeamMem
|
||||
* @param req 项目班组成员查询条件
|
||||
* @return 项目班组成员查询条件封装
|
||||
*/
|
||||
QueryWrapper<BusProjectTeamMember> getQueryWrapper(ProjectTeamMemberQueryReq req);
|
||||
LambdaQueryWrapper<BusProjectTeamMember> buildQuery(ProjectTeamMemberQueryReq req);
|
||||
|
||||
/**
|
||||
* 获取项目班组成员分页对象视图
|
||||
|
@ -1,6 +1,6 @@
|
||||
package org.dromara.project.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
@ -95,7 +95,7 @@ public interface IBusProjectTeamService extends IService<BusProjectTeam> {
|
||||
* @param req 项目班组查询条件
|
||||
* @return 项目班组查询条件封装
|
||||
*/
|
||||
QueryWrapper<BusProjectTeam> getQueryWrapper(ProjectTeamQueryReq req);
|
||||
LambdaQueryWrapper<BusProjectTeam> buildQuery(ProjectTeamQueryReq req);
|
||||
|
||||
/**
|
||||
* 获取项目班组分页对象视图
|
||||
|
@ -1,6 +1,6 @@
|
||||
package org.dromara.project.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
@ -114,7 +114,7 @@ public interface IBusUserProjectRelevancyService extends IService<BusUserProject
|
||||
* @param req 查询条件
|
||||
* @return 查询条件封装
|
||||
*/
|
||||
QueryWrapper<BusUserProjectRelevancy> getQueryWrapper(UserProjectRelevancyQueryReq req);
|
||||
LambdaQueryWrapper<BusUserProjectRelevancy> buildQuery(UserProjectRelevancyQueryReq req);
|
||||
|
||||
/**
|
||||
* 获取系统用户与项目关联分页视图
|
||||
|
@ -1,7 +1,9 @@
|
||||
package org.dromara.project.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import jakarta.annotation.Resource;
|
||||
@ -86,7 +88,7 @@ public class BusConstructionUserServiceImpl extends ServiceImpl<BusConstructionU
|
||||
@Override
|
||||
public TableDataInfo<BusConstructionUserVo> queryPageList(ConstructionUserQueryReq req, PageQuery pageQuery) {
|
||||
// 查询数据库
|
||||
Page<BusConstructionUser> result = this.page(pageQuery.build(), this.getQueryWrapper(req));
|
||||
Page<BusConstructionUser> result = this.page(pageQuery.build(), this.buildQuery(req));
|
||||
return TableDataInfo.build(getVoPage(result));
|
||||
}
|
||||
|
||||
@ -98,8 +100,8 @@ public class BusConstructionUserServiceImpl extends ServiceImpl<BusConstructionU
|
||||
*/
|
||||
@Override
|
||||
public List<BusConstructionUserVo> queryList(ConstructionUserQueryReq req) {
|
||||
QueryWrapper<BusConstructionUser> queryWrapper = this.getQueryWrapper(req);
|
||||
List<BusConstructionUser> list = this.list(queryWrapper);
|
||||
LambdaQueryWrapper<BusConstructionUser> lqw = this.buildQuery(req);
|
||||
List<BusConstructionUser> list = this.list(lqw);
|
||||
return list.stream().map(this::getVo).toList();
|
||||
}
|
||||
|
||||
@ -240,10 +242,10 @@ public class BusConstructionUserServiceImpl extends ServiceImpl<BusConstructionU
|
||||
* @return 查询条件封装
|
||||
*/
|
||||
@Override
|
||||
public QueryWrapper<BusConstructionUser> getQueryWrapper(ConstructionUserQueryReq req) {
|
||||
QueryWrapper<BusConstructionUser> queryWrapper = new QueryWrapper<>();
|
||||
public LambdaQueryWrapper<BusConstructionUser> buildQuery(ConstructionUserQueryReq req) {
|
||||
LambdaQueryWrapper<BusConstructionUser> lqw = Wrappers.lambdaQuery();
|
||||
if (req == null) {
|
||||
return queryWrapper;
|
||||
return lqw;
|
||||
}
|
||||
// 从对象中取值
|
||||
Long id = req.getId();
|
||||
@ -273,39 +275,39 @@ public class BusConstructionUserServiceImpl extends ServiceImpl<BusConstructionU
|
||||
Long salary = req.getSalary();
|
||||
String remark = req.getRemark();
|
||||
// 模糊查询
|
||||
queryWrapper.like(StringUtils.isNotBlank(nickName), "nick_name", nickName);
|
||||
queryWrapper.like(StringUtils.isNotBlank(userName), "user_name", userName);
|
||||
queryWrapper.like(StringUtils.isNotBlank(remark), "remark", remark);
|
||||
queryWrapper.like(StringUtils.isNotBlank(phone), "phone", phone);
|
||||
queryWrapper.like(StringUtils.isNotBlank(nation), "nation", nation);
|
||||
queryWrapper.like(StringUtils.isNotBlank(sfzNumber), "sfz_number", sfzNumber);
|
||||
queryWrapper.like(StringUtils.isNotBlank(sfzStart), "sfz_start", sfzStart);
|
||||
queryWrapper.like(StringUtils.isNotBlank(sfzEnd), "sfz_end", sfzEnd);
|
||||
queryWrapper.like(StringUtils.isNotBlank(sfzSite), "sfz_site", sfzSite);
|
||||
queryWrapper.like(StringUtils.isNotBlank(sfzBirth), "sfz_birth", sfzBirth);
|
||||
queryWrapper.like(StringUtils.isNotBlank(nativePlace), "native_place", nativePlace);
|
||||
queryWrapper.like(StringUtils.isNotBlank(yhkNumber), "yhk_number", yhkNumber);
|
||||
queryWrapper.like(StringUtils.isNotBlank(yhkOpeningBank), "yhk_opening_bank", yhkOpeningBank);
|
||||
queryWrapper.like(StringUtils.isNotBlank(yhkCardholder), "yhk_cardholder", yhkCardholder);
|
||||
lqw.like(StringUtils.isNotBlank(nickName), BusConstructionUser::getNickName, nickName);
|
||||
lqw.like(StringUtils.isNotBlank(userName), BusConstructionUser::getUserName, userName);
|
||||
lqw.like(StringUtils.isNotBlank(remark), BusConstructionUser::getRemark, remark);
|
||||
lqw.like(StringUtils.isNotBlank(phone), BusConstructionUser::getPhone, phone);
|
||||
lqw.like(StringUtils.isNotBlank(nation), BusConstructionUser::getNation, nation);
|
||||
lqw.like(StringUtils.isNotBlank(sfzNumber), BusConstructionUser::getSfzNumber, sfzNumber);
|
||||
lqw.like(StringUtils.isNotBlank(sfzStart), BusConstructionUser::getSfzStart, sfzStart);
|
||||
lqw.like(StringUtils.isNotBlank(sfzEnd), BusConstructionUser::getSfzEnd, sfzEnd);
|
||||
lqw.like(StringUtils.isNotBlank(sfzSite), BusConstructionUser::getSfzSite, sfzSite);
|
||||
lqw.like(StringUtils.isNotBlank(sfzBirth), BusConstructionUser::getSfzBirth, sfzBirth);
|
||||
lqw.like(StringUtils.isNotBlank(nativePlace), BusConstructionUser::getNativePlace, nativePlace);
|
||||
lqw.like(StringUtils.isNotBlank(yhkNumber), BusConstructionUser::getYhkNumber, yhkNumber);
|
||||
lqw.like(StringUtils.isNotBlank(yhkOpeningBank), BusConstructionUser::getYhkOpeningBank, yhkOpeningBank);
|
||||
lqw.like(StringUtils.isNotBlank(yhkCardholder), BusConstructionUser::getYhkCardholder, yhkCardholder);
|
||||
// 精确查询
|
||||
queryWrapper.eq(ObjectUtils.isNotEmpty(openid), "openid", openid);
|
||||
queryWrapper.eq(ObjectUtils.isNotEmpty(status), "status", status);
|
||||
queryWrapper.eq(ObjectUtils.isNotEmpty(id), "id", id);
|
||||
queryWrapper.eq(ObjectUtils.isNotEmpty(projectId), "project_id", projectId);
|
||||
queryWrapper.eq(ObjectUtils.isNotEmpty(contractorId), "contractor_id", contractorId);
|
||||
queryWrapper.eq(ObjectUtils.isNotEmpty(teamId), "team_id", teamId);
|
||||
queryWrapper.eq(ObjectUtils.isNotEmpty(isPinch), "is_pinch", isPinch);
|
||||
queryWrapper.eq(ObjectUtils.isNotEmpty(sex), "sex", sex);
|
||||
queryWrapper.eq(ObjectUtils.isNotEmpty(typeOfWork), "type_of_work", typeOfWork);
|
||||
queryWrapper.eq(ObjectUtils.isNotEmpty(clock), "clock", clock);
|
||||
queryWrapper.eq(ObjectUtils.isNotEmpty(salary), "salary", salary);
|
||||
lqw.eq(ObjectUtils.isNotEmpty(openid), BusConstructionUser::getOpenid, openid);
|
||||
lqw.eq(ObjectUtils.isNotEmpty(status), BusConstructionUser::getStatus, status);
|
||||
lqw.eq(ObjectUtils.isNotEmpty(id), BusConstructionUser::getId, id);
|
||||
lqw.eq(ObjectUtils.isNotEmpty(projectId), BusConstructionUser::getProjectId, projectId);
|
||||
lqw.eq(ObjectUtils.isNotEmpty(contractorId), BusConstructionUser::getContractorId, contractorId);
|
||||
lqw.eq(ObjectUtils.isNotEmpty(teamId), BusConstructionUser::getTeamId, teamId);
|
||||
lqw.eq(ObjectUtils.isNotEmpty(isPinch), BusConstructionUser::getIsPinch, isPinch);
|
||||
lqw.eq(ObjectUtils.isNotEmpty(sex), BusConstructionUser::getSex, sex);
|
||||
lqw.eq(ObjectUtils.isNotEmpty(typeOfWork), BusConstructionUser::getTypeOfWork, typeOfWork);
|
||||
lqw.eq(ObjectUtils.isNotEmpty(clock), BusConstructionUser::getClock, clock);
|
||||
lqw.eq(ObjectUtils.isNotEmpty(salary), BusConstructionUser::getSalary, salary);
|
||||
// 精准查询,不等于
|
||||
if (ObjectUtils.isNotEmpty(notTeamId)) {
|
||||
queryWrapper.and(wrapper -> wrapper
|
||||
.ne("team_id", notTeamId)
|
||||
.or().isNull("team_id"));
|
||||
lqw.and(wrapper -> wrapper
|
||||
.ne(BusConstructionUser::getTeamId, notTeamId)
|
||||
.or().isNull(BusConstructionUser::getTeamId));
|
||||
}
|
||||
return queryWrapper;
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -3,6 +3,7 @@ package org.dromara.project.service.impl;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.json.JSONObject;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
@ -70,7 +71,7 @@ public class BusContractorServiceImpl extends ServiceImpl<BusContractorMapper, B
|
||||
@Override
|
||||
public TableDataInfo<BusContractorVo> queryPageList(ContractorQueryReq req, PageQuery pageQuery) {
|
||||
// 查询数据库
|
||||
Page<BusContractor> result = this.page(pageQuery.build(), this.getQueryWrapper(req));
|
||||
Page<BusContractor> result = this.page(pageQuery.build(), this.buildQuery(req));
|
||||
return TableDataInfo.build(this.getVoPage(result));
|
||||
}
|
||||
|
||||
@ -82,8 +83,8 @@ public class BusContractorServiceImpl extends ServiceImpl<BusContractorMapper, B
|
||||
*/
|
||||
@Override
|
||||
public List<BusContractorVo> queryList(ContractorQueryReq req) {
|
||||
QueryWrapper<BusContractor> queryWrapper = this.getQueryWrapper(req);
|
||||
List<BusContractor> list = this.list(queryWrapper);
|
||||
LambdaQueryWrapper<BusContractor> lqw = this.buildQuery(req);
|
||||
List<BusContractor> list = this.list(lqw);
|
||||
return list.stream().map(this::getVo).toList();
|
||||
}
|
||||
|
||||
@ -222,10 +223,10 @@ public class BusContractorServiceImpl extends ServiceImpl<BusContractorMapper, B
|
||||
* @return 分包公司查询条件封装
|
||||
*/
|
||||
@Override
|
||||
public QueryWrapper<BusContractor> getQueryWrapper(ContractorQueryReq req) {
|
||||
QueryWrapper<BusContractor> queryWrapper = new QueryWrapper<>();
|
||||
public LambdaQueryWrapper<BusContractor> buildQuery(ContractorQueryReq req) {
|
||||
LambdaQueryWrapper<BusContractor> lqw = new LambdaQueryWrapper<>();
|
||||
if (req == null) {
|
||||
return queryWrapper;
|
||||
return lqw;
|
||||
}
|
||||
// 从对象中取值
|
||||
Long id = req.getId();
|
||||
@ -236,15 +237,15 @@ public class BusContractorServiceImpl extends ServiceImpl<BusContractorMapper, B
|
||||
String custodianPhone = req.getCustodianPhone();
|
||||
String remark = req.getRemark();
|
||||
// 模糊查询
|
||||
queryWrapper.like(StringUtils.isNotBlank(name), "name", name);
|
||||
queryWrapper.like(StringUtils.isNotBlank(principal), "principal", principal);
|
||||
queryWrapper.like(StringUtils.isNotBlank(principalPhone), "principal_phone", principalPhone);
|
||||
queryWrapper.like(StringUtils.isNotBlank(custodian), "custodian", custodian);
|
||||
queryWrapper.like(StringUtils.isNotBlank(custodianPhone), "custodian_phone", custodianPhone);
|
||||
queryWrapper.like(StringUtils.isNotBlank(remark), "remark", remark);
|
||||
lqw.like(StringUtils.isNotBlank(name), BusContractor::getName, name);
|
||||
lqw.like(StringUtils.isNotBlank(principal), BusContractor::getPrincipal, principal);
|
||||
lqw.like(StringUtils.isNotBlank(principalPhone), BusContractor::getPrincipalPhone, principalPhone);
|
||||
lqw.like(StringUtils.isNotBlank(custodian), BusContractor::getCustodian, custodian);
|
||||
lqw.like(StringUtils.isNotBlank(custodianPhone), BusContractor::getCustodianPhone, custodianPhone);
|
||||
lqw.like(StringUtils.isNotBlank(remark), BusContractor::getRemark, remark);
|
||||
// 精确查询
|
||||
queryWrapper.eq(ObjectUtils.isNotEmpty(id), "id", id);
|
||||
return queryWrapper;
|
||||
lqw.eq(ObjectUtils.isNotEmpty(id), BusContractor::getId, id);
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -71,7 +71,7 @@ public class BusProjectServiceImpl extends ServiceImpl<BusProjectMapper, BusProj
|
||||
@Override
|
||||
public TableDataInfo<BusProjectVo> queryPageList(ProjectQueryReq req, PageQuery pageQuery) {
|
||||
// 查询数据库
|
||||
Page<BusProject> result = this.page(pageQuery.build(), this.getQueryWrapper(req));
|
||||
Page<BusProject> result = this.page(pageQuery.build(), this.buildQuery(req));
|
||||
return TableDataInfo.build(this.getVoPage(result));
|
||||
}
|
||||
|
||||
@ -83,8 +83,8 @@ public class BusProjectServiceImpl extends ServiceImpl<BusProjectMapper, BusProj
|
||||
*/
|
||||
@Override
|
||||
public List<BusProjectVo> queryList(ProjectQueryReq req) {
|
||||
QueryWrapper<BusProject> queryWrapper = this.getQueryWrapper(req);
|
||||
return baseMapper.selectVoList(queryWrapper);
|
||||
LambdaQueryWrapper<BusProject> lqw = this.buildQuery(req);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -233,10 +233,10 @@ public class BusProjectServiceImpl extends ServiceImpl<BusProjectMapper, BusProj
|
||||
* @return 查询条件封装
|
||||
*/
|
||||
@Override
|
||||
public QueryWrapper<BusProject> getQueryWrapper(ProjectQueryReq req) {
|
||||
QueryWrapper<BusProject> queryWrapper = new QueryWrapper<>();
|
||||
public LambdaQueryWrapper<BusProject> buildQuery(ProjectQueryReq req) {
|
||||
LambdaQueryWrapper<BusProject> lqw = new LambdaQueryWrapper<>();
|
||||
if (req == null) {
|
||||
return queryWrapper;
|
||||
return lqw;
|
||||
}
|
||||
// 从对象中取值
|
||||
Long id = req.getId();
|
||||
@ -257,25 +257,25 @@ public class BusProjectServiceImpl extends ServiceImpl<BusProjectMapper, BusProj
|
||||
Long designTotal = req.getDesignTotal();
|
||||
String showHidden = req.getShowHidden();
|
||||
// 模糊查询
|
||||
queryWrapper.like(StringUtils.isNotBlank(projectName), "project_name", projectName);
|
||||
queryWrapper.like(StringUtils.isNotBlank(shortName), "short_name", shortName);
|
||||
queryWrapper.like(StringUtils.isNotBlank(remark), "remark", remark);
|
||||
queryWrapper.like(StringUtils.isNotBlank(type), "type", type);
|
||||
queryWrapper.like(StringUtils.isNotBlank(projectSite), "project_site", projectSite);
|
||||
queryWrapper.like(StringUtils.isNotBlank(principal), "principal", principal);
|
||||
queryWrapper.like(StringUtils.isNotBlank(principalPhone), "principal_phone", principalPhone);
|
||||
queryWrapper.like(StringUtils.isNotBlank(actual), "actual", actual);
|
||||
queryWrapper.like(StringUtils.isNotBlank(plan), "plan", plan);
|
||||
queryWrapper.like(StringUtils.isNotBlank(onStreamTime), "on_stream_time", onStreamTime);
|
||||
queryWrapper.like(StringUtils.isNotBlank(punchRange), "punch_range", punchRange);
|
||||
lqw.like(StringUtils.isNotBlank(projectName), BusProject::getProjectName, projectName);
|
||||
lqw.like(StringUtils.isNotBlank(shortName), BusProject::getShortName, shortName);
|
||||
lqw.like(StringUtils.isNotBlank(remark), BusProject::getRemark, remark);
|
||||
lqw.like(StringUtils.isNotBlank(type), BusProject::getType, type);
|
||||
lqw.like(StringUtils.isNotBlank(projectSite), BusProject::getProjectSite, projectSite);
|
||||
lqw.like(StringUtils.isNotBlank(principal), BusProject::getPrincipal, principal);
|
||||
lqw.like(StringUtils.isNotBlank(principalPhone), BusProject::getPrincipalPhone, principalPhone);
|
||||
lqw.like(StringUtils.isNotBlank(actual), BusProject::getActual, actual);
|
||||
lqw.like(StringUtils.isNotBlank(plan), BusProject::getPlan, plan);
|
||||
lqw.like(StringUtils.isNotBlank(onStreamTime), BusProject::getOnStreamTime, onStreamTime);
|
||||
lqw.like(StringUtils.isNotBlank(punchRange), BusProject::getPunchRange, punchRange);
|
||||
// 精确查询
|
||||
queryWrapper.eq(ObjectUtils.isNotEmpty(pId), "p_id", pId);
|
||||
queryWrapper.eq(ObjectUtils.isNotEmpty(status), "status", status);
|
||||
queryWrapper.eq(ObjectUtils.isNotEmpty(id), "id", id);
|
||||
queryWrapper.eq(ObjectUtils.isNotEmpty(isType), "is_type", isType);
|
||||
queryWrapper.eq(ObjectUtils.isNotEmpty(designTotal), "design_total", designTotal);
|
||||
queryWrapper.eq(ObjectUtils.isNotEmpty(showHidden), "show_hidden", showHidden);
|
||||
return queryWrapper;
|
||||
lqw.eq(ObjectUtils.isNotEmpty(pId), BusProject::getPId, pId);
|
||||
lqw.eq(ObjectUtils.isNotEmpty(status), BusProject::getStatus, status);
|
||||
lqw.eq(ObjectUtils.isNotEmpty(id), BusProject::getId, id);
|
||||
lqw.eq(ObjectUtils.isNotEmpty(isType), BusProject::getIsType, isType);
|
||||
lqw.eq(ObjectUtils.isNotEmpty(designTotal), BusProject::getDesignTotal, designTotal);
|
||||
lqw.eq(ObjectUtils.isNotEmpty(showHidden), BusProject::getShowHidden, showHidden);
|
||||
return lqw;
|
||||
}
|
||||
|
||||
|
||||
|
@ -81,7 +81,7 @@ public class BusProjectTeamMemberServiceImpl extends ServiceImpl<BusProjectTeamM
|
||||
@Override
|
||||
public TableDataInfo<BusProjectTeamMemberVo> queryPageList(ProjectTeamMemberQueryReq req, PageQuery pageQuery) {
|
||||
// 查询数据库
|
||||
Page<BusProjectTeamMember> result = this.page(pageQuery.build(), this.getQueryWrapper(req));
|
||||
Page<BusProjectTeamMember> result = this.page(pageQuery.build(), this.buildQuery(req));
|
||||
return TableDataInfo.build(this.getVoPage(result));
|
||||
}
|
||||
|
||||
@ -93,8 +93,8 @@ public class BusProjectTeamMemberServiceImpl extends ServiceImpl<BusProjectTeamM
|
||||
*/
|
||||
@Override
|
||||
public List<BusProjectTeamMemberVo> queryList(ProjectTeamMemberQueryReq req) {
|
||||
QueryWrapper<BusProjectTeamMember> queryWrapper = this.getQueryWrapper(req);
|
||||
List<BusProjectTeamMember> list = this.list(queryWrapper);
|
||||
LambdaQueryWrapper<BusProjectTeamMember> lqw = this.buildQuery(req);
|
||||
List<BusProjectTeamMember> list = this.list(lqw);
|
||||
return list.stream().map(this::getVo).toList();
|
||||
}
|
||||
|
||||
@ -262,10 +262,10 @@ public class BusProjectTeamMemberServiceImpl extends ServiceImpl<BusProjectTeamM
|
||||
* @return 项目班组成员查询条件封装
|
||||
*/
|
||||
@Override
|
||||
public QueryWrapper<BusProjectTeamMember> getQueryWrapper(ProjectTeamMemberQueryReq req) {
|
||||
QueryWrapper<BusProjectTeamMember> queryWrapper = new QueryWrapper<>();
|
||||
public LambdaQueryWrapper<BusProjectTeamMember> buildQuery(ProjectTeamMemberQueryReq req) {
|
||||
LambdaQueryWrapper<BusProjectTeamMember> lqw = new LambdaQueryWrapper<>();
|
||||
if (req == null) {
|
||||
return queryWrapper;
|
||||
return lqw;
|
||||
}
|
||||
// 从对象中取值
|
||||
Long id = req.getId();
|
||||
@ -281,17 +281,17 @@ public class BusProjectTeamMemberServiceImpl extends ServiceImpl<BusProjectTeamM
|
||||
constructionUserQueryWrapper.select("id");
|
||||
constructionUserQueryWrapper.like("user_name", memberName);
|
||||
List<Long> constructionUserIdList = constructionUserService.listObjs(constructionUserQueryWrapper, obj -> (Long) obj);
|
||||
queryWrapper.in("member_id", constructionUserIdList);
|
||||
lqw.in(BusProjectTeamMember::getMemberId, constructionUserIdList);
|
||||
}
|
||||
// 模糊查询
|
||||
queryWrapper.like(StringUtils.isNotBlank(remark), "remark", remark);
|
||||
lqw.like(StringUtils.isNotBlank(remark), BusProjectTeamMember::getRemark, remark);
|
||||
// 精确查询
|
||||
queryWrapper.eq(ObjectUtils.isNotEmpty(id), "id", id);
|
||||
queryWrapper.eq(ObjectUtils.isNotEmpty(projectId), "project_id", projectId);
|
||||
queryWrapper.eq(ObjectUtils.isNotEmpty(teamId), "team_id", teamId);
|
||||
queryWrapper.eq(ObjectUtils.isNotEmpty(memberId), "member_id", memberId);
|
||||
queryWrapper.eq(ObjectUtils.isNotEmpty(postId), "post_id", postId);
|
||||
return queryWrapper;
|
||||
lqw.eq(ObjectUtils.isNotEmpty(id), BusProjectTeamMember::getId, id);
|
||||
lqw.eq(ObjectUtils.isNotEmpty(projectId), BusProjectTeamMember::getProjectId, projectId);
|
||||
lqw.eq(ObjectUtils.isNotEmpty(teamId), BusProjectTeamMember::getTeamId, teamId);
|
||||
lqw.eq(ObjectUtils.isNotEmpty(memberId), BusProjectTeamMember::getMemberId, memberId);
|
||||
lqw.eq(ObjectUtils.isNotEmpty(postId), BusProjectTeamMember::getPostId, postId);
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2,7 +2,6 @@ package org.dromara.project.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
@ -85,7 +84,7 @@ public class BusProjectTeamServiceImpl extends ServiceImpl<BusProjectTeamMapper,
|
||||
@Override
|
||||
public TableDataInfo<BusProjectTeamVo> queryPageList(ProjectTeamQueryReq req, PageQuery pageQuery) {
|
||||
// 查询数据库
|
||||
Page<BusProjectTeam> result = this.page(pageQuery.build(), this.getQueryWrapper(req));
|
||||
Page<BusProjectTeam> result = this.page(pageQuery.build(), this.buildQuery(req));
|
||||
return TableDataInfo.build(this.getVoPage(result));
|
||||
}
|
||||
|
||||
@ -97,8 +96,8 @@ public class BusProjectTeamServiceImpl extends ServiceImpl<BusProjectTeamMapper,
|
||||
*/
|
||||
@Override
|
||||
public List<BusProjectTeamVo> queryList(ProjectTeamQueryReq req) {
|
||||
QueryWrapper<BusProjectTeam> queryWrapper = this.getQueryWrapper(req);
|
||||
List<BusProjectTeam> list = this.list(queryWrapper);
|
||||
LambdaQueryWrapper<BusProjectTeam> lqw = this.buildQuery(req);
|
||||
List<BusProjectTeam> list = this.list(lqw);
|
||||
return list.stream().map(this::getVo).toList();
|
||||
}
|
||||
|
||||
@ -263,10 +262,10 @@ public class BusProjectTeamServiceImpl extends ServiceImpl<BusProjectTeamMapper,
|
||||
* @return 项目班组查询条件封装
|
||||
*/
|
||||
@Override
|
||||
public QueryWrapper<BusProjectTeam> getQueryWrapper(ProjectTeamQueryReq req) {
|
||||
QueryWrapper<BusProjectTeam> queryWrapper = new QueryWrapper<>();
|
||||
public LambdaQueryWrapper<BusProjectTeam> buildQuery(ProjectTeamQueryReq req) {
|
||||
LambdaQueryWrapper<BusProjectTeam> lqw = new LambdaQueryWrapper<>();
|
||||
if (req == null) {
|
||||
return queryWrapper;
|
||||
return lqw;
|
||||
}
|
||||
// 从对象中取值
|
||||
Long id = req.getId();
|
||||
@ -275,13 +274,13 @@ public class BusProjectTeamServiceImpl extends ServiceImpl<BusProjectTeamMapper,
|
||||
String isClockIn = req.getIsClockIn();
|
||||
String remark = req.getRemark();
|
||||
// 模糊查询
|
||||
queryWrapper.like(StringUtils.isNotBlank(teamName), "team_name", teamName);
|
||||
queryWrapper.like(StringUtils.isNotBlank(remark), "remark", remark);
|
||||
lqw.like(StringUtils.isNotBlank(teamName), BusProjectTeam::getTeamName, teamName);
|
||||
lqw.like(StringUtils.isNotBlank(remark), BusProjectTeam::getRemark, remark);
|
||||
// 精确查询
|
||||
queryWrapper.eq(ObjectUtils.isNotEmpty(id), "id", id);
|
||||
queryWrapper.eq(ObjectUtils.isNotEmpty(projectId), "project_id", projectId);
|
||||
queryWrapper.eq(ObjectUtils.isNotEmpty(isClockIn), "is_clock_in", isClockIn);
|
||||
return queryWrapper;
|
||||
lqw.eq(ObjectUtils.isNotEmpty(id), BusProjectTeam::getId, id);
|
||||
lqw.eq(ObjectUtils.isNotEmpty(projectId), BusProjectTeam::getProjectId, projectId);
|
||||
lqw.eq(ObjectUtils.isNotEmpty(isClockIn), BusProjectTeam::getIsClockIn, isClockIn);
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -77,7 +77,7 @@ public class BusUserProjectRelevancyServiceImpl extends ServiceImpl<BusUserProje
|
||||
@Override
|
||||
public TableDataInfo<BusUserProjectRelevancyVo> queryPageList(UserProjectRelevancyQueryReq req, PageQuery pageQuery) {
|
||||
// 查询数据库
|
||||
Page<BusUserProjectRelevancy> result = this.page(pageQuery.build(), this.getQueryWrapper(req));
|
||||
Page<BusUserProjectRelevancy> result = this.page(pageQuery.build(), this.buildQuery(req));
|
||||
return TableDataInfo.build(this.getVoPage(result));
|
||||
}
|
||||
|
||||
@ -89,7 +89,7 @@ public class BusUserProjectRelevancyServiceImpl extends ServiceImpl<BusUserProje
|
||||
*/
|
||||
@Override
|
||||
public List<BusUserProjectRelevancyVo> queryList(UserProjectRelevancyQueryReq req) {
|
||||
QueryWrapper<BusUserProjectRelevancy> queryWrapper = this.getQueryWrapper(req);
|
||||
LambdaQueryWrapper<BusUserProjectRelevancy> queryWrapper = this.buildQuery(req);
|
||||
return baseMapper.selectVoList(queryWrapper);
|
||||
}
|
||||
|
||||
@ -241,7 +241,7 @@ public class BusUserProjectRelevancyServiceImpl extends ServiceImpl<BusUserProje
|
||||
PageQuery pageQuery) {
|
||||
// 添加查询条件
|
||||
req.setUserId(userId);
|
||||
QueryWrapper<BusUserProjectRelevancy> queryWrapper = this.getQueryWrapper(req);
|
||||
LambdaQueryWrapper<BusUserProjectRelevancy> queryWrapper = this.buildQuery(req);
|
||||
// 查询数据库
|
||||
Page<BusUserProjectRelevancy> result = this.page(pageQuery.build(), queryWrapper);
|
||||
return TableDataInfo.build(this.getVoPage(result));
|
||||
@ -313,8 +313,8 @@ public class BusUserProjectRelevancyServiceImpl extends ServiceImpl<BusUserProje
|
||||
* @return 查询条件封装
|
||||
*/
|
||||
@Override
|
||||
public QueryWrapper<BusUserProjectRelevancy> getQueryWrapper(UserProjectRelevancyQueryReq req) {
|
||||
QueryWrapper<BusUserProjectRelevancy> queryWrapper = new QueryWrapper<>();
|
||||
public LambdaQueryWrapper<BusUserProjectRelevancy> buildQuery(UserProjectRelevancyQueryReq req) {
|
||||
LambdaQueryWrapper<BusUserProjectRelevancy> queryWrapper = new LambdaQueryWrapper<>();
|
||||
if (req == null) {
|
||||
return queryWrapper;
|
||||
}
|
||||
@ -323,9 +323,9 @@ public class BusUserProjectRelevancyServiceImpl extends ServiceImpl<BusUserProje
|
||||
Long userId = req.getUserId();
|
||||
Long projectId = req.getProjectId();
|
||||
// 精确查询
|
||||
queryWrapper.eq(ObjectUtils.isNotEmpty(id), "id", id);
|
||||
queryWrapper.eq(ObjectUtils.isNotEmpty(userId), "user_id", userId);
|
||||
queryWrapper.eq(ObjectUtils.isNotEmpty(projectId), "project_id", projectId);
|
||||
queryWrapper.eq(ObjectUtils.isNotEmpty(id), BusUserProjectRelevancy::getId, id);
|
||||
queryWrapper.eq(ObjectUtils.isNotEmpty(userId), BusUserProjectRelevancy::getUserId, userId);
|
||||
queryWrapper.eq(ObjectUtils.isNotEmpty(projectId), BusUserProjectRelevancy::getProjectId, projectId);
|
||||
return queryWrapper;
|
||||
}
|
||||
|
||||
|
@ -65,6 +65,11 @@ public class BusSafetyInspection extends BaseEntity {
|
||||
*/
|
||||
private Long correctorId;
|
||||
|
||||
/**
|
||||
* 整改期限
|
||||
*/
|
||||
private Date rectificationDeadline;
|
||||
|
||||
/**
|
||||
* 是否回复(1回复 2不回复)
|
||||
*/
|
||||
|
@ -1,5 +1,6 @@
|
||||
package org.dromara.safety.domain.req.safetyinspection;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
@ -51,6 +52,12 @@ public class SafetyInspectionCreateReq implements Serializable {
|
||||
*/
|
||||
private Long correctorId;
|
||||
|
||||
/**
|
||||
* 整改期限
|
||||
*/
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd")
|
||||
private Date rectificationDeadline;
|
||||
|
||||
/**
|
||||
* 是否回复(1回复 2不回复)
|
||||
*/
|
||||
|
@ -1,5 +1,6 @@
|
||||
package org.dromara.safety.domain.req.safetyinspection;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
@ -56,6 +57,12 @@ public class SafetyInspectionUpdateReq implements Serializable {
|
||||
*/
|
||||
private Long correctorId;
|
||||
|
||||
/**
|
||||
* 整改期限
|
||||
*/
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd")
|
||||
private Date rectificationDeadline;
|
||||
|
||||
/**
|
||||
* 是否回复(1回复 2不回复)
|
||||
*/
|
||||
|
@ -4,7 +4,6 @@ import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author lcj
|
||||
|
@ -89,6 +89,12 @@ public class BusSafetyInspectionVo implements Serializable {
|
||||
*/
|
||||
private String correctorName;
|
||||
|
||||
/**
|
||||
* 整改期限
|
||||
*/
|
||||
@ExcelProperty(value = "整改期限")
|
||||
private Date rectificationDeadline;
|
||||
|
||||
/**
|
||||
* 是否回复(1回复 2不回复)
|
||||
*/
|
||||
|
@ -86,7 +86,7 @@ public interface IBusSafetyInspectionService extends IService<BusSafetyInspectio
|
||||
* @param req 安全巡检工单查询条件
|
||||
* @return 安全巡检工单查询条件封装
|
||||
*/
|
||||
LambdaQueryWrapper<BusSafetyInspection> getQueryWrapper(SafetyInspectionQueryReq req);
|
||||
LambdaQueryWrapper<BusSafetyInspection> buildQuery(SafetyInspectionQueryReq req);
|
||||
|
||||
/**
|
||||
* 获取安全巡检工单分页对象视图
|
||||
|
@ -86,7 +86,7 @@ public interface IBusSafetyLogService extends IService<BusSafetyLog> {
|
||||
* @param req 安全日志查询条件
|
||||
* @return 安全日志查询条件封装
|
||||
*/
|
||||
LambdaQueryWrapper<BusSafetyLog> getQueryWrapper(SafetyLogQueryReq req);
|
||||
LambdaQueryWrapper<BusSafetyLog> buildQuery(SafetyLogQueryReq req);
|
||||
|
||||
/**
|
||||
* 获取安全日志分页对象视图
|
||||
|
@ -86,7 +86,7 @@ public interface IBusSafetyWeeklyReportService extends IService<BusSafetyWeeklyR
|
||||
* @param req 安全周报查询条件
|
||||
* @return 安全周报查询条件封装
|
||||
*/
|
||||
LambdaQueryWrapper<BusSafetyWeeklyReport> getQueryWrapper(SafetyWeeklyReportQueryReq req);
|
||||
LambdaQueryWrapper<BusSafetyWeeklyReport> buildQuery(SafetyWeeklyReportQueryReq req);
|
||||
|
||||
/**
|
||||
* 获取安全周报分页对象视图
|
||||
|
@ -86,7 +86,7 @@ public interface IBusTeamMeetingService extends IService<BusTeamMeeting> {
|
||||
* @param req 站班会查询条件
|
||||
* @return 站班会查询条件封装
|
||||
*/
|
||||
LambdaQueryWrapper<BusTeamMeeting> getQueryWrapper(TeamMeetingQueryReq req);
|
||||
LambdaQueryWrapper<BusTeamMeeting> buildQuery(TeamMeetingQueryReq req);
|
||||
|
||||
/**
|
||||
* 获取站班会分页对象视图
|
||||
|
@ -15,6 +15,7 @@ import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.project.domain.BusConstructionUser;
|
||||
import org.dromara.project.domain.BusProjectTeam;
|
||||
import org.dromara.project.service.IBusConstructionUserService;
|
||||
import org.dromara.project.service.IBusProjectService;
|
||||
import org.dromara.project.service.IBusProjectTeamService;
|
||||
import org.dromara.safety.domain.BusSafetyInspection;
|
||||
import org.dromara.safety.domain.req.safetyinspection.SafetyInspectionCreateReq;
|
||||
@ -47,6 +48,9 @@ public class BusSafetyInspectionServiceImpl extends ServiceImpl<BusSafetyInspect
|
||||
@Resource
|
||||
private IBusProjectTeamService projectTeamService;
|
||||
|
||||
@Resource
|
||||
private IBusProjectService projectService;
|
||||
|
||||
/**
|
||||
* 查询安全巡检工单
|
||||
*
|
||||
@ -71,7 +75,7 @@ public class BusSafetyInspectionServiceImpl extends ServiceImpl<BusSafetyInspect
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<BusSafetyInspectionVo> queryPageList(SafetyInspectionQueryReq req, PageQuery pageQuery) {
|
||||
Page<BusSafetyInspection> result = this.page(pageQuery.build(), getQueryWrapper(req));
|
||||
Page<BusSafetyInspection> result = this.page(pageQuery.build(), buildQuery(req));
|
||||
return TableDataInfo.build(this.getVoPage(result));
|
||||
}
|
||||
|
||||
@ -83,7 +87,7 @@ public class BusSafetyInspectionServiceImpl extends ServiceImpl<BusSafetyInspect
|
||||
*/
|
||||
@Override
|
||||
public List<BusSafetyInspectionVo> queryList(SafetyInspectionQueryReq req) {
|
||||
List<BusSafetyInspection> safetyInspection = this.list(this.getQueryWrapper(req));
|
||||
List<BusSafetyInspection> safetyInspection = this.list(this.buildQuery(req));
|
||||
return safetyInspection.stream().map(this::getVo).toList();
|
||||
}
|
||||
|
||||
@ -135,7 +139,32 @@ public class BusSafetyInspectionServiceImpl extends ServiceImpl<BusSafetyInspect
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(BusSafetyInspection entity, Boolean create) {
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
// TODO 做一些数据校验,如唯一约束
|
||||
Long projectId = entity.getProjectId();
|
||||
Long correctorId = entity.getCorrectorId();
|
||||
String checkType = entity.getCheckType();
|
||||
String violationType = entity.getViolationType();
|
||||
// 创建时校验
|
||||
if (create) {
|
||||
if (projectId == null) {
|
||||
throw new ServiceException("项目id不能为空", HttpStatus.BAD_REQUEST);
|
||||
}
|
||||
if (correctorId == null) {
|
||||
throw new ServiceException("整改人id不能为空", HttpStatus.BAD_REQUEST);
|
||||
}
|
||||
if (StringUtils.isBlank(checkType)) {
|
||||
throw new ServiceException("检查类型不能为空", HttpStatus.BAD_REQUEST);
|
||||
}
|
||||
if (StringUtils.isBlank(violationType)) {
|
||||
throw new ServiceException("违规类型不能为空", HttpStatus.BAD_REQUEST);
|
||||
}
|
||||
}
|
||||
if (projectId != null && projectService.getById(projectId) == null) {
|
||||
throw new ServiceException("对应项目不存在", HttpStatus.NOT_FOUND);
|
||||
}
|
||||
if (correctorId != null && constructionUserService.getById(correctorId) == null) {
|
||||
throw new ServiceException("对应整改人不存在", HttpStatus.NOT_FOUND);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -149,7 +178,11 @@ public class BusSafetyInspectionServiceImpl extends ServiceImpl<BusSafetyInspect
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if (isValid) {
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
// TODO 做一些业务上的校验,判断是否需要校验
|
||||
Long count = this.lambdaQuery().in(BusSafetyInspection::getPid, ids).count();
|
||||
if (count > 0) {
|
||||
throw new ServiceException("所选安全巡检工单包含子数据,不允许删除", HttpStatus.BAD_REQUEST);
|
||||
}
|
||||
}
|
||||
return this.removeBatchByIds(ids);
|
||||
}
|
||||
@ -205,7 +238,7 @@ public class BusSafetyInspectionServiceImpl extends ServiceImpl<BusSafetyInspect
|
||||
* @return 安全巡检工单查询条件封装
|
||||
*/
|
||||
@Override
|
||||
public LambdaQueryWrapper<BusSafetyInspection> getQueryWrapper(SafetyInspectionQueryReq req) {
|
||||
public LambdaQueryWrapper<BusSafetyInspection> buildQuery(SafetyInspectionQueryReq req) {
|
||||
LambdaQueryWrapper<BusSafetyInspection> lqw = Wrappers.lambdaQuery();
|
||||
if (req == null) {
|
||||
return lqw;
|
||||
|
@ -15,6 +15,7 @@ import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.project.domain.BusConstructionUser;
|
||||
import org.dromara.project.service.IBusConstructionUserService;
|
||||
import org.dromara.project.service.IBusProjectService;
|
||||
import org.dromara.safety.domain.BusSafetyLog;
|
||||
import org.dromara.safety.domain.req.safetylog.SafetyLogCreateReq;
|
||||
import org.dromara.safety.domain.req.safetylog.SafetyLogQueryReq;
|
||||
@ -42,6 +43,9 @@ public class BusSafetyLogServiceImpl extends ServiceImpl<BusSafetyLogMapper, Bus
|
||||
@Resource
|
||||
private IBusConstructionUserService constructionUserService;
|
||||
|
||||
@Resource
|
||||
private IBusProjectService projectService;
|
||||
|
||||
/**
|
||||
* 查询安全日志
|
||||
*
|
||||
@ -66,7 +70,7 @@ public class BusSafetyLogServiceImpl extends ServiceImpl<BusSafetyLogMapper, Bus
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<BusSafetyLogVo> queryPageList(SafetyLogQueryReq req, PageQuery pageQuery) {
|
||||
Page<BusSafetyLog> result = this.page(pageQuery.build(), this.getQueryWrapper(req));
|
||||
Page<BusSafetyLog> result = this.page(pageQuery.build(), this.buildQuery(req));
|
||||
return TableDataInfo.build(this.getVoPage(result));
|
||||
}
|
||||
|
||||
@ -78,7 +82,7 @@ public class BusSafetyLogServiceImpl extends ServiceImpl<BusSafetyLogMapper, Bus
|
||||
*/
|
||||
@Override
|
||||
public List<BusSafetyLogVo> queryList(SafetyLogQueryReq req) {
|
||||
List<BusSafetyLog> safetyLogList = this.list(this.getQueryWrapper(req));
|
||||
List<BusSafetyLog> safetyLogList = this.list(this.buildQuery(req));
|
||||
return safetyLogList.stream().map(this::getVo).toList();
|
||||
}
|
||||
|
||||
@ -131,8 +135,14 @@ public class BusSafetyLogServiceImpl extends ServiceImpl<BusSafetyLogMapper, Bus
|
||||
*/
|
||||
private void validEntityBeforeSave(BusSafetyLog entity, Boolean create) {
|
||||
// TODO 做一些数据校验,如唯一约束
|
||||
Long projectId = entity.getProjectId();
|
||||
if (create) {
|
||||
|
||||
if (projectId == null) {
|
||||
throw new ServiceException("项目id不能为空", HttpStatus.BAD_REQUEST);
|
||||
}
|
||||
}
|
||||
if (projectId != null && projectService.getById(projectId) == null) {
|
||||
throw new ServiceException("对应项目不存在", HttpStatus.NOT_FOUND);
|
||||
}
|
||||
}
|
||||
|
||||
@ -182,7 +192,7 @@ public class BusSafetyLogServiceImpl extends ServiceImpl<BusSafetyLogMapper, Bus
|
||||
* @return 安全日志查询条件封装
|
||||
*/
|
||||
@Override
|
||||
public LambdaQueryWrapper<BusSafetyLog> getQueryWrapper(SafetyLogQueryReq req) {
|
||||
public LambdaQueryWrapper<BusSafetyLog> buildQuery(SafetyLogQueryReq req) {
|
||||
LambdaQueryWrapper<BusSafetyLog> lqw = Wrappers.lambdaQuery();
|
||||
if (req == null) {
|
||||
return lqw;
|
||||
|
@ -12,6 +12,7 @@ import org.dromara.common.core.utils.ObjectUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.project.service.IBusProjectService;
|
||||
import org.dromara.safety.domain.BusSafetyWeeklyReport;
|
||||
import org.dromara.safety.domain.req.safetyweeklyreport.SafetyWeeklyReportCreateReq;
|
||||
import org.dromara.safety.domain.req.safetyweeklyreport.SafetyWeeklyReportQueryReq;
|
||||
@ -41,6 +42,9 @@ public class BusSafetyWeeklyReportServiceImpl extends ServiceImpl<BusSafetyWeekl
|
||||
@Resource
|
||||
private ISysOssService ossService;
|
||||
|
||||
@Resource
|
||||
private IBusProjectService projectService;
|
||||
|
||||
/**
|
||||
* 查询安全周报
|
||||
*
|
||||
@ -65,7 +69,7 @@ public class BusSafetyWeeklyReportServiceImpl extends ServiceImpl<BusSafetyWeekl
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<BusSafetyWeeklyReportVo> queryPageList(SafetyWeeklyReportQueryReq req, PageQuery pageQuery) {
|
||||
Page<BusSafetyWeeklyReport> result = this.page(pageQuery.build(), this.getQueryWrapper(req));
|
||||
Page<BusSafetyWeeklyReport> result = this.page(pageQuery.build(), this.buildQuery(req));
|
||||
return TableDataInfo.build(this.getVoPage(result));
|
||||
}
|
||||
|
||||
@ -77,7 +81,7 @@ public class BusSafetyWeeklyReportServiceImpl extends ServiceImpl<BusSafetyWeekl
|
||||
*/
|
||||
@Override
|
||||
public List<BusSafetyWeeklyReportVo> queryList(SafetyWeeklyReportQueryReq req) {
|
||||
List<BusSafetyWeeklyReport> safetyWeeklyReportList = this.list(this.getQueryWrapper(req));
|
||||
List<BusSafetyWeeklyReport> safetyWeeklyReportList = this.list(this.buildQuery(req));
|
||||
return safetyWeeklyReportList.stream().map(this::getVo).toList();
|
||||
}
|
||||
|
||||
@ -129,7 +133,16 @@ public class BusSafetyWeeklyReportServiceImpl extends ServiceImpl<BusSafetyWeekl
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(BusSafetyWeeklyReport entity, Boolean create) {
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
// TODO 做一些数据校验,如唯一约束
|
||||
Long projectId = entity.getProjectId();
|
||||
if (create) {
|
||||
if (projectId == null) {
|
||||
throw new ServiceException("项目id不能为空", HttpStatus.BAD_REQUEST);
|
||||
}
|
||||
}
|
||||
if (projectId != null && projectService.getById(projectId) == null) {
|
||||
throw new ServiceException("对应项目不存在", HttpStatus.NOT_FOUND);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -143,7 +156,7 @@ public class BusSafetyWeeklyReportServiceImpl extends ServiceImpl<BusSafetyWeekl
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if (isValid) {
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
// TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return this.removeBatchByIds(ids);
|
||||
}
|
||||
@ -178,7 +191,7 @@ public class BusSafetyWeeklyReportServiceImpl extends ServiceImpl<BusSafetyWeekl
|
||||
* @return 安全周报查询条件封装
|
||||
*/
|
||||
@Override
|
||||
public LambdaQueryWrapper<BusSafetyWeeklyReport> getQueryWrapper(SafetyWeeklyReportQueryReq req) {
|
||||
public LambdaQueryWrapper<BusSafetyWeeklyReport> buildQuery(SafetyWeeklyReportQueryReq req) {
|
||||
LambdaQueryWrapper<BusSafetyWeeklyReport> lqw = Wrappers.lambdaQuery();
|
||||
if (req == null) {
|
||||
return lqw;
|
||||
|
@ -19,6 +19,7 @@ import org.dromara.project.domain.BusContractor;
|
||||
import org.dromara.project.domain.BusProjectTeam;
|
||||
import org.dromara.project.service.IBusConstructionUserService;
|
||||
import org.dromara.project.service.IBusContractorService;
|
||||
import org.dromara.project.service.IBusProjectService;
|
||||
import org.dromara.project.service.IBusProjectTeamService;
|
||||
import org.dromara.safety.domain.BusTeamMeeting;
|
||||
import org.dromara.safety.domain.req.teammeeting.TeamMeetingCreateReq;
|
||||
@ -59,6 +60,9 @@ public class BusTeamMeetingServiceImpl extends ServiceImpl<BusTeamMeetingMapper,
|
||||
@Resource
|
||||
private IBusProjectTeamService projectTeamService;
|
||||
|
||||
@Resource
|
||||
private IBusProjectService projectService;
|
||||
|
||||
/**
|
||||
* 查询站班会
|
||||
*
|
||||
@ -83,7 +87,7 @@ public class BusTeamMeetingServiceImpl extends ServiceImpl<BusTeamMeetingMapper,
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<BusTeamMeetingVo> queryPageList(TeamMeetingQueryReq req, PageQuery pageQuery) {
|
||||
Page<BusTeamMeeting> result = this.page(pageQuery.build(), this.getQueryWrapper(req));
|
||||
Page<BusTeamMeeting> result = this.page(pageQuery.build(), this.buildQuery(req));
|
||||
return TableDataInfo.build(this.getVoPage(result));
|
||||
}
|
||||
|
||||
@ -95,7 +99,7 @@ public class BusTeamMeetingServiceImpl extends ServiceImpl<BusTeamMeetingMapper,
|
||||
*/
|
||||
@Override
|
||||
public List<BusTeamMeetingVo> queryList(TeamMeetingQueryReq req) {
|
||||
List<BusTeamMeeting> list = this.list(this.getQueryWrapper(req));
|
||||
List<BusTeamMeeting> list = this.list(this.buildQuery(req));
|
||||
// 对象列表 => 封装对象列表
|
||||
return list.stream().map(this::getVo).toList();
|
||||
}
|
||||
@ -162,7 +166,16 @@ public class BusTeamMeetingServiceImpl extends ServiceImpl<BusTeamMeetingMapper,
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(BusTeamMeeting entity, Boolean create) {
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
// TODO 做一些数据校验,如唯一约束
|
||||
Long projectId = entity.getProjectId();
|
||||
if (create) {
|
||||
if (projectId == null) {
|
||||
throw new ServiceException("项目id不能为空", HttpStatus.BAD_REQUEST);
|
||||
}
|
||||
}
|
||||
if (projectId != null && projectService.getById(projectId) == null) {
|
||||
throw new ServiceException("对应项目不存在", HttpStatus.NOT_FOUND);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -176,7 +189,7 @@ public class BusTeamMeetingServiceImpl extends ServiceImpl<BusTeamMeetingMapper,
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if (isValid) {
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
// TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return this.removeBatchByIds(ids);
|
||||
}
|
||||
@ -255,7 +268,7 @@ public class BusTeamMeetingServiceImpl extends ServiceImpl<BusTeamMeetingMapper,
|
||||
* @return 站班会查询条件封装
|
||||
*/
|
||||
@Override
|
||||
public LambdaQueryWrapper<BusTeamMeeting> getQueryWrapper(TeamMeetingQueryReq req) {
|
||||
public LambdaQueryWrapper<BusTeamMeeting> buildQuery(TeamMeetingQueryReq req) {
|
||||
LambdaQueryWrapper<BusTeamMeeting> lqw = Wrappers.lambdaQuery();
|
||||
if (req == null) {
|
||||
return lqw;
|
||||
|
@ -5,7 +5,7 @@ VITE_APP_TITLE = 新能源项目管理平台
|
||||
VITE_APP_ENV = 'development'
|
||||
|
||||
# 开发环境
|
||||
VITE_APP_BASE_API = 'http://192.168.110.2:8899'
|
||||
VITE_APP_BASE_API = 'http://192.168.110.6:8899'
|
||||
|
||||
# 应用访问路径 例如使用前缀 /admin/
|
||||
VITE_APP_CONTEXT_PATH = '/'
|
||||
|
@ -49,6 +49,11 @@ export interface SafetyInspectionVO {
|
||||
*/
|
||||
correctorName: string;
|
||||
|
||||
/**
|
||||
* 整改期限
|
||||
*/
|
||||
rectificationDeadline: string;
|
||||
|
||||
/**
|
||||
* 是否回复(1回复 2不回复)
|
||||
*/
|
||||
@ -171,6 +176,11 @@ export interface SafetyInspectionForm extends BaseEntity {
|
||||
*/
|
||||
correctorId?: string | number;
|
||||
|
||||
/**
|
||||
* 整改期限
|
||||
*/
|
||||
rectificationDeadline: string;
|
||||
|
||||
/**
|
||||
* 是否回复(1回复 2不回复)
|
||||
*/
|
||||
|
@ -16,7 +16,9 @@
|
||||
<el-descriptions-item label-align="center" label="检查时间">{{ safetyInspectionDetail?.checkTime }} </el-descriptions-item>
|
||||
<el-descriptions-item label-align="center" label="检查人">{{ safetyInspectionDetail?.creatorName }} </el-descriptions-item>
|
||||
<el-descriptions-item label-align="center" label="整改人">{{ safetyInspectionDetail?.correctorName }} </el-descriptions-item>
|
||||
<el-descriptions-item label-align="center" label="要求整改期限">{{ safetyInspectionDetail?.rectificationTime }} </el-descriptions-item>
|
||||
<el-descriptions-item label-align="center" label="要求整改期限">
|
||||
{{ dayjs(safetyInspectionDetail?.rectificationDeadline).format('YYYY 年 MM 月 DD 日') }}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<div class="table-title">巡检结果</div>
|
||||
<el-descriptions :column="2" border label-width="160px">
|
||||
@ -78,6 +80,7 @@ import { SafetyInspectionVO } from '@/api/safety/safetyInspection/types';
|
||||
import { getSafetyInspection } from '@/api/safety/safetyInspection';
|
||||
import { listByIds } from '@/api/system/oss';
|
||||
import { OssVO } from '@/api/system/oss/types';
|
||||
import dayjs from 'dayjs';
|
||||
|
||||
interface Props {
|
||||
safetyInspectionId?: string | number;
|
||||
@ -121,6 +124,8 @@ watch(
|
||||
() => props.safetyInspectionId,
|
||||
(newId, oldId) => {
|
||||
if (newId !== oldId) {
|
||||
checkFileList.value = undefined;
|
||||
rectificationFileList.value = undefined;
|
||||
get();
|
||||
}
|
||||
}
|
||||
|
@ -14,21 +14,11 @@
|
||||
<el-option v-for="dict in safety_inspection_violation_type" :key="dict.value" :label="dict.label" :value="dict.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否回复" prop="isReply">
|
||||
<el-select v-model="queryParams.isReply" placeholder="请选择是否回复" clearable>
|
||||
<el-option v-for="dict in reply_type" :key="dict.value" :label="dict.label" :value="dict.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="处理状态" prop="status">
|
||||
<el-select v-model="queryParams.status" placeholder="请选择工单状态" clearable>
|
||||
<el-option v-for="dict in safety_inspection_type" :key="dict.value" :label="dict.label" :value="dict.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="复查状态" prop="reviewType">
|
||||
<el-select v-model="queryParams.reviewType" placeholder="请选择复查状态" clearable>
|
||||
<el-option v-for="dict in review_type" :key="dict.value" :label="dict.label" :value="dict.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
@ -82,21 +72,15 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="巡检结果" align="center" prop="inspectionResult" />
|
||||
<el-table-column label="整改人" align="center" prop="correctorName" />
|
||||
<el-table-column label="复查情况" align="center" prop="review" />
|
||||
<el-table-column label="复查状态" align="center" prop="reviewType">
|
||||
<template #default="scope">
|
||||
<dict-tag :options="review_type" :value="scope.row.reviewType" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="复查时间" align="center" prop="reviewTime" width="180">
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.reviewTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="220">
|
||||
<template #default="scope">
|
||||
<el-space wrap>
|
||||
<el-space>
|
||||
<el-button link type="primary" icon="View" @click="handleShowDialog(scope.row)" v-hasPermi="['safety:safetyInspection:query']">
|
||||
详情
|
||||
</el-button>
|
||||
@ -114,8 +98,8 @@
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||
</el-card>
|
||||
<!-- 添加或修改安全巡检工单对话框 -->
|
||||
<el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
|
||||
<el-form ref="safetyInspectionFormRef" :model="form" :rules="rules" label-width="80px">
|
||||
<el-dialog :title="dialog.title" v-model="dialog.visible" append-to-body>
|
||||
<el-form ref="safetyInspectionFormRef" :model="form" :rules="rules" label-width="120px">
|
||||
<el-form-item label="检查类型" prop="checkType">
|
||||
<el-select v-model="form.checkType" placeholder="请选择检查类型">
|
||||
<el-option v-for="dict in safety_inspection_check_type" :key="dict.value" :label="dict.label" :value="dict.value"></el-option>
|
||||
@ -139,51 +123,20 @@
|
||||
<el-option v-for="item in foremanOpt" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否回复" prop="isReply">
|
||||
<el-select v-model="form.isReply" placeholder="请选择是否回复">
|
||||
<el-option v-for="dict in reply_type" :key="dict.value" :label="dict.label" :value="dict.value"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="回复日期" prop="replyDate">
|
||||
<el-date-picker clearable v-model="form.replyDate" type="datetime" value-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择回复日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="工单状态" prop="status">
|
||||
<el-select v-model="form.status" placeholder="请选择工单状态">
|
||||
<el-option v-for="dict in safety_inspection_type" :key="dict.value" :label="dict.label" :value="dict.value"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="问题隐患" prop="hiddenDanger">
|
||||
<el-input v-model="form.hiddenDanger" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
<el-form-item label="整改措施" prop="measure">
|
||||
<el-input v-model="form.measure" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
<el-form-item label="复查情况" prop="review">
|
||||
<el-input v-model="form.review" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
<el-form-item label="复查状态" prop="reviewType">
|
||||
<el-select v-model="form.reviewType" placeholder="请选择复查状态">
|
||||
<el-option v-for="dict in review_type" :key="dict.value" :label="dict.label" :value="dict.value"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="检查时间" prop="checkTime">
|
||||
<el-date-picker clearable v-model="form.checkTime" type="datetime" value-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择检查时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="整改时间" prop="rectificationTime">
|
||||
<el-date-picker clearable v-model="form.rectificationTime" type="datetime" value-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择整改时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="复查时间" prop="reviewTime">
|
||||
<el-date-picker clearable v-model="form.reviewTime" type="datetime" value-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择复查时间">
|
||||
</el-date-picker>
|
||||
<el-form-item label="要求整改期限" prop="checkTime">
|
||||
<el-date-picker clearable v-model="form.rectificationDeadline" type="date" value-format="YYYY-MM-DD" placeholder="选择要求整改期限" />
|
||||
</el-form-item>
|
||||
<el-form-item label="检查附件" prop="checkFile">
|
||||
<file-upload v-model="form.checkFile" />
|
||||
<file-upload v-model="form.checkFile" :file-size="20" :file-type="['doc', 'docx', 'pdf', 'png', 'jpg', 'jpeg']" />
|
||||
</el-form-item>
|
||||
<el-form-item label="整改附件" prop="rectificationFile">
|
||||
<image-upload v-model="form.rectificationFile" />
|
||||
<file-upload v-model="form.rectificationFile" :file-size="20" :file-type="['doc', 'docx', 'pdf', 'png', 'jpg', 'jpeg']" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
||||
@ -250,6 +203,7 @@ const initFormData: SafetyInspectionForm = {
|
||||
inspectionResult: undefined,
|
||||
teamId: undefined,
|
||||
correctorId: undefined,
|
||||
rectificationDeadline: undefined,
|
||||
isReply: undefined,
|
||||
replyDate: undefined,
|
||||
status: undefined,
|
||||
@ -292,7 +246,9 @@ const data = reactive<PageData<SafetyInspectionForm, SafetyInspectionQuery>>({
|
||||
},
|
||||
rules: {
|
||||
id: [{ required: true, message: '主键ID不能为空', trigger: 'blur' }],
|
||||
projectId: [{ required: true, message: '项目ID不能为空', trigger: 'blur' }]
|
||||
projectId: [{ required: true, message: '项目ID不能为空', trigger: 'blur' }],
|
||||
checkType: [{ required: true, message: '检查类型不能为空', trigger: 'blur' }],
|
||||
violationType: [{ required: true, message: '违章类型不能为空', trigger: 'blur' }]
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -95,6 +95,7 @@ watch(
|
||||
() => props.safetyLogId,
|
||||
(newId, oldId) => {
|
||||
if (newId !== oldId) {
|
||||
fileList.value = undefined;
|
||||
get();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user