Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
data-acquisition
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
竹天卫
data-acquisition
Commits
d4cffa84
Commit
d4cffa84
authored
Apr 26, 2021
by
renchao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
送验单模块代码编写
parent
b5305763
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
85 additions
and
58 deletions
+85
-58
TSampleLaboratorysheetController.java
...business/controller/TSampleLaboratorysheetController.java
+7
-7
TSampleListController.java
...cquisition/business/controller/TSampleListController.java
+8
-8
TSampleLaboratorysheetServiceImpl.java
...iness/service/impl/TSampleLaboratorysheetServiceImpl.java
+60
-38
TSampleListServiceImpl.java
...isition/business/service/impl/TSampleListServiceImpl.java
+10
-5
No files found.
acquisition-business/src/main/java/cn/wise/sc/acquisition/business/controller/TSampleLaboratorysheetController.java
View file @
d4cffa84
...
...
@@ -2,7 +2,7 @@ package cn.wise.sc.acquisition.business.controller;
import
cn.wise.sc.acquisition.business.model.query.TSampleLaboratorysheetQuery
;
import
cn.wise.sc.acquisition.business.service.
impl.TSampleLaboratorysheetServiceImpl
;
import
cn.wise.sc.acquisition.business.service.
ITSampleLaboratorysheetService
;
import
com.baomidou.mybatisplus.extension.api.R
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
...
...
@@ -29,7 +29,7 @@ import javax.servlet.http.HttpServletResponse;
public
class
TSampleLaboratorysheetController
{
@Autowired
private
TSampleLaboratorysheetServiceImpl
tSampleLaboratorysheetService
;
private
ITSampleLaboratorysheetService
i
tSampleLaboratorysheetService
;
/**
...
...
@@ -41,7 +41,7 @@ public class TSampleLaboratorysheetController {
@ApiOperation
(
value
=
"根据样号查看分析结果"
)
@RequestMapping
(
value
=
"/getByYh"
,
method
=
RequestMethod
.
GET
)
public
R
getByYh
(
TSampleLaboratorysheetQuery
tSampleLaboratorysheetQuery
)
{
return
tSampleLaboratorysheetService
.
getByYh
(
tSampleLaboratorysheetQuery
);
return
i
tSampleLaboratorysheetService
.
getByYh
(
tSampleLaboratorysheetQuery
);
}
...
...
@@ -54,7 +54,7 @@ public class TSampleLaboratorysheetController {
@ApiOperation
(
value
=
"根据样号修改分析结果"
)
@RequestMapping
(
value
=
"/updateByYh"
,
method
=
RequestMethod
.
POST
)
public
R
updateByYh
(
@RequestBody
TSampleLaboratorysheetQuery
tSampleLaboratorysheetQuery
)
{
return
tSampleLaboratorysheetService
.
updateByYh
(
tSampleLaboratorysheetQuery
);
return
i
tSampleLaboratorysheetService
.
updateByYh
(
tSampleLaboratorysheetQuery
);
}
...
...
@@ -67,7 +67,7 @@ public class TSampleLaboratorysheetController {
@ApiOperation
(
value
=
"根据样号删除分析结果"
)
@RequestMapping
(
value
=
"/deleteByYh"
,
method
=
RequestMethod
.
POST
)
public
R
deleteByYh
(
@RequestBody
TSampleLaboratorysheetQuery
tSampleLaboratorysheetQuery
)
{
return
tSampleLaboratorysheetService
.
deleteByYh
(
tSampleLaboratorysheetQuery
);
return
i
tSampleLaboratorysheetService
.
deleteByYh
(
tSampleLaboratorysheetQuery
);
}
...
...
@@ -80,7 +80,7 @@ public class TSampleLaboratorysheetController {
@ApiOperation
(
value
=
"增加分析结果"
)
@RequestMapping
(
value
=
"/insertTSampleLaboratorysheet"
,
method
=
RequestMethod
.
POST
)
public
R
insertTSampleLaboratorysheet
(
@RequestBody
TSampleLaboratorysheetQuery
tSampleLaboratorysheetQuery
)
{
return
tSampleLaboratorysheetService
.
insertTSampleLaboratorysheet
(
tSampleLaboratorysheetQuery
);
return
i
tSampleLaboratorysheetService
.
insertTSampleLaboratorysheet
(
tSampleLaboratorysheetQuery
);
}
/**
...
...
@@ -92,7 +92,7 @@ public class TSampleLaboratorysheetController {
@ApiOperation
(
value
=
"二维码下载"
)
@RequestMapping
(
value
=
"/getImage"
,
method
=
RequestMethod
.
POST
)
public
R
getImage
(
TSampleLaboratorysheetQuery
tSampleLaboratorysheetQuery
,
final
HttpServletResponse
response
)
{
return
tSampleLaboratorysheetService
.
getImage
(
tSampleLaboratorysheetQuery
,
response
);
return
i
tSampleLaboratorysheetService
.
getImage
(
tSampleLaboratorysheetQuery
,
response
);
}
}
acquisition-business/src/main/java/cn/wise/sc/acquisition/business/controller/TSampleListController.java
View file @
d4cffa84
...
...
@@ -2,7 +2,7 @@ package cn.wise.sc.acquisition.business.controller;
import
cn.wise.sc.acquisition.business.model.query.TSampleListQuery
;
import
cn.wise.sc.acquisition.business.service.
impl.TSampleListServiceImpl
;
import
cn.wise.sc.acquisition.business.service.
ITSampleListService
;
import
cn.wise.sc.acquisition.business.wrapper.page.Query
;
import
com.baomidou.mybatisplus.extension.api.R
;
import
io.swagger.annotations.Api
;
...
...
@@ -28,7 +28,7 @@ import javax.servlet.http.HttpServletResponse;
public
class
TSampleListController
{
@Autowired
private
TSampleListServiceImpl
tSampleListService
;
private
ITSampleListService
i
tSampleListService
;
/**
* 根据条件查询送验单 分页
...
...
@@ -39,7 +39,7 @@ public class TSampleListController {
@ApiOperation
(
value
=
"获取送验单列表 可分页模糊查询"
)
@RequestMapping
(
value
=
"/getPage"
,
method
=
RequestMethod
.
GET
)
public
R
getPage
(
TSampleListQuery
tSampleListQuery
,
Query
query
)
{
return
tSampleListService
.
getPage
(
tSampleListQuery
,
query
);
return
i
tSampleListService
.
getPage
(
tSampleListQuery
,
query
);
}
...
...
@@ -52,7 +52,7 @@ public class TSampleListController {
@ApiOperation
(
value
=
"根据样号修改送验单"
)
@RequestMapping
(
value
=
"/updateByYh"
,
method
=
RequestMethod
.
POST
)
public
R
updateByYh
(
@RequestBody
TSampleListQuery
tSampleListQuery
)
{
return
tSampleListService
.
updateByYh
(
tSampleListQuery
);
return
i
tSampleListService
.
updateByYh
(
tSampleListQuery
);
}
/**
...
...
@@ -64,7 +64,7 @@ public class TSampleListController {
@ApiOperation
(
value
=
"增加送验单"
)
@RequestMapping
(
value
=
"/insertSampleList"
,
method
=
RequestMethod
.
POST
)
public
R
insertSampleList
(
@RequestBody
TSampleListQuery
tSampleListQuery
)
{
return
tSampleListService
.
insertSampleList
(
tSampleListQuery
);
return
i
tSampleListService
.
insertSampleList
(
tSampleListQuery
);
}
...
...
@@ -77,7 +77,7 @@ public class TSampleListController {
@ApiOperation
(
value
=
"根据样号删除送验单"
)
@RequestMapping
(
value
=
"/deleteByYh"
,
method
=
RequestMethod
.
POST
)
public
R
deleteByYh
(
@RequestBody
TSampleListQuery
tSampleListQuery
)
{
return
tSampleListService
.
deleteByYh
(
tSampleListQuery
);
return
i
tSampleListService
.
deleteByYh
(
tSampleListQuery
);
}
...
...
@@ -89,7 +89,7 @@ public class TSampleListController {
@ApiOperation
(
value
=
"保存图片"
)
@RequestMapping
(
value
=
"/saveImage"
,
method
=
RequestMethod
.
POST
)
public
R
saveImage
(
TSampleListQuery
query
,
@RequestParam
(
value
=
"file"
,
required
=
true
)
MultipartFile
file
){
return
tSampleListService
.
saveImage
(
query
,
file
);
return
i
tSampleListService
.
saveImage
(
query
,
file
);
}
/**
...
...
@@ -100,7 +100,7 @@ public class TSampleListController {
@ApiOperation
(
value
=
"下载图片"
)
@RequestMapping
(
value
=
"/getImage"
,
method
=
RequestMethod
.
GET
)
public
R
getImage
(
TSampleListQuery
query
,
final
HttpServletResponse
response
){
return
tSampleListService
.
getImage
(
query
,
response
);
return
i
tSampleListService
.
getImage
(
query
,
response
);
}
}
...
...
acquisition-business/src/main/java/cn/wise/sc/acquisition/business/service/impl/TSampleLaboratorysheetServiceImpl.java
View file @
d4cffa84
...
...
@@ -7,6 +7,7 @@ import cn.wise.sc.acquisition.business.mapper.TSampleLaboratorysheetMapper;
import
cn.wise.sc.acquisition.business.model.query.TSampleLaboratorysheetQuery
;
import
cn.wise.sc.acquisition.business.model.query.TSampleListQuery
;
import
cn.wise.sc.acquisition.business.service.ITSampleLaboratorysheetService
;
import
cn.wise.sc.acquisition.business.service.ITSampleListService
;
import
cn.wise.sc.acquisition.business.util.ImageUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.baomidou.mybatisplus.extension.api.R
;
...
...
@@ -32,26 +33,33 @@ import javax.servlet.http.HttpServletResponse;
public
class
TSampleLaboratorysheetServiceImpl
extends
ServiceImpl
<
TSampleLaboratorysheetMapper
,
TSampleLaboratorysheet
>
implements
ITSampleLaboratorysheetService
{
@Autowired
private
TSampleListServiceImpl
tSampleListService
;
private
ITSampleListService
tSampleListService
;
@Override
public
R
getByYh
(
TSampleLaboratorysheetQuery
tSampleLaboratorysheetQ
uery
)
{
log
.
info
(
JSON
.
toJSONString
(
tSampleLaboratorysheetQ
uery
));
public
R
getByYh
(
TSampleLaboratorysheetQuery
q
uery
)
{
log
.
info
(
JSON
.
toJSONString
(
q
uery
));
//参数校验
Rcode
.
NOT_PARAM
.
assertNotEmpty
(
tSampleLaboratorysheetQuery
.
getYh
());
TSampleLaboratorysheet
tSampleLaboratorysheet
=
baseMapper
.
selectById
(
tSampleLaboratorysheetQuery
.
getYh
());
Rcode
.
NOT_PARAM
.
assertNotNull
(
query
);
Rcode
.
NOT_PARAM
.
assertNotEmpty
(
query
.
getYh
());
TSampleLaboratorysheet
tSampleLaboratorysheet
=
baseMapper
.
selectById
(
query
.
getYh
());
return
R
.
ok
(
tSampleLaboratorysheet
);
}
@Override
public
R
updateByYh
(
TSampleLaboratorysheetQuery
tSampleLaboratorysheetQ
uery
)
{
log
.
info
(
JSON
.
toJSONString
(
tSampleLaboratorysheetQ
uery
));
public
R
updateByYh
(
TSampleLaboratorysheetQuery
q
uery
)
{
log
.
info
(
JSON
.
toJSONString
(
q
uery
));
//参数校验
Rcode
.
NOT_PARAM
.
assertNotEmpty
(
tSampleLaboratorysheetQuery
.
getYh
());
Rcode
.
NOT_PARAM
.
assertNotNull
(
query
);
Rcode
.
NOT_PARAM
.
assertNotEmpty
(
query
.
getYh
());
//查询数据
TSampleLaboratorysheet
tSampleLaboratorysheet
=
baseMapper
.
selectById
(
query
.
getYh
());
if
(
tSampleLaboratorysheet
==
null
)
{
return
R
.
failed
(
"数据不存在,样号:"
+
query
.
getYh
());
}
//封装
TSampleLaboratorysheet
tSampleLaboratorysheet
=
new
TSampleLaboratorysheet
();
BeanUtils
.
copyProperties
(
tSampleLaboratorysheetQ
uery
,
tSampleLaboratorysheet
);
tSampleLaboratorysheet
=
new
TSampleLaboratorysheet
();
BeanUtils
.
copyProperties
(
q
uery
,
tSampleLaboratorysheet
);
int
update
=
baseMapper
.
updateById
(
tSampleLaboratorysheet
);
if
(
update
>
0
)
{
return
R
.
ok
(
"修改成功"
);
...
...
@@ -62,12 +70,18 @@ public class TSampleLaboratorysheetServiceImpl extends ServiceImpl<TSampleLabora
}
@Override
public
R
deleteByYh
(
TSampleLaboratorysheetQuery
tSampleLaboratorysheetQ
uery
)
{
log
.
info
(
JSON
.
toJSONString
(
tSampleLaboratorysheetQ
uery
));
public
R
deleteByYh
(
TSampleLaboratorysheetQuery
q
uery
)
{
log
.
info
(
JSON
.
toJSONString
(
q
uery
));
//参数校验
Rcode
.
NOT_PARAM
.
assertNotEmpty
(
tSampleLaboratorysheetQuery
.
getYh
());
Rcode
.
NOT_PARAM
.
assertNotNull
(
query
);
Rcode
.
NOT_PARAM
.
assertNotEmpty
(
query
.
getYh
());
//查询数据
TSampleLaboratorysheet
tSampleLaboratorysheet
=
baseMapper
.
selectById
(
query
.
getYh
());
if
(
tSampleLaboratorysheet
==
null
)
{
return
R
.
failed
(
"数据不存在,样号:"
+
query
.
getYh
());
}
//删除
int
delete
=
baseMapper
.
deleteById
(
tSampleLaboratorysheetQ
uery
.
getYh
());
int
delete
=
baseMapper
.
deleteById
(
q
uery
.
getYh
());
if
(
delete
>
0
)
{
return
R
.
ok
(
"修改成功"
);
}
else
{
...
...
@@ -76,42 +90,43 @@ public class TSampleLaboratorysheetServiceImpl extends ServiceImpl<TSampleLabora
}
@Override
public
R
insertTSampleLaboratorysheet
(
TSampleLaboratorysheetQuery
tSampleLaboratorysheetQ
uery
)
{
log
.
info
(
JSON
.
toJSONString
(
tSampleLaboratorysheetQ
uery
));
public
R
insertTSampleLaboratorysheet
(
TSampleLaboratorysheetQuery
q
uery
)
{
log
.
info
(
JSON
.
toJSONString
(
q
uery
));
//参数校验
Rcode
.
NOT_PARAM
.
assertNotEmpty
(
tSampleLaboratorysheetQuery
.
getYh
());
Rcode
.
NOT_PARAM
.
assertNotNull
(
query
);
Rcode
.
NOT_PARAM
.
assertNotEmpty
(
query
.
getYh
());
//判断是否存在送样号
R
temp
=
tSampleListService
.
getByYh
(
new
TSampleListQuery
(
tSampleLaboratorysheetQ
uery
.
getYh
()));
R
temp
=
tSampleListService
.
getByYh
(
new
TSampleListQuery
(
q
uery
.
getYh
()));
if
(
temp
.
getData
()
==
null
)
{
return
R
.
failed
(
"送验单不存在,样号:"
+
tSampleLaboratorysheetQ
uery
.
getYh
());
return
R
.
failed
(
"送验单不存在,样号:"
+
q
uery
.
getYh
());
}
//判断是否已经存在分析结果单
R
temp1
=
getByYh
(
tSampleLaboratorysheetQ
uery
);
R
temp1
=
getByYh
(
q
uery
);
if
(
temp1
.
getData
()
!=
null
)
{
return
R
.
failed
(
"分析结果样号已存在,样号:"
+
tSampleLaboratorysheetQ
uery
.
getYh
());
return
R
.
failed
(
"分析结果样号已存在,样号:"
+
q
uery
.
getYh
());
}
//继续判断参数
Rcode
.
NOT_PARAM
.
assertNotEmpty
(
tSampleLaboratorysheetQ
uery
.
getLaboratoryID
());
Rcode
.
NOT_PARAM
.
assertNotNull
(
tSampleLaboratorysheetQ
uery
.
getSysj
());
Rcode
.
NOT_PARAM
.
assertNotNull
(
tSampleLaboratorysheetQ
uery
.
getHysj
());
Rcode
.
NOT_PARAM
.
assertNotEmpty
(
tSampleLaboratorysheetQ
uery
.
getHyr
());
Rcode
.
NOT_PARAM
.
assertNotEmpty
(
tSampleLaboratorysheetQ
uery
.
getFpcfwz
());
Rcode
.
NOT_PARAM
.
assertNotNull
(
tSampleLaboratorysheetQ
uery
.
getCao
());
Rcode
.
NOT_PARAM
.
assertNotNull
(
tSampleLaboratorysheetQ
uery
.
getMgO
());
Rcode
.
NOT_PARAM
.
assertNotNull
(
tSampleLaboratorysheetQ
uery
.
getSiO2
());
Rcode
.
NOT_PARAM
.
assertNotNull
(
tSampleLaboratorysheetQ
uery
.
getAl2O3
());
Rcode
.
NOT_PARAM
.
assertNotNull
(
tSampleLaboratorysheetQ
uery
.
getFe2O3
());
Rcode
.
NOT_PARAM
.
assertNotNull
(
tSampleLaboratorysheetQ
uery
.
getK2o
());
Rcode
.
NOT_PARAM
.
assertNotNull
(
tSampleLaboratorysheetQ
uery
.
getNa2O
());
Rcode
.
NOT_PARAM
.
assertNotNull
(
tSampleLaboratorysheetQ
uery
.
getSo3
());
Rcode
.
NOT_PARAM
.
assertNotNull
(
tSampleLaboratorysheetQ
uery
.
getCl
());
Rcode
.
NOT_PARAM
.
assertNotNull
(
tSampleLaboratorysheetQ
uery
.
getSsl
());
Rcode
.
NOT_PARAM
.
assertNotEmpty
(
q
uery
.
getLaboratoryID
());
Rcode
.
NOT_PARAM
.
assertNotNull
(
q
uery
.
getSysj
());
Rcode
.
NOT_PARAM
.
assertNotNull
(
q
uery
.
getHysj
());
Rcode
.
NOT_PARAM
.
assertNotEmpty
(
q
uery
.
getHyr
());
Rcode
.
NOT_PARAM
.
assertNotEmpty
(
q
uery
.
getFpcfwz
());
Rcode
.
NOT_PARAM
.
assertNotNull
(
q
uery
.
getCao
());
Rcode
.
NOT_PARAM
.
assertNotNull
(
q
uery
.
getMgO
());
Rcode
.
NOT_PARAM
.
assertNotNull
(
q
uery
.
getSiO2
());
Rcode
.
NOT_PARAM
.
assertNotNull
(
q
uery
.
getAl2O3
());
Rcode
.
NOT_PARAM
.
assertNotNull
(
q
uery
.
getFe2O3
());
Rcode
.
NOT_PARAM
.
assertNotNull
(
q
uery
.
getK2o
());
Rcode
.
NOT_PARAM
.
assertNotNull
(
q
uery
.
getNa2O
());
Rcode
.
NOT_PARAM
.
assertNotNull
(
q
uery
.
getSo3
());
Rcode
.
NOT_PARAM
.
assertNotNull
(
q
uery
.
getCl
());
Rcode
.
NOT_PARAM
.
assertNotNull
(
q
uery
.
getSsl
());
//封装
TSampleLaboratorysheet
tSampleLaboratorysheet
=
new
TSampleLaboratorysheet
();
BeanUtils
.
copyProperties
(
tSampleLaboratorysheetQ
uery
,
tSampleLaboratorysheet
);
BeanUtils
.
copyProperties
(
q
uery
,
tSampleLaboratorysheet
);
//生成二维码 并且保存
tSampleLaboratorysheet
.
setQRCode
(
ImageUtil
.
QRCodeGenerator
(
JSON
.
toJSONString
(
tSampleLaboratorysheet
)));
//
tSampleLaboratorysheet.setQRCode(ImageUtil.QRCodeGenerator(JSON.toJSONString(tSampleLaboratorysheet)));
//保存
int
insert
=
baseMapper
.
insert
(
tSampleLaboratorysheet
);
if
(
insert
>
0
)
{
...
...
@@ -136,8 +151,15 @@ public class TSampleLaboratorysheetServiceImpl extends ServiceImpl<TSampleLabora
//参加校验
Rcode
.
NOT_PARAM
.
assertNotNull
(
query
);
Rcode
.
NOT_PARAM
.
assertNotEmpty
(
query
.
getYh
());
//查询
TSampleLaboratorysheet
tSampleLaboratorysheet
=
baseMapper
.
selectById
(
query
.
getYh
());
if
(
tSampleLaboratorysheet
==
null
)
{
return
R
.
failed
(
"数据不存在,样号:"
+
query
.
getYh
());
}
//获取二维码或者记录形式
//先生成二维码并且放到实体中
tSampleLaboratorysheet
.
setQRCode
(
ImageUtil
.
QRCodeGenerator
(
JSON
.
toJSONString
(
tSampleLaboratorysheet
)));
//下载图片
ImageUtil
.
getImage
(
ProjectEnum
.
ImageType
.
QR_CODE
.
getValue
(),
tSampleLaboratorysheet
,
response
);
//如果下载失败才会执行return
return
R
.
failed
(
"该条数据没有图片"
);
...
...
acquisition-business/src/main/java/cn/wise/sc/acquisition/business/service/impl/TSampleListServiceImpl.java
View file @
d4cffa84
...
...
@@ -62,6 +62,7 @@ public class TSampleListServiceImpl extends ServiceImpl<TSampleListMapper, TSamp
public
R
getByYh
(
TSampleListQuery
query
)
{
log
.
info
(
JSON
.
toJSONString
(
query
));
//参数校验
Rcode
.
NOT_PARAM
.
assertNotNull
(
query
);
Rcode
.
NOT_PARAM
.
assertNotEmpty
(
query
.
getYh
());
//查询并且返回
return
R
.
ok
(
baseMapper
.
selectById
(
query
.
getYh
()));
...
...
@@ -73,6 +74,7 @@ public class TSampleListServiceImpl extends ServiceImpl<TSampleListMapper, TSamp
public
R
updateByYh
(
TSampleListQuery
query
)
{
log
.
info
(
JSON
.
toJSONString
(
query
));
//参数校验
Rcode
.
NOT_PARAM
.
assertNotNull
(
query
);
Rcode
.
NOT_PARAM
.
assertNotEmpty
(
query
.
getYh
());
//条件封装
TSampleList
tSampleList
=
new
TSampleList
();
...
...
@@ -97,6 +99,7 @@ public class TSampleListServiceImpl extends ServiceImpl<TSampleListMapper, TSamp
public
R
insertSampleList
(
TSampleListQuery
query
)
{
log
.
info
(
JSON
.
toJSONString
(
query
));
//参数校验
Rcode
.
NOT_PARAM
.
assertNotNull
(
query
);
Rcode
.
NOT_PARAM
.
assertNotEmpty
(
query
.
getYh
());
//判断数据是否已存在,如果存在不能添加
R
r
=
getByYh
(
query
);
...
...
@@ -133,12 +136,13 @@ public class TSampleListServiceImpl extends ServiceImpl<TSampleListMapper, TSamp
@Override
@Transactional
public
R
deleteByYh
(
TSampleListQuery
tSampleListQ
uery
)
{
log
.
info
(
JSON
.
toJSONString
(
tSampleListQ
uery
));
public
R
deleteByYh
(
TSampleListQuery
q
uery
)
{
log
.
info
(
JSON
.
toJSONString
(
q
uery
));
//参数校验
Rcode
.
NOT_PARAM
.
assertNotEmpty
(
tSampleListQuery
.
getYh
());
Rcode
.
NOT_PARAM
.
assertNotNull
(
query
);
Rcode
.
NOT_PARAM
.
assertNotEmpty
(
query
.
getYh
());
//删除
int
delete
=
baseMapper
.
delete
(
new
QueryWrapper
<
TSampleList
>().
eq
(
ProjectEnum
.
TSampleListType
.
YH
.
getLabel
(),
tSampleListQ
uery
.
getYh
()));
int
delete
=
baseMapper
.
delete
(
new
QueryWrapper
<
TSampleList
>().
eq
(
ProjectEnum
.
TSampleListType
.
YH
.
getLabel
(),
q
uery
.
getYh
()));
if
(
delete
>
0
)
{
return
R
.
ok
(
"删除成功"
);
}
else
{
...
...
@@ -154,8 +158,9 @@ public class TSampleListServiceImpl extends ServiceImpl<TSampleListMapper, TSamp
//参加校验
Rcode
.
NOT_PARAM
.
assertNotNull
(
query
);
Rcode
.
NOT_PARAM
.
assertNotEmpty
(
query
.
getYh
());
Rcode
.
NOT_PARAM
.
assertNotNull
(
file
);
Rcode
.
NOT_PARAM
.
assertNotNull
(
query
.
getImageType
());
Rcode
.
NOT_PARAM
.
assertNotNull
(
file
);
//封装
TSampleList
tSampleList
=
new
TSampleList
();
BeanUtils
.
copyProperties
(
query
,
tSampleList
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment