Browse Source

feat: 动物防治tdsql改造

release-sy-tdsql
hxh 1 month ago
parent
commit
eb6b2eb836
  1. 7
      shuili-system/src/main/java/com/kms/yxgh/business/dw/mapper/DwCheckingProblemV2Mapper.java
  2. 9
      shuili-system/src/main/java/com/kms/yxgh/business/dw/mapper/DwCheckingRecordV2Mapper.java
  3. 7
      shuili-system/src/main/java/com/kms/yxgh/business/dw/mapper/DwCheckingV2Mapper.java
  4. 7
      shuili-system/src/main/java/com/kms/yxgh/business/dw/mapper/DwYhV2Mapper.java

7
shuili-system/src/main/java/com/kms/yxgh/business/dw/mapper/DwCheckingProblemV2Mapper.java

@ -22,16 +22,15 @@ import java.util.List;
public interface DwCheckingProblemV2Mapper extends BaseMapper<DwCheckingProblemV2> {
@Select("<script> " +
"select base.adcd code ,count(1) sum " +
"select xm.note code ,count(1) sum " +
"from bs_sgc_dw_xcqx xm " +
"left join att_dike_base base on base.dike_code=xm.dike_code " +
"where 1=1 " +
"<if test='data.startTime != null'> and xm.create_time &gt;= #{data.startTime} </if> " +
"<if test='data.endTime != null'> and xm.create_time &lt;= #{data.endTime} </if> " +
"<if test='data.adcdQx != null and data.adcdQx != \"\"'>" +
"and base.adcd like concat(#{data.adcdQx}, '%') " +
"and xm.note like concat(#{data.adcdQx}, '%') " +
"</if>" +
"group by base.adcd " +
"group by xm.note " +
"</script>")
List<CountDto> count(@Param("data") ObjectStatisticQueDto sp);

9
shuili-system/src/main/java/com/kms/yxgh/business/dw/mapper/DwCheckingRecordV2Mapper.java

@ -22,19 +22,18 @@ import java.util.List;
public interface DwCheckingRecordV2Mapper extends BaseMapper<DwCheckingRecord> {
@Select("<script> " +
"select base.adcd code ,count(1) sum " +
"select xm.note code ,count(1) sum " +
"from bs_sgc_dw_xsxcjl xm " +
"left join att_project_base base on base.dike_code=xm.dike_code " +
"where 1=1 " +
"<if test='data.startTime != null'> and xm.create_time &gt;= #{data.startTime} </if> " +
"<if test='data.endTime != null'> and xm.create_time &lt;= #{data.endTime} </if> " +
"<if test='data.adcdQx != null and data.adcdQx != \"\"'>" +
"and base.adcd like concat(#{data.adcdQx}, '%') " +
"and xm.note like concat(#{data.adcdQx}, '%') " +
"</if>" +
"<if test='category != null'>" +
"and xm.category = #{category.value} " +
"</if>" +
"group by base.adcd " +
"group by xm.note " +
"</script>")
List<CountDto> count(@Param("data") ObjectStatisticQueDto sp, @Param("category") PatrolMaintenanceCategory category);
@ -54,7 +53,7 @@ public interface DwCheckingRecordV2Mapper extends BaseMapper<DwCheckingRecord> {
List<CountDateDto> countDateGroup(@Param("data") ObjectStatisticQueDto sp, @Param("category") PatrolMaintenanceCategory category);
@Select("<script> " +
"select count(distinct project_code) from bs_sgc_dw_xsxcjl " +
"select count(distinct dike_code) from bs_sgc_dw_xsxcjl " +
"<if test='data.startTime != null' > and create_time &gt;= #{data.startTime} </if> " +
"<if test='data.endTime != null'> and create_time &lt;= #{data.endTime} </if> " +
"<if test='data.code != null and data.code != \"\"'>" +

7
shuili-system/src/main/java/com/kms/yxgh/business/dw/mapper/DwCheckingV2Mapper.java

@ -20,14 +20,13 @@ import java.util.List;
public interface DwCheckingV2Mapper extends BaseMapper<DwCheckingV2ProjectManage> {
@Select("<script> " +
"select base.adcd code ,count(1) sum " +
"select xm.note code ,count(1) sum " +
"from bs_sgc_dw_xmgl xm " +
"left join att_dike_base base on base.dike_code=xm.dike_code " +
"where 1=1 " +
"<if test='data.adcdQx != null and data.adcdQx != \"\"'>" +
"and base.adcd like concat(#{data.adcdQx}, '%') " +
"and xm.note like concat(#{data.adcdQx}, '%') " +
"</if>" +
"group by base.adcd " +
"group by xm.note " +
"</script>"
)
List<CountDto> count(@Param("data") ObjectStatisticQueDto sp);

7
shuili-system/src/main/java/com/kms/yxgh/business/dw/mapper/DwYhV2Mapper.java

@ -26,16 +26,15 @@ public interface DwYhV2Mapper extends BaseMapper<DwYhV2> {
@Select("<script> " +
"select base.adcd code ,count(1) sum " +
"select xm.note code ,count(1) sum " +
"from bs_sgc_dw_xcyj xm " +
"left join att_dike_base base on base.dike_code=xm.dike_code " +
"where 1=1 " +
"<if test='data.startTime != null'> and xm.create_time &gt;= #{data.startTime} </if> " +
"<if test='data.endTime != null'> and xm.create_time &lt;= #{data.endTime} </if> " +
"<if test='data.adcdQx != null and data.adcdQx != \"\"'>" +
"and base.adcd like concat(#{data.adcdQx}, '%') " +
"and xm.note like concat(#{data.adcdQx}, '%') " +
"</if>" +
"group by base.adcd " +
"group by xm.note " +
"</script>")
List<CountDto> count(@Param("data") ObjectStatisticQueDto sp);

Loading…
Cancel
Save