refactor(qms): 单一事件改为开始时间和结束时间

- 修改了 QcInspectionMain 和 QcUnqualifiedReview 模型,增加了开始时间和结束时间字段
- 更新了相关的 BO、VO 和 Mapper 文件
- 删除了 IQcUnqualifiedRecordService 和 IQcUnqualifiedReviewService 接口中未实现的方法
master
zch 3 days ago
parent a578de81ca
commit 925694f554

@ -28,29 +28,25 @@ import java.util.Map;
@RequestMapping("/qcMobile")
public class QcPDAController {
//检测类型关联主键获取qcInspectionType的字典值0首检 1专检 2自检 3互检 4原材料检 5抽检 6成品检
private final IQcInspectionTypeService qcInspectionTypeService;
//检测项类别
private final IQcInspectionItemCategoryService qcInspectionItemCategoryService;
//检测项定义
private final IQcInspectionItemService qcInspectionItemService;
//检测模板主表
private final IQcInspectionTemplateService qcInspectionTemplateService;
//检测模板子表
private final IQcTemplateItemService qcTemplateItemService;
//检测类型关联主键获取qcInspectionType的字典值0首检 1专检 2自检 3互检 4原材料检 5抽检 6成品检
private final IQcInspectionTypeService qcInspectionTypeService;
//质检主表(质检任务)
private final IQcInspectionMainService qcInspectionMainService;
//质检结果子表
private final IQcInspectionResultService qcInspectionResultService;
//检测项类别
private final IQcInspectionItemCategoryService qcInspectionItemCategoryService;
//检测项定义
private final IQcInspectionItemService qcInspectionItemService;
//不合格品待评审
private final IQcUnqualifiedReviewService qcUnqualifiedReviewService;
//不合格品评审记录
private final IQcUnqualifiedRecordService qcUnqualifiedRecordService;

@ -117,9 +117,15 @@ public class QcInspectionMain extends TenantEntity {
private String team;
/**
*
*
*/
private Date inspectionTime;
private Date inspectionStartTime;
/**
*
*/
private Date inspectionEndTime;
/**
*

@ -121,9 +121,14 @@ public class QcUnqualifiedReview extends TenantEntity {
private Long reviewerId;
/**
*
*
*/
private Date reviewTime;
private Date reviewStartTime;
/**
*
*/
private Date reviewEndTime;
/**
*

@ -121,9 +121,14 @@ public class QcInspectionMainBo extends BaseEntity {
private String team;
/**
*
*
*/
private Date inspectionTime;
private Date inspectionStartTime;
/**
*
*/
private Date inspectionEndTime;
/**
*

@ -1,5 +1,6 @@
package org.dromara.qms.domain.bo;
import com.alibaba.excel.annotation.ExcelProperty;
import org.dromara.qms.domain.QcUnqualifiedReview;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
@ -119,9 +120,14 @@ public class QcUnqualifiedReviewBo extends BaseEntity {
private Long reviewerId;
/**
*
*
*/
private Date reviewTime;
private Date reviewStartTime;
/**
*
*/
private Date reviewEndTime;
/**
*

@ -148,10 +148,16 @@ public class QcInspectionMainVo implements Serializable {
private String team;
/**
*
*
*/
@ExcelProperty(value = "检验时间")
private Date inspectionTime;
@ExcelProperty(value = "检验开始时间")
private Date inspectionStartTime;
/**
*
*/
@ExcelProperty(value = "检验结束时间")
private Date inspectionEndTime;
/**
*

@ -148,10 +148,16 @@ public class QcUnqualifiedReviewVo implements Serializable {
private Long reviewerId;
/**
*
*
*/
@ExcelProperty(value = "评审时间")
private Date reviewTime;
@ExcelProperty(value = "评审开始时间")
private Date reviewStartTime;
/**
*
*/
@ExcelProperty(value = "评审结束时间")
private Date reviewEndTime;
/**
*

@ -13,7 +13,7 @@ import java.util.List;
* Service
*
* @author zch
* @date 2025-07-18
* @date 2025-07-25
*/
public interface IQcUnqualifiedRecordService {
@ -66,31 +66,4 @@ public interface IQcUnqualifiedRecordService {
* @return
*/
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
/**
* PDA
*
* @param bo
* @param pageQuery
* @return
*/
TableDataInfo<QcUnqualifiedRecordVo> queryPageListWithDetails(QcUnqualifiedRecordBo bo, PageQuery pageQuery);
/**
* PDA
*
* @param reviewer
* @param pageQuery
* @return
*/
TableDataInfo<QcUnqualifiedRecordVo> queryPageUserRecords(String reviewer, PageQuery pageQuery);
/**
* PDA
*
* @param bo
* @param pageQuery
* @return
*/
TableDataInfo<QcUnqualifiedRecordVo> queryPageRecordsByDateRange(QcUnqualifiedRecordBo bo, PageQuery pageQuery);
}

@ -1,8 +1,6 @@
package org.dromara.qms.service;
import org.dromara.qms.domain.QcUnqualifiedReview;
import org.dromara.qms.domain.vo.QcInspectionMainVo;
import org.dromara.qms.domain.vo.QcInspectionResultVo;
import org.dromara.qms.domain.vo.QcUnqualifiedReviewVo;
import org.dromara.qms.domain.bo.QcUnqualifiedReviewBo;
import org.dromara.common.mybatis.core.page.TableDataInfo;
@ -10,13 +8,12 @@ import org.dromara.common.mybatis.core.page.PageQuery;
import java.util.Collection;
import java.util.List;
import java.util.Map;
/**
* Service
*
* @author zch
* @date 2025-07-18
* @date 2025-07-25
*/
public interface IQcUnqualifiedReviewService {
@ -69,44 +66,4 @@ public interface IQcUnqualifiedReviewService {
* @return
*/
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
/**
* (for PDA)
*/
TableDataInfo<QcUnqualifiedReviewVo> queryPagePendingReviews(QcUnqualifiedReviewBo bo, PageQuery pageQuery);
/**
* (for PDA)
*/
QcUnqualifiedReviewVo queryByIdWithItems(Long reviewId);
/**
* (for PDA),
*/
Boolean submitReview(QcUnqualifiedReviewBo bo);
/**
* (for PDA)
*
* @param dateRange
* @return
*/
Map<String, Object> getUnqualifiedSummary(String dateRange);
/**
* (for PDA)
*
* @param bo
* @return
*/
Boolean triggerWorkflowProcess(QcUnqualifiedReviewBo bo);
/**
*
*
* @param inspectionVo
* @param inspectionResults
* @return
*/
Boolean autoGenerateUnqualifiedReview(QcInspectionMainVo inspectionVo, List<QcInspectionResultVo> inspectionResults);
}

@ -98,7 +98,8 @@ public class QcInspectionMainServiceImpl implements IQcInspectionMainService {
.eq(StringUtils.isNotBlank(bo.getInspector()), QcInspectionMain::getInspector, bo.getInspector())
.eq(StringUtils.isNotBlank(bo.getShift()), QcInspectionMain::getShift, bo.getShift())
.eq(StringUtils.isNotBlank(bo.getTeam()), QcInspectionMain::getTeam, bo.getTeam())
.eq(bo.getInspectionTime() != null, QcInspectionMain::getInspectionTime, bo.getInspectionTime())
.eq(bo.getInspectionStartTime() != null, QcInspectionMain::getInspectionStartTime, bo.getInspectionStartTime())
.eq(bo.getInspectionEndTime() != null, QcInspectionMain::getInspectionEndTime, bo.getInspectionEndTime())
.eq(StringUtils.isNotBlank(bo.getProductionOrder()), QcInspectionMain::getProductionOrder, bo.getProductionOrder())
.eq(StringUtils.isNotBlank(bo.getBatchNo()), QcInspectionMain::getBatchNo, bo.getBatchNo())
.eq(StringUtils.isNotBlank(bo.getBarcode()), QcInspectionMain::getBarcode, bo.getBarcode())

@ -92,7 +92,9 @@ public class QcUnqualifiedReviewServiceImpl implements IQcUnqualifiedReviewServi
.eq(bo.getInspectorId() != null, QcUnqualifiedReview::getInspectorId, bo.getInspectorId())
.eq(StringUtils.isNotBlank(bo.getReviewer()), QcUnqualifiedReview::getReviewer, bo.getReviewer())
.eq(bo.getReviewerId() != null, QcUnqualifiedReview::getReviewerId, bo.getReviewerId())
.eq(bo.getReviewTime() != null, QcUnqualifiedReview::getReviewTime, bo.getReviewTime())
// .eq(bo.getReviewTime() != null, QcUnqualifiedReview::getReviewTime, bo.getReviewTime())
.eq(bo.getReviewStartTime() != null, QcUnqualifiedReview::getReviewStartTime, bo.getReviewStartTime())
.eq(bo.getReviewEndTime() != null, QcUnqualifiedReview::getReviewEndTime, bo.getReviewEndTime())
.orderByDesc(QcUnqualifiedReview::getCreateTime);
return lqw;
}

@ -24,7 +24,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="inspector" column="inspector" />
<result property="shift" column="shift" />
<result property="team" column="team" />
<result property="inspectionTime" column="inspection_time" />
<result property="inspectionStartTime" column="inspection_start_time" />
<result property="inspectionEndTimeTime" column="inspection_end_time" />
<result property="productionOrder" column="production_order" />
<result property="batchNo" column="batch_no" />
<result property="barcode" column="barcode" />
@ -34,7 +36,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<sql id="selectQcInspectionMainVo">
select inspection_id, tenant_id,
plan_detail_id,
plan_detail_id,inspection_end_time,inspection_start_time,
inspection_no, template_id, material_code, material_type, material_name, process_name, station_name, inspection_qty, qualified_qty, unqualified_qty, result, workshop, inspection_type, status, inspector, shift, team, inspection_time, production_order, batch_no, barcode, supplier_name, remark, create_dept, create_by, create_time, update_by, update_time, del_flag
from qc_inspection_main
</sql>
@ -61,7 +63,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="inspector != null and inspector != ''"> and inspector = #{inspector}</if>
<if test="shift != null and shift != ''"> and shift = #{shift}</if>
<if test="team != null and team != ''"> and team = #{team}</if>
<if test="inspectionTime != null "> and inspection_time = #{inspectionTime}</if>
<if test="inspectionStarTime != null "> and inspection_start_time = #{inspectionStarTime}</if>
<if test="inspectionEndTime != null "> and inspection_end_time = #{inspectionEndTime}</if>
<if test="productionOrder != null and productionOrder != ''"> and production_order = #{productionOrder}</if>
<if test="batchNo != null and batchNo != ''"> and batch_no = #{batchNo}</if>
<if test="barcode != null and barcode != ''"> and barcode = #{barcode}</if>

@ -24,12 +24,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="inspectorId" column="inspector_id" />
<result property="reviewer" column="reviewer" />
<result property="reviewerId" column="reviewer_id" />
<result property="reviewTime" column="review_time" />
<result property="reviewStartTimeTime" column="review_start_time" />
<result property="reviewEndTimeTime" column="review_end_time" />
<result property="remark" column="remark" />
</resultMap>
<sql id="selectQcUnqualifiedReviewVo">
select review_id, tenant_id, unqualified_review_no, review_result, inspection_no, inspection_type, production_date, work_order_no, process_name, material_name, material_code, material_spec, supplier_name, supplier_code, inspection_qty, batch_no, inspector, inspector_id, reviewer, reviewer_id, review_time, remark, create_dept, create_by, create_time, update_by, update_time, del_flag
select review_id, tenant_id, unqualified_review_no, review_result, inspection_no, inspection_type, production_date, work_order_no, process_name, material_name, material_code, material_spec, supplier_name, supplier_code, inspection_qty, batch_no, inspector, inspector_id, reviewer, reviewer_id, review_time, remark,
review_start_time, review_end_time,
create_dept, create_by, create_time, update_by, update_time, del_flag
from qc_unqualified_review
</sql>
@ -55,7 +60,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="inspectorId != null "> and inspector_id = #{inspectorId}</if>
<if test="reviewer != null and reviewer != ''"> and reviewer = #{reviewer}</if>
<if test="reviewerId != null "> and reviewer_id = #{reviewerId}</if>
<if test="reviewTime != null "> and review_time = #{reviewTime}</if>
<if test="reviewStartTime != null "> and review_start_time = #{reviewStartTime}</if>
<if test="reviewEndTime != null "> and review_end_time = #{reviewEndTime}</if>
</where>
AND del_flag = '0'
</select>

Loading…
Cancel
Save