接口开发
This commit is contained in:
parent
e4d07ab792
commit
526165e62a
|
|
@ -38,6 +38,7 @@ public class SurveyController extends BaseController {
|
|||
@GetMapping("/list")
|
||||
public TableDataInfo list(Survey survey) {
|
||||
startPage();
|
||||
survey.setCreateBy(getUserId().toString());
|
||||
List<Survey> list = surveyService.selectSurveyList(survey);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,6 +43,18 @@ public class Survey extends BaseEntity
|
|||
/** 模型id */
|
||||
|
||||
private String modelId;
|
||||
|
||||
public String getModelName() {
|
||||
return modelName;
|
||||
}
|
||||
|
||||
public void setModelName(String modelName) {
|
||||
this.modelName = modelName;
|
||||
}
|
||||
|
||||
/** 模型名称 */
|
||||
|
||||
private String modelName;
|
||||
/** 勘查结果 */
|
||||
|
||||
private String surveyResult;
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@
|
|||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="modelId" column="model_id" />
|
||||
<result property="modelName" column="model_name" />
|
||||
<result property="surveyResult" column="survey_result" />
|
||||
</resultMap>
|
||||
|
||||
|
|
@ -29,19 +30,23 @@
|
|||
tsi.survey_content,
|
||||
tsi.survey_result,
|
||||
tsi.model_id,
|
||||
tsi.model_name,
|
||||
tp.pro_name
|
||||
from tb_survey_info tsi
|
||||
left join tb_project tp on tp.id=tsi.pro_id
|
||||
left join tb_project tp on tp.id = tsi.pro_id
|
||||
where tsi.del_flag = '0'
|
||||
</sql>
|
||||
|
||||
<select id="selectSurveyList" parameterType="Survey" resultMap="SurveyResult">
|
||||
<include refid="selectSurvey"/>
|
||||
<if test="createBy != null and createBy != ''">
|
||||
AND tp.create_user = #{createBy}
|
||||
</if>
|
||||
<if test="proName != null and proName != ''">
|
||||
AND tp.pro_name like concat('%', #{proName}, '%')
|
||||
</if>
|
||||
<if test="surveyUser != null and surveyUser != ''">
|
||||
AND tsi.surveyUser like concat('%', #{surveyUser}, '%')
|
||||
AND tsi.survey_user like concat('%', #{surveyUser}, '%')
|
||||
</if>
|
||||
<if test="surveyTime != null and surveyTime != ''">
|
||||
AND tsi.survey_time like concat('%', #{surveyTime}, '%')
|
||||
|
|
@ -56,6 +61,8 @@
|
|||
tsi.survey_content,
|
||||
tsi.survey_result,
|
||||
tsi.model_id,
|
||||
tsi.pro_id,
|
||||
tsi.model_name,
|
||||
tp.pro_name
|
||||
from tb_survey_info tsi
|
||||
left join tb_project tp on tp.id=tsi.pro_id
|
||||
|
|
@ -72,6 +79,7 @@
|
|||
<if test="surveyAttach != null and surveyAttach != ''">survey_attach = #{surveyAttach},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_user = #{updateBy},</if>
|
||||
<if test="modelId != null and modelId != ''">model_id = #{modelId},</if>
|
||||
<if test="modelName != null and modelName != ''">model_name = #{modelName},</if>
|
||||
<if test="surveyResult != null and surveyResult != ''">survey_result = #{surveyResult},</if>
|
||||
update_time = sysdate()
|
||||
</set>
|
||||
|
|
@ -87,6 +95,7 @@
|
|||
<if test="surveyAttach != null and surveyAttach != ''">survey_attach,</if>
|
||||
<if test="createBy != null and createBy != ''">create_user,</if>
|
||||
<if test="modelId != null and modelId != ''">model_id,</if>
|
||||
<if test="modelName != null and modelName != ''">model_name,</if>
|
||||
<if test="surveyResult != null and surveyResult != ''">survey_result,</if>
|
||||
create_time
|
||||
)values(
|
||||
|
|
@ -97,6 +106,7 @@
|
|||
<if test="surveyAttach != null and surveyAttach != ''">#{surveyAttach},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
<if test="modelId != null and modelId != ''">#{modelId},</if>
|
||||
<if test="modelName != null and modelName != ''">#{modelName},</if>
|
||||
<if test="surveyResult != null and surveyResult != ''">#{surveyResult},</if>
|
||||
sysdate()
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in New Issue