Commit 02b3b0eb authored by renchao's avatar renchao

送验单模块代码编写

parent e7ff4f1e
......@@ -4,6 +4,8 @@ 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 com.baomidou.mybatisplus.extension.api.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
......@@ -19,6 +21,7 @@ import org.springframework.web.bind.annotation.RestController;
* @author renchao
* @since 2021-04-25
*/
@Api(tags = "送验单分析结果")
@RestController
@RequestMapping("/business/t-sample-laboratorysheet")
public class TSampleLaboratorysheetController {
......@@ -33,6 +36,7 @@ public class TSampleLaboratorysheetController {
* @param tSampleLaboratorysheetQuery
* @return
*/
@ApiOperation(value = "根据样号查看分析结果")
@RequestMapping(value = "/getByYh", method = RequestMethod.GET)
public R getByYh(TSampleLaboratorysheetQuery tSampleLaboratorysheetQuery) {
return tSampleLaboratorysheetService.getByYh(tSampleLaboratorysheetQuery);
......@@ -45,6 +49,7 @@ public class TSampleLaboratorysheetController {
* @param tSampleLaboratorysheetQuery
* @return
*/
@ApiOperation(value = "根据样号修改分析结果")
@RequestMapping(value = "/updateByYh", method = RequestMethod.POST)
public R updateByYh(@RequestBody TSampleLaboratorysheetQuery tSampleLaboratorysheetQuery) {
return tSampleLaboratorysheetService.updateByYh(tSampleLaboratorysheetQuery);
......@@ -57,6 +62,7 @@ public class TSampleLaboratorysheetController {
* @param tSampleLaboratorysheetQuery
* @return
*/
@ApiOperation(value = "根据样号删除分析结果")
@RequestMapping(value = "/deleteByYh", method = RequestMethod.POST)
public R deleteByYh(@RequestBody TSampleLaboratorysheetQuery tSampleLaboratorysheetQuery) {
return tSampleLaboratorysheetService.deleteByYh(tSampleLaboratorysheetQuery);
......@@ -64,11 +70,12 @@ public class TSampleLaboratorysheetController {
/**
* 根据样号删除分析结果
* 增加分析结果
*
* @param tSampleLaboratorysheetQuery
* @return
*/
@ApiOperation(value = "增加分析结果")
@RequestMapping(value = "/insertTSampleLaboratorysheet", method = RequestMethod.POST)
public R insertTSampleLaboratorysheet(@RequestBody TSampleLaboratorysheetQuery tSampleLaboratorysheetQuery) {
return tSampleLaboratorysheetService.insertTSampleLaboratorysheet(tSampleLaboratorysheetQuery);
......
......@@ -5,6 +5,8 @@ import cn.wise.sc.acquisition.business.model.query.TSampleListQuery;
import cn.wise.sc.acquisition.business.service.impl.TSampleListServiceImpl;
import cn.wise.sc.acquisition.business.wrapper.page.Query;
import com.baomidou.mybatisplus.extension.api.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
......@@ -20,6 +22,7 @@ import javax.servlet.http.HttpServletResponse;
* @author ztw
* @since 2021-04-22
*/
@Api(tags = "送验单接口")
@RestController
@RequestMapping("/business/t-sample-list")
public class TSampleListController {
......@@ -33,6 +36,7 @@ public class TSampleListController {
* @param tSampleListQuery
* @return
*/
@ApiOperation(value = "获取送验单列表 可分页模糊查询")
@RequestMapping(value = "/getPage", method = RequestMethod.GET)
public R getPage(TSampleListQuery tSampleListQuery, Query query) {
return tSampleListService.getPage(tSampleListQuery,query);
......@@ -40,14 +44,15 @@ public class TSampleListController {
/**
* 根据炮孔编号修改送验单
* 根据号修改送验单
*
* @param tSampleListQuery
* @return
*/
@RequestMapping(value = "/updateByHolesID", method = RequestMethod.POST)
public R updateByHolesID(@RequestBody TSampleListQuery tSampleListQuery) {
return tSampleListService.updateByHolesID(tSampleListQuery);
@ApiOperation(value = "根据样号修改送验单")
@RequestMapping(value = "/updateByYh", method = RequestMethod.POST)
public R updateByYh(@RequestBody TSampleListQuery tSampleListQuery) {
return tSampleListService.updateByYh(tSampleListQuery);
}
/**
......@@ -56,6 +61,7 @@ public class TSampleListController {
* @param tSampleListQuery
* @return
*/
@ApiOperation(value = "增加送验单")
@RequestMapping(value = "/insertSampleList", method = RequestMethod.POST)
public R insertSampleList(@RequestBody TSampleListQuery tSampleListQuery ) {
return tSampleListService.insertSampleList(tSampleListQuery);
......@@ -63,14 +69,15 @@ public class TSampleListController {
/**
* 根据炮孔编号删除送验单
* 根据号删除送验单
*
* @param tSampleListQuery
* @return
*/
@RequestMapping(value = "/deleteByHolesID", method = RequestMethod.POST)
public R deleteByHolesID(@RequestBody TSampleListQuery tSampleListQuery) {
return tSampleListService.deleteByHolesID(tSampleListQuery);
@ApiOperation(value = "根据样号删除送验单")
@RequestMapping(value = "/deleteByYh", method = RequestMethod.POST)
public R deleteByYh(@RequestBody TSampleListQuery tSampleListQuery) {
return tSampleListService.deleteByYh(tSampleListQuery);
}
......@@ -79,6 +86,7 @@ public class TSampleListController {
*
* @return
*/
@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);
......@@ -89,6 +97,7 @@ public class TSampleListController {
*
* @return
*/
@ApiOperation(value = "下载图片")
@RequestMapping(value="/getImage",method=RequestMethod.GET)
public R getImage(TSampleListQuery query,final HttpServletResponse response){
return tSampleListService.getImage(query,response);
......
......@@ -16,110 +16,110 @@ import java.time.LocalDateTime;
* @since 2021-04-25
*/
@Data
@ApiModel("样品化验单")
@ApiModel("样品化验单query")
public class TSampleLaboratorysheetQuery implements Serializable {
/**
* 样号
*/
@ApiModelProperty("Yh")
@ApiModelProperty("样号")
private String Yh;
/**
* 二维码
*/
@ApiModelProperty("QRCode")
@ApiModelProperty("二维码")
private byte[] QRCode;
/**
* 化验室编号
*/
@ApiModelProperty("LaboratoryID")
@ApiModelProperty("化验室编号")
private String LaboratoryID;
/**
* 副品存放位置
*/
@ApiModelProperty("Fpcfwz")
@ApiModelProperty("副品存放位置")
private String Fpcfwz;
/**
* 氧化钙
*/
@ApiModelProperty("Cao")
@ApiModelProperty("氧化钙")
private Float Cao;
/**
* 氧化镁
*/
@ApiModelProperty("MgO")
@ApiModelProperty("氧化镁")
private Float MgO;
/**
* 三氧化二铝
*/
@ApiModelProperty("Al2O3")
@ApiModelProperty("三氧化二铝")
private Float Al2O3;
/**
* 二氧化硅
*/
@ApiModelProperty("SiO2")
@ApiModelProperty("二氧化硅")
private Float SiO2;
/**
* 三氧化二铁
*/
@ApiModelProperty("Fe2O3")
@ApiModelProperty("三氧化二铁")
private Float Fe2O3;
/**
* 氧化钾
*/
@ApiModelProperty("K2O")
@ApiModelProperty("氧化钾")
private Float k2o;
/**
* 氧化钠
*/
@ApiModelProperty("Na2O")
@ApiModelProperty("氧化钠")
private Float Na2O;
/**
* 三氧化硫
*/
@ApiModelProperty("SO3")
@ApiModelProperty("三氧化硫")
private Float so3;
/**
* 氯离子
*/
@ApiModelProperty("Cl")
@ApiModelProperty("氯离子")
private Float Cl;
/**
* 烧失量
*/
@ApiModelProperty("Ssl")
@ApiModelProperty("烧失量")
private Float Ssl;
/**
* 收样时间
*/
@ApiModelProperty("Sysj")
@ApiModelProperty("收样时间")
private LocalDateTime Sysj;
/**
* 化验人
*/
@ApiModelProperty("Hyr")
@ApiModelProperty("化验人")
private String Hyr;
/**
* 化验时间
*/
@ApiModelProperty("Hysj")
@ApiModelProperty("化验时间")
private LocalDateTime Hysj;
......
......@@ -16,7 +16,7 @@ import java.time.LocalDateTime;
* @since 2021-04-22
*/
@Data
@ApiModel("送样单")
@ApiModel("送样单query")
public class TSampleListQuery implements Serializable {
/**
......@@ -29,7 +29,7 @@ public class TSampleListQuery implements Serializable {
/**
* 图片保存下载类型
*/
@ApiModelProperty("图片保存下载类型")
@ApiModelProperty("图片保存下载类型 传“1”保存记录形式")
private Integer imageType;
/**
......
......@@ -22,9 +22,9 @@ public interface ITSampleListService extends IService<TSampleList> {
R getPage(TSampleListQuery tSampleListQuery, Query query);
R updateByHolesID(TSampleListQuery tSampleListQuery);
R updateByYh(TSampleListQuery tSampleListQuery);
R deleteByHolesID(TSampleListQuery tSampleListQuery);
R deleteByYh(TSampleListQuery tSampleListQuery);
R insertSampleList(TSampleListQuery tSampleListQuery);
......
......@@ -70,7 +70,7 @@ public class TSampleListServiceImpl extends ServiceImpl<TSampleListMapper, TSamp
@Override
@Transactional
public R updateByHolesID(TSampleListQuery query) {
public R updateByYh(TSampleListQuery query) {
log.info(JSON.toJSONString(query));
//参数校验
Rcode.NOT_PARAM.assertNotEmpty(query.getYh());
......@@ -127,7 +127,7 @@ public class TSampleListServiceImpl extends ServiceImpl<TSampleListMapper, TSamp
@Override
@Transactional
public R deleteByHolesID(TSampleListQuery tSampleListQuery) {
public R deleteByYh(TSampleListQuery tSampleListQuery) {
log.info(JSON.toJSONString(tSampleListQuery));
//参数校验
Rcode.NOT_PARAM.assertNotEmpty(tSampleListQuery.getYh());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment