feat(inspectiontask): 新增质量检测项模块及相关接口和实现
- 创建QualityInspectItem实体类映射数据库表quality_inspect_item
- 定义QualityInspectItemMapper提供分页查询接口listPage
- 增加QualityInspectItemService接口及实现类,完成CRUD功能和分页查询
- 修改InspectItemDto中id类型由String改为Long以统一数据类型
- 新增MyBatis XML映射文件,配置查询SQL及结果映射
- 添加接口请求示例文档定义相关REST接口请求结构和参数说明
| | |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | public class InspectItemDto { |
| | | private String id; |
| | | private Long id; |
| | | private String name; |
| | | private String unit; |
| | | private String standardValue; |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspectiontask.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.inspectiontask.pojo.QualityInspectItem; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.inspectiontask.vo.InspectItemVo; |
| | | import com.ruoyi.inspectiontask.vo.SearchInspectItemVo; |
| | | |
| | | /** |
| | | * @author buhuazhen |
| | | * @description é对表ãquality_inspect_item(è´¨éæ£æµé¡¹)ãçæ°æ®åºæä½Mapper |
| | | * @createDate 2026-03-13 16:29:59 |
| | | * @Entity com.ruoyi.inspectiontask.pojo.QualityInspectItem |
| | | */ |
| | | public interface QualityInspectItemMapper extends BaseMapper<QualityInspectItem> { |
| | | |
| | | Page<InspectItemVo> listPage(SearchInspectItemVo searchInspectItemVo); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspectiontask.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * è´¨éæ£æµé¡¹ |
| | | * @TableName quality_inspect_item |
| | | */ |
| | | @TableName(value ="quality_inspect_item") |
| | | @Data |
| | | public class QualityInspectItem implements Serializable { |
| | | /** |
| | | * |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 项ç®åç§° |
| | | */ |
| | | @TableField(value = "name") |
| | | private String name; |
| | | |
| | | /** |
| | | * åä½ |
| | | */ |
| | | @TableField(value = "unit") |
| | | private String unit; |
| | | |
| | | /** |
| | | * æ åå¼ |
| | | */ |
| | | @TableField(value = "standard_value") |
| | | private String standardValue; |
| | | |
| | | /** |
| | | * å
æ§å¼ |
| | | */ |
| | | @TableField(value = "internal_control") |
| | | private String internalControl; |
| | | |
| | | /** |
| | | * åéªå¼ |
| | | */ |
| | | @TableField(value = "test_value") |
| | | private String testValue; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | @TableField(value = "is_delete") |
| | | private Integer isDelete; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | @TableField(value = "create_time",fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | @TableField(value = "update_time",fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | @TableField(value = "create_user_name",fill = FieldFill.INSERT) |
| | | private String createUserName; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | @TableField(value = "create_user",fill = FieldFill.INSERT) |
| | | private Long createUser; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | @TableField(value = "update_user_name",fill = FieldFill.INSERT_UPDATE) |
| | | private String updateUserName; |
| | | |
| | | @TableField(value = "update_user",fill = FieldFill.INSERT_UPDATE) |
| | | private Long updateUser; |
| | | |
| | | @TableField(exist = false) |
| | | private static final long serialVersionUID = 1L; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspectiontask.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.inspectiontask.dto.InspectItemDto; |
| | | import com.ruoyi.inspectiontask.pojo.QualityInspectItem; |
| | | import com.ruoyi.inspectiontask.vo.InspectItemVo; |
| | | import com.ruoyi.inspectiontask.vo.SearchInspectItemVo; |
| | | |
| | | import javax.annotation.Nullable; |
| | | import javax.validation.constraints.NotNull; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author buhuazhen |
| | | * @description é对表ãquality_inspect_item(è´¨éæ£æµé¡¹)ãçæ°æ®åºæä½Service |
| | | * @createDate 2026-03-13 16:29:59 |
| | | */ |
| | | public interface QualityInspectItemService extends IService<QualityInspectItem> { |
| | | |
| | | Page<InspectItemVo> listPage(@NotNull SearchInspectItemVo searchInspectItemVo); |
| | | |
| | | void save(@NotNull InspectItemDto inspectItemDto); |
| | | |
| | | void delete(@Nullable List<Long> ids); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspectiontask.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.inspectiontask.dto.InspectItemDto; |
| | | import com.ruoyi.inspectiontask.pojo.QualityInspectItem; |
| | | import com.ruoyi.inspectiontask.service.QualityInspectItemService; |
| | | import com.ruoyi.inspectiontask.mapper.QualityInspectItemMapper; |
| | | import com.ruoyi.inspectiontask.vo.InspectItemVo; |
| | | import com.ruoyi.inspectiontask.vo.SearchInspectItemVo; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author buhuazhen |
| | | * @description é对表ãquality_inspect_item(è´¨éæ£æµé¡¹)ãçæ°æ®åºæä½Serviceå®ç° |
| | | * @createDate 2026-03-13 16:29:59 |
| | | */ |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | @Transactional(readOnly = true) |
| | | public class QualityInspectItemServiceImpl extends ServiceImpl<QualityInspectItemMapper, QualityInspectItem> |
| | | implements QualityInspectItemService{ |
| | | |
| | | private final QualityInspectItemMapper qualityInspectItemMapper; |
| | | |
| | | |
| | | @Override |
| | | public Page<InspectItemVo> listPage(SearchInspectItemVo searchInspectItemVo) { |
| | | return qualityInspectItemMapper.listPage(searchInspectItemVo); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional |
| | | public void save(InspectItemDto inspectItemDto) { |
| | | QualityInspectItem qualityInspectItem = new QualityInspectItem(); |
| | | BeanUtils.copyProperties(inspectItemDto, qualityInspectItem); |
| | | |
| | | if(qualityInspectItem.getId() == null){ |
| | | qualityInspectItemMapper.insert(qualityInspectItem); |
| | | }else { |
| | | qualityInspectItemMapper.updateById(qualityInspectItem); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | @Transactional |
| | | public void delete(List<Long> ids) { |
| | | if(CollectionUtils.isEmpty(ids)){ |
| | | return; |
| | | } |
| | | LambdaUpdateWrapper<QualityInspectItem> updateWrapper = new LambdaUpdateWrapper<>(); |
| | | updateWrapper.in(QualityInspectItem::getId, ids).set(QualityInspectItem::getIsDelete, 1); |
| | | qualityInspectItemMapper.update(null, updateWrapper); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.inspectiontask.mapper.QualityInspectItemMapper"> |
| | | |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.inspectiontask.pojo.QualityInspectItem"> |
| | | <id property="id" column="id" jdbcType="BIGINT"/> |
| | | <result property="name" column="name" jdbcType="VARCHAR"/> |
| | | <result property="unit" column="unit" jdbcType="VARCHAR"/> |
| | | <result property="standardValue" column="standard_value" jdbcType="VARCHAR"/> |
| | | <result property="internalControl" column="internal_control" jdbcType="VARCHAR"/> |
| | | <result property="testValue" column="test_value" jdbcType="VARCHAR"/> |
| | | <result property="isDelete" column="is_delete" jdbcType="INTEGER"/> |
| | | <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> |
| | | <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/> |
| | | <result property="createUserName" column="create_user_name" jdbcType="VARCHAR"/> |
| | | <result property="createUser" column="create_user" jdbcType="BIGINT"/> |
| | | <result property="updateUserName" column="update_user_name" jdbcType="VARCHAR"/> |
| | | </resultMap> |
| | | |
| | | <sql id="Base_Column_List"> |
| | | id,name,unit, |
| | | standard_value,internal_control,test_value, |
| | | is_delete,create_time,update_time, |
| | | create_user_name,create_user,update_user_name |
| | | </sql> |
| | | |
| | | <select id="listPage" resultType="com.ruoyi.inspectiontask.vo.InspectItemVo"> |
| | | select t1.* from quality_inspect_item as t1 |
| | | where t1.is_delete = 0 |
| | | <if test="name != null and name != ''"> |
| | | and t1.name like concat('%', #{name}, '%') |
| | | </if> |
| | | order by t1.create_time desc |
| | | </select> |
| | | </mapper> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | ### 计åä¿å |
| | | POST {{host}}/projectManagement/plan/save |
| | | Content-Type: application/json |
| | | Authorization: {{token}} |
| | | |
| | | { |
| | | "id": null, |
| | | "name": "计ååç§°", |
| | | "description": "计åæè¿°", |
| | | "attachmentIds": [ |
| | | 1, |
| | | 2, |
| | | 3 |
| | | ], |
| | | "savePlanNodeList": [ |
| | | { |
| | | "name": "åèç¹1", |
| | | "leaderId": "111", |
| | | "leaderName": "å¼ é¹ä¸¾", |
| | | "estimatedDuration": 7, |
| | | "hourlyRate": "55.76", |
| | | "workContent": "å·¥ä½å
容" |
| | | } |
| | | ] |
| | | } |
| | | |
| | | ### 计åå表 |
| | | POST {{host}}/projectManagement/plan/listPage |
| | | Content-Type: application/json |
| | | Authorization: {{token}} |
| | | |
| | | { |
| | | "size": 10, |
| | | "current": 1 |
| | | } |
| | | |
| | | |
| | | ### 计åå é¤ |
| | | POST {{host}}/projectManagement/plan/delete/6 |
| | | Content-Type: application/json |
| | | Authorization: {{token}} |
| | | |
| | | ### 项ç®ç®¡çä¿å |
| | | POST {{host}}/projectManagement/info/save |
| | | Content-Type: application/json |
| | | Authorization: {{token}} |
| | | |
| | | { |
| | | "info": { |
| | | "id": null, |
| | | "no": "", |
| | | "title": "主é¢", |
| | | "clientId": 11, |
| | | "clientName": "客æ·åç§°", |
| | | "projectManagementInfoParentId": null, |
| | | "projectManagementPlanId": 17, |
| | | "establishTime": "2023-04-01", |
| | | "source": "æ¥æº", |
| | | "managerId": 11, |
| | | "managerName": "ç»ç", |
| | | "salesmanId": 22, |
| | | "salesmanName": "ä¸å¡å", |
| | | "planStartTime": "2023-04-01", |
| | | "planEndTime": "2023-10-11", |
| | | "actualStartTime": "2023-04-01", |
| | | "actualEndTime": "2023-10-11", |
| | | "departmentId": 33, |
| | | "departmentName": "é¨é¨", |
| | | "orderDate": "2023-04-01", |
| | | "orderAmount": "22.444", |
| | | "remark": "夿³¨", |
| | | "attachmentIds": [1,2,3,4], |
| | | "teamList":[ |
| | | { |
| | | "userId":111, |
| | | "userName": "å¼ ä¸", |
| | | "userRoleId": "1", |
| | | "userRoleName": "ç»ç", |
| | | "joinTime": "2023-04-01", |
| | | "departTime": "2023-04-01", |
| | | "contact": "èç³»", |
| | | "remark": "夿³¨" |
| | | } |
| | | ] |
| | | }, |
| | | "shippingAddress": { |
| | | "id": null, |
| | | "consignee": "æ¶è´§äºº", |
| | | "contract": "èç³»æ¹å¼", |
| | | "address": "å°åxxxx" |
| | | }, |
| | | "contractInfo": { |
| | | "id": null, |
| | | "name": "è系人", |
| | | "sex": "ç·", |
| | | "birthday": "çæ¥", |
| | | "department": "é¨é¨", |
| | | "job": "èå¡", |
| | | "phoneNumber": "ææºå·", |
| | | "email": "é®ç®±", |
| | | "qq": "qq", |
| | | "lineaFissa": "åºå®çµè¯", |
| | | "wx": "微信", |
| | | "origineEtnica": "ç±è´¯", |
| | | "rappresentanteLegale": "æ³äººä»£è¡¨" |
| | | }, |
| | | "salesLedgerProductList": null |
| | | } |
| | | |
| | | |
| | | ### å é¤äº§åä¿¡æ¯ è·åsalesLedgerProductListä¸çidè¿è¡å é¤ |
| | | DELETE {{host}}/sales/product/delProduct |
| | | Content-Type: application/json |
| | | Authorization: {{token}} |
| | | |
| | | [1,2,3,4] |
| | | |
| | | ### ä¿®æ¹å®¡æ ¸ç¶æ reviewStatus(0 å¾
å®¡æ ¸ 1 å®¡æ ¸éè¿ 2 å®¡æ ¸æªéè¿) |
| | | POST {{host}}/projectManagement/info/updateStatus |
| | | Content-Type: application/json |
| | | Authorization: {{token}} |
| | | |
| | | { |
| | | "id": 1, |
| | | "reviewStatus": "1", |
| | | } |
| | | |
| | | ### å表æ¥è¯¢ |
| | | POST {{host}}/projectManagement/info/listPage |
| | | Content-Type: application/json |
| | | Authorization: {{token}} |
| | | |
| | | { |
| | | "noOrName": "", |
| | | "clientName": "", |
| | | "salesmanName": "", |
| | | "reviewStatus": null, |
| | | "stage": null, |
| | | "size": 10, |
| | | "current": 1 |
| | | } |
| | | |
| | | ### æ¥è¯¢å
·ä½ä¿¡æ¯ |
| | | POST {{host}}/projectManagement/info/23 |
| | | Content-Type: application/json |
| | | Authorization: {{token}} |
| | | |
| | | ### å é¤ä¿¡æ¯ |
| | | POST {{host}}/projectManagement/info/delete/17 |
| | | Content-Type: application/json |
| | | Authorization: {{token}} |
| | | |
| | | |
| | | |
| | | // é¶æ®µ |
| | | |
| | | ### æ°å¢é¡¹ç®é¶æ®µ |
| | | POST {{host}}/projectManagement/info/saveStage |
| | | Content-Type: application/json |
| | | Authorization: {{token}} |
| | | |
| | | { |
| | | "id": null, |
| | | "projectManagementPlanNodeId":20, |
| | | "projectManagementInfoId":23, |
| | | "description": "æè¿°", |
| | | "actualLeaderId": 111, |
| | | "actualLeaderName": "å®é
è´è´£äºº", |
| | | "estimatedDuration": 222, |
| | | "planStartTime": "2023-04-01", |
| | | "planEndTime": "2023-04-01", |
| | | "actualStartTime": "2023-04-01", |
| | | "actualEndTime": "2023-04-01", |
| | | "progress": 1, |
| | | "attachmentIds": [1,2,3,4] |
| | | } |
| | | |
| | | ### æ¥è¯¢é¡¹ç®é¶æ®µæ ¹æ®Id |
| | | POST {{host}}/projectManagement/info/listStage/23 |
| | | Content-Type: application/json |
| | | Authorization: {{token}} |
| | | |
| | | |
| | | ### å é¤é¡¹ç®é¶æ®µæ ¹æ®id |
| | | POST {{host}}/projectManagement/info/deleteStage/5 |
| | | Content-Type: application/json |
| | | Authorization: {{token}} |
| | | |
| | | |
| | | ### è·å项ç®è§è² |
| | | POST {{host}}/projectManagement/roles/listSimpleRole |
| | | Content-Type: application/json |
| | | Authorization: {{token}} |
| | | |
| | | |
| | | ### æ£æµé¡¹ç® |
| | | POST {{host}}/qualityInspectItem/listPage |
| | | Content-Type: application/json |
| | | Authorization: {{token}} |
| | | |
| | | { |
| | | "name": null, |
| | | "size": 10, |
| | | "current": 1 |
| | | } |
| | | |
| | | ### æ£æµé¡¹ç®ä¿å |
| | | POST {{host}}/qualityInspectItem/save |
| | | Content-Type: application/json |
| | | Authorization: {{token}} |
| | | |
| | | { |
| | | "id": null, |
| | | "name": "æ£æµé¡¹ç®åç§°", |
| | | "unit": "åä½", |
| | | "standardValue": "æ åå¼", |
| | | "internalControl": "å
æ§å¼", |
| | | "testValue": "åéªå¼" |
| | | } |
| | | |
| | | |
| | | ### æ£æµé¡¹ç®å é¤ |
| | | POST {{host}}/qualityInspectItem/delete |
| | | Content-Type: application/json |
| | | Authorization: {{token}} |
| | | |
| | | [1,2] |