diff --git a/ym-baisc/src/main/java/com/cnbm/basic/service/impl/FactoryServiceImpl.java b/ym-baisc/src/main/java/com/cnbm/basic/service/impl/FactoryServiceImpl.java index 88db7a0..6a45608 100644 --- a/ym-baisc/src/main/java/com/cnbm/basic/service/impl/FactoryServiceImpl.java +++ b/ym-baisc/src/main/java/com/cnbm/basic/service/impl/FactoryServiceImpl.java @@ -3,6 +3,7 @@ package com.cnbm.basic.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; +import com.cnbm.admin.utils.BaseSupportUtils; import com.cnbm.basic.dto.MachineDTO; import com.cnbm.basic.dto.ProductTypeDTO; import com.cnbm.basic.entity.ProductType; @@ -67,6 +68,7 @@ public class FactoryServiceImpl extends CrudServiceImpl @Transactional(rollbackFor = Exception.class) public void save(TeamDTO dto) { Team entity = ConvertUtils.sourceToTarget(dto, Team.class); + BaseSupportUtils.setCommonField(entity); insert(entity); } @@ -67,6 +69,7 @@ public class TeamServiceImpl extends CrudServiceImpl @Transactional(rollbackFor = Exception.class) public void update(TeamDTO dto) { Team entity = ConvertUtils.sourceToTarget(dto, Team.class); + BaseSupportUtils.setUpdateCommonField(entity); updateById(entity); } diff --git a/ym-baisc/src/main/java/com/cnbm/basic/service/impl/UnitServiceImpl.java b/ym-baisc/src/main/java/com/cnbm/basic/service/impl/UnitServiceImpl.java index d8ead65..0022850 100644 --- a/ym-baisc/src/main/java/com/cnbm/basic/service/impl/UnitServiceImpl.java +++ b/ym-baisc/src/main/java/com/cnbm/basic/service/impl/UnitServiceImpl.java @@ -3,6 +3,7 @@ package com.cnbm.basic.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; +import com.cnbm.admin.utils.BaseSupportUtils; import com.cnbm.basic.dto.FactoryDTO; import com.cnbm.common.page.PageData; import com.cnbm.common.service.impl.CrudServiceImpl; @@ -64,6 +65,7 @@ public class UnitServiceImpl extends CrudServiceImpl @Transactional(rollbackFor = Exception.class) public void save(UnitDTO dto) { Unit entity = ConvertUtils.sourceToTarget(dto, Unit.class); + BaseSupportUtils.setCommonField(entity); insert(entity); } @@ -71,6 +73,7 @@ public class UnitServiceImpl extends CrudServiceImpl @Transactional(rollbackFor = Exception.class) public void update(UnitDTO dto) { Unit entity = ConvertUtils.sourceToTarget(dto, Unit.class); + BaseSupportUtils.setUpdateCommonField(entity); updateById(entity); } diff --git a/ym-baisc/src/main/java/com/cnbm/basic/service/impl/WorkingProcedureServiceImpl.java b/ym-baisc/src/main/java/com/cnbm/basic/service/impl/WorkingProcedureServiceImpl.java index 07008f9..76ec41c 100644 --- a/ym-baisc/src/main/java/com/cnbm/basic/service/impl/WorkingProcedureServiceImpl.java +++ b/ym-baisc/src/main/java/com/cnbm/basic/service/impl/WorkingProcedureServiceImpl.java @@ -3,6 +3,7 @@ package com.cnbm.basic.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; +import com.cnbm.admin.utils.BaseSupportUtils; import com.cnbm.basic.dto.UnitDTO; import com.cnbm.basic.dto.WorkingProcedureTypeDTO; import com.cnbm.basic.entity.Machine; @@ -107,6 +108,7 @@ public class WorkingProcedureServiceImpl extends CrudServiceImpl wrapper = new QueryWrapper<>(); + DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd"); + if( ObjectUtils.isNotNull(params.get("startTime")) && ObjectUtils.isNotNull(params.get("endTime"))){ + LocalDateTime startTime = LocalDate.parse(params.get("startTime").toString(),df).atStartOfDay(); + LocalDateTime endTime = LocalDate.parse(params.get("endTime").toString(),df).atStartOfDay(); + wrapper.between(startTime!=null && endTime!=null,"create_time", startTime, endTime); + } wrapper.like(ObjectUtils.isNotNull(id), "id", id); wrapper.like(StringUtils.isNotBlank(inspectionSite), "inspection_stage", inspectionSite); wrapper.like(StringUtils.isNotBlank(orderNumber), "order_number", orderNumber); @@ -187,6 +192,7 @@ public class InspectionSheetServiceImpl extends CrudServiceImpl