From 65fd581bef13be2380e481cc341b81c58a061a4a Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期四, 20 七月 2023 17:00:23 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
inspection-server/src/main/java/com/yuanchu/limslaboratory/service/impl/InspectionServiceImpl.java | 45 +++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 45 insertions(+), 0 deletions(-)
diff --git a/inspection-server/src/main/java/com/yuanchu/limslaboratory/service/impl/InspectionServiceImpl.java b/inspection-server/src/main/java/com/yuanchu/limslaboratory/service/impl/InspectionServiceImpl.java
index 4cfef0f..0f49d8c 100644
--- a/inspection-server/src/main/java/com/yuanchu/limslaboratory/service/impl/InspectionServiceImpl.java
+++ b/inspection-server/src/main/java/com/yuanchu/limslaboratory/service/impl/InspectionServiceImpl.java
@@ -1,10 +1,19 @@
package com.yuanchu.limslaboratory.service.impl;
+import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.yuanchu.limslaboratory.pojo.Inspection;
import com.yuanchu.limslaboratory.mapper.InspectionMapper;
+import com.yuanchu.limslaboratory.pojo.InspectionMaterialList;
+import com.yuanchu.limslaboratory.pojo.InspectionProductList;
+import com.yuanchu.limslaboratory.pojo.dto.InspectionDto;
import com.yuanchu.limslaboratory.service.InspectionService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.time.LocalDateTime;
+import java.util.List;
+import java.util.Map;
/**
* <p>
@@ -17,4 +26,40 @@
@Service
public class InspectionServiceImpl extends ServiceImpl<InspectionMapper, Inspection> implements InspectionService {
+ @Resource
+ private InspectionMapper inspectionMapper;
+
+ @Override
+ public Inspection addInspection(String userName,int type) {
+ Inspection inspection = new Inspection(type, 0,1,1, userName);
+ System.out.println(inspection);
+ int judge = inspectionMapper.insert(inspection);
+ System.out.println(judge);
+ return judge>0?inspection:null;
+ }
+
+ @Override
+ public List<InspectionDto> selectAllInspection(int pageSize, int countSize, Integer state) {
+ return inspectionMapper.selectAllInspection((pageSize - 1) * countSize,pageSize * countSize, state);
+ }
+
+ @Override
+ public boolean delInspectionByInsId(String inspectionId) {
+ Inspection inspection = new Inspection();
+ inspection.setState(0);
+ inspection.setId(inspectionId);
+ int judge = inspectionMapper.updateById(inspection);
+ return judge>0;
+
+ }
+
+ @Override
+ public boolean subInspectionByInsId(String inspectionId) {
+ Inspection inspection = new Inspection();
+ inspection.setState(2);
+ inspection.setId(inspectionId);
+ inspection.setInspectStartTime(LocalDateTime.now());
+ int judge = inspectionMapper.updateById(inspection);
+ return judge>0;
+ }
}
--
Gitblit v1.9.3