Commit 02b3b0eb authored by renchao's avatar renchao

送验单模块代码编写

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