Commit c946c006 authored by limei's avatar limei

修改全站校验接口和列表展示接口

parent 50355ab1
...@@ -34,8 +34,6 @@ public class CheckResult { ...@@ -34,8 +34,6 @@ public class CheckResult {
@ApiModelProperty(value="检查项值") @ApiModelProperty(value="检查项值")
private String checkItemValue; private String checkItemValue;
@ApiModelProperty(value="检查项标准值")
private String checkItemRealValue;
@ApiModelProperty(value="检查项结果") @ApiModelProperty(value="检查项结果")
private String checkItemResult; private String checkItemResult;
......
...@@ -3,7 +3,13 @@ ...@@ -3,7 +3,13 @@
<mapper namespace="com.yeejoin.amos.boot.module.tdc.api.mapper.CheckResultMapper"> <mapper namespace="com.yeejoin.amos.boot.module.tdc.api.mapper.CheckResultMapper">
<select id="selectResult" resultType="com.yeejoin.amos.boot.module.tdc.api.dto.CheckResultDto"> <select id="selectResult" resultType="com.yeejoin.amos.boot.module.tdc.api.dto.CheckResultDto">
select check_date, case when check_type="1" then '全站校验' else `model_name` end as `name` select check_date, case when check_type="1" then '全站校验' else `model_name` end as `name`
from `tdc_check_result` where amos_org_code=#{code} GROUP BY batch_no from `tdc_check_result`
<where>
<if test="code != '' and code != null">
and amos_org_code=#{code}
</if>
</where>
GROUP BY batch_no
</select> </select>
<select id="selectTotal" resultType="com.yeejoin.amos.boot.module.tdc.api.dto.CheckResultDto"> <select id="selectTotal" resultType="com.yeejoin.amos.boot.module.tdc.api.dto.CheckResultDto">
......
...@@ -5,10 +5,12 @@ import com.baomidou.mybatisplus.core.metadata.IPage; ...@@ -5,10 +5,12 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yeejoin.amos.boot.module.tdc.api.entity.CheckModel; import com.yeejoin.amos.boot.module.tdc.api.entity.CheckModel;
import com.yeejoin.amos.boot.module.tdc.api.entity.CheckReport;
import com.yeejoin.amos.boot.module.tdc.api.entity.CheckResult; import com.yeejoin.amos.boot.module.tdc.api.entity.CheckResult;
import com.yeejoin.amos.boot.module.tdc.api.mapper.CheckModelMapper; import com.yeejoin.amos.boot.module.tdc.api.mapper.CheckModelMapper;
import com.yeejoin.amos.boot.module.tdc.api.service.CheckModelService; import com.yeejoin.amos.boot.module.tdc.api.service.CheckModelService;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
/** /**
* @author xxz * @author xxz
...@@ -19,10 +21,17 @@ public class CheckModelImpl extends ServiceImpl<CheckModelMapper, CheckModel> im ...@@ -19,10 +21,17 @@ public class CheckModelImpl extends ServiceImpl<CheckModelMapper, CheckModel> im
@Override @Override
public IPage<CheckModel> selectByOrgCode(int current, int size, String amosOrgCode) { public IPage<CheckModel> selectByOrgCode(int current, int size, String amosOrgCode) {
Page page = new Page(current,size); Page page = new Page(current,size);
LambdaQueryWrapper<CheckModel> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(CheckModel::getAmosOrgCode, amosOrgCode); if(ValidationUtil.isEmpty(amosOrgCode)){
return this.page(page);
}else{
LambdaQueryWrapper<CheckModel> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(CheckModel::getAmosOrgCode, amosOrgCode);
// return baseMapper.selectList(wrapper); // return baseMapper.selectList(wrapper);
return this.page(page,wrapper); return this.page(page,wrapper);
}
} }
@Override @Override
......
...@@ -27,6 +27,7 @@ import org.codehaus.jettison.json.JSONString; ...@@ -27,6 +27,7 @@ import org.codehaus.jettison.json.JSONString;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.restful.utils.ResponseModel; import org.typroject.tyboot.core.restful.utils.ResponseModel;
import java.io.File; import java.io.File;
...@@ -48,10 +49,12 @@ public class CheckResultImpl extends ServiceImpl<CheckResultMapper, CheckResult> ...@@ -48,10 +49,12 @@ public class CheckResultImpl extends ServiceImpl<CheckResultMapper, CheckResult>
@Override @Override
public IPage<CheckResultDto> selectResult(int current,int size,String code) { public IPage<CheckResultDto> selectResult(int current,int size,String code) {
Page page = new Page(current,size); Page page = new Page(current,size);
return checkResultMapper.selectResult(page,code); return checkResultMapper.selectResult(page,code);
// return checkResultMapper.selectResult(page,code);
} }
@Override @Override
public List<CheckResult> selectCheckResult(String modelId,String amosOrgCode) { public List<CheckResult> selectCheckResult(String modelId,String amosOrgCode) {
LambdaQueryWrapper<CheckResult> wrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<CheckResult> wrapper = new LambdaQueryWrapper<>();
......
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