Browse Source

农场项目

zyh
小久哥 3 years ago
parent
commit
67eb497114
  1. 7
      zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/project/vo/ProjectBaseVO.java
  2. 7
      zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/project/vo/ProjectExcelVO.java
  3. 6
      zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/project/vo/ProjectExportReqVO.java
  4. 6
      zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/project/vo/ProjectPageReqVO.java
  5. 6
      zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/project/vo/ProjectSearchPageReqVO.java
  6. 5
      zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/dataobject/project/ProjectDO.java
  7. 6
      zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/mysql/project/ProjectMapper.java
  8. 16
      zsw-farm/zsw-farm-impl/src/main/resources/mapper/project/ProjectMapper.xml

7
zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/project/vo/ProjectBaseVO.java

@ -21,6 +21,13 @@ public class ProjectBaseVO {
@ApiModelProperty(value = "")
private String content;
@ApiModelProperty(value = "")
private Integer state;
private Object areas;
private Integer cropId;
@ApiModelProperty(value = "")
private Object resources;

7
zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/project/vo/ProjectExcelVO.java

@ -23,6 +23,13 @@ public class ProjectExcelVO {
@ExcelProperty("")
private String content;
@ExcelProperty("")
private Integer state;
private Object areas;
private Integer cropId;
@ExcelProperty("")
private Object resources;

6
zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/project/vo/ProjectExportReqVO.java

@ -18,6 +18,12 @@ public class ProjectExportReqVO {
@ApiModelProperty(value = "")
private String content;
private Integer state;
private Object areas;
private Integer cropId;
@ApiModelProperty(value = "")
private Object resources;

6
zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/project/vo/ProjectPageReqVO.java

@ -20,6 +20,12 @@ public class ProjectPageReqVO extends PageParam {
@ApiModelProperty(value = "")
private String content;
private Integer state;
private Object areas;
private Integer cropId;
@ApiModelProperty(value = "")
private Object resources;

6
zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/project/vo/ProjectSearchPageReqVO.java

@ -25,6 +25,12 @@ public class ProjectSearchPageReqVO extends PageParam {
@ApiModelProperty(value = "")
private String content;
private Integer state;
private Object areas;
private Integer cropId;
@ApiModelProperty(value = "")
private String resources;

5
zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/dataobject/project/ProjectDO.java

@ -32,6 +32,11 @@ public class ProjectDO extends BaseDO {
*
*/
private String content;
private Integer state;
private Object areas;
private Integer cropId;
/**
*
*/

6
zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/mysql/project/ProjectMapper.java

@ -22,6 +22,9 @@ public interface ProjectMapper extends BaseMapperX<ProjectDO> {
.likeIfPresent(ProjectDO::getName, reqVO.getName())
.eqIfPresent(ProjectDO::getContent, reqVO.getContent())
.eqIfPresent(ProjectDO::getResources, reqVO.getResources())
.eqIfPresent(ProjectDO::getAreas, reqVO.getAreas())
.eqIfPresent(ProjectDO::getCropId, reqVO.getCropId())
.eqIfPresent(ProjectDO::getState, reqVO.getState())
.eqIfPresent(ProjectDO::getImages, reqVO.getImages())
.betweenIfPresent(ProjectDO::getPlanStartTime, reqVO.getBeginPlanStartTime(), reqVO.getEndPlanStartTime())
.betweenIfPresent(ProjectDO::getPlanEndTime, reqVO.getBeginPlanEndTime(), reqVO.getEndPlanEndTime())
@ -35,6 +38,9 @@ public interface ProjectMapper extends BaseMapperX<ProjectDO> {
.likeIfPresent(ProjectDO::getName, reqVO.getName())
.eqIfPresent(ProjectDO::getContent, reqVO.getContent())
.eqIfPresent(ProjectDO::getResources, reqVO.getResources())
.eqIfPresent(ProjectDO::getAreas, reqVO.getAreas())
.eqIfPresent(ProjectDO::getCropId, reqVO.getCropId())
.eqIfPresent(ProjectDO::getState, reqVO.getState())
.eqIfPresent(ProjectDO::getImages, reqVO.getImages())
.betweenIfPresent(ProjectDO::getPlanStartTime, reqVO.getBeginPlanStartTime(), reqVO.getEndPlanStartTime())
.betweenIfPresent(ProjectDO::getPlanEndTime, reqVO.getBeginPlanEndTime(), reqVO.getEndPlanEndTime())

16
zsw-farm/zsw-farm-impl/src/main/resources/mapper/project/ProjectMapper.xml

@ -11,14 +11,22 @@
<select id="getProjectSearchPage" resultType="cn.iocoder.yudao.module.farm.dal.dataobject.project.ProjectDO">
SELECT p.* FROM farm_project p
INNER JOIN farm_resource r
ON JSON_CONTAINS(p.resources, CONVERT(r.id, CHAR))
-- INNER JOIN farm_resource r
-- ON JSON_CONTAINS(p.resources, CONVERT(r.id, CHAR))
INNER JOIN farm_area a
ON JSON_CONTAINS(p.areas, CONVERT(a.id, CHAR))
AND 1 = 1
<if test="name != null and name != '' ">
AND p.name like concat('%', #{name}, '%')
</if>
<if test="resources != null and resources != '' ">
AND r.name like concat('%', #{resources}, '%')
<!-- <if test="resources != null and resources != '' ">-->
<!-- AND r.name like concat('%', #{resources}, '%')-->
<!-- </if>-->
<if test="areas != null and areas != '' ">
AND a.name like concat('%', #{areas}, '%')
</if>
<if test="state != null and state != '' ">
AND r.state like concat('%', #{state}, '%')
</if>
<if test="weight != null">
AND p.weight = #{weight}

Loading…
Cancel
Save