Merge branch 'feature-20240104' of https://gitee.com/yunqiang_technology/floatomcloud into feature-20240104
commit
a3efaa7c97
@ -0,0 +1,31 @@
|
|||||||
|
package com.flossom.miniProgram.controller;
|
||||||
|
|
||||||
|
import com.flossom.common.core.domain.R;
|
||||||
|
import com.flossom.common.core.web.controller.BaseController;
|
||||||
|
import com.flossom.miniProgram.service.IWxLiningService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 膜布Controller
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/lining")
|
||||||
|
public class WxLiningController extends BaseController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IWxLiningService wxLiningService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询膜布列表
|
||||||
|
*/
|
||||||
|
@GetMapping("/list")
|
||||||
|
public R list(@RequestParam @NotNull(message = "仪器ID不能为空") Long instrumentId) {
|
||||||
|
return R.ok(wxLiningService.selectWxLiningList(instrumentId));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,20 @@
|
|||||||
|
package com.flossom.miniProgram.service;
|
||||||
|
|
||||||
|
import com.flossom.common.core.domain.entity.WxLining;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 膜布Service接口
|
||||||
|
*/
|
||||||
|
public interface IWxLiningService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询膜布列表
|
||||||
|
*
|
||||||
|
* @param wxLining 膜布
|
||||||
|
* @return 膜布集合
|
||||||
|
*/
|
||||||
|
public List<WxLining> selectWxLiningList(Long instrumentId);
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,50 @@
|
|||||||
|
package com.flossom.miniProgram.service.impl;
|
||||||
|
|
||||||
|
import com.flossom.common.core.domain.entity.WxInstrumentLining;
|
||||||
|
import com.flossom.common.core.domain.entity.WxLining;
|
||||||
|
import com.flossom.common.core.mapper.WxInstrumentLiningMapper;
|
||||||
|
import com.flossom.common.core.mapper.WxLiningMapper;
|
||||||
|
import com.flossom.miniProgram.service.IWxLiningService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 膜布Service业务层处理
|
||||||
|
*
|
||||||
|
* @author flossom
|
||||||
|
* @date 2024-03-26
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class WxLiningServiceImpl implements IWxLiningService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private WxLiningMapper wxLiningMapper;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private WxInstrumentLiningMapper wxInstrumentLiningMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询膜布列表
|
||||||
|
*
|
||||||
|
* @param wxLining 膜布
|
||||||
|
* @return 膜布
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<WxLining> selectWxLiningList(Long instrumentId) {
|
||||||
|
WxInstrumentLining instrumentLiningQuery = new WxInstrumentLining();
|
||||||
|
instrumentLiningQuery.setInstrumentId(instrumentId);
|
||||||
|
List<WxInstrumentLining> wxInstrumentLiningList = wxInstrumentLiningMapper.selectWxInstrumentLiningList(instrumentLiningQuery);
|
||||||
|
if (wxInstrumentLiningList != null && wxInstrumentLiningList.size() > 0) {
|
||||||
|
List<WxLining> liningList = new ArrayList<>();
|
||||||
|
for (WxInstrumentLining wxInstrumentLining : wxInstrumentLiningList) {
|
||||||
|
liningList.add(wxLiningMapper.selectWxLiningById(wxInstrumentLining.getLiningId()));
|
||||||
|
}
|
||||||
|
return liningList;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue