# Conflicts: # ruoyi-business/src/main/resources/mapper/resource/TResourceLandMapper.xmlmaster
| @@ -4,16 +4,19 @@ import com.ruoyi.common.annotation.Log; | |||
| import com.ruoyi.common.core.controller.BaseController; | |||
| import com.ruoyi.common.core.domain.AjaxResult; | |||
| import com.ruoyi.common.core.domain.entity.SysDept; | |||
| import com.ruoyi.common.core.domain.model.LoginUser; | |||
| import com.ruoyi.common.core.domain.pdf.PageSet; | |||
| import com.ruoyi.common.core.domain.pdf.PdfProperty; | |||
| import com.ruoyi.common.core.domain.pdf.ShoulderItem; | |||
| import com.ruoyi.common.core.page.TableDataInfo; | |||
| import com.ruoyi.common.enums.BusinessType; | |||
| import com.ruoyi.common.utils.ServletUtils; | |||
| import com.ruoyi.common.utils.StringUtils; | |||
| import com.ruoyi.common.utils.pdf.PdfUtils; | |||
| import com.ruoyi.common.utils.poi.ExcelUtil; | |||
| import com.ruoyi.common.utils.space.SpaceUtils; | |||
| import com.ruoyi.common.utils.translation.TranslateUtils; | |||
| import com.ruoyi.framework.web.service.TokenService; | |||
| import com.ruoyi.resource.domain.TResourceLand; | |||
| import com.ruoyi.resource.domain.TResourceOperation; | |||
| import com.ruoyi.resource.domain.TResourceVo; | |||
| @@ -49,6 +52,10 @@ public class TResourceLandController extends BaseController | |||
| @Autowired | |||
| private ISysDeptService deptService; | |||
| @Autowired | |||
| private TokenService tokenService; | |||
| /** | |||
| * 查询地块属性列表 | |||
| */ | |||
| @@ -56,6 +63,14 @@ public class TResourceLandController extends BaseController | |||
| @GetMapping("/list") | |||
| public TableDataInfo list(TResourceLand tResourceLand) | |||
| { | |||
| if(StringUtils.isNull(tResourceLand.getDeptId())){ | |||
| LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest()); | |||
| SysDept dept = deptService.selectDeptById(loginUser.getUser().getDeptId()); | |||
| tResourceLand.setImportCode(dept.getImportCode()); | |||
| }else{ | |||
| SysDept dept = deptService.selectDeptById(tResourceLand.getDeptId()); | |||
| tResourceLand.setImportCode(dept.getImportCode()); | |||
| } | |||
| startPage(); | |||
| List<TResourceLand> list = tResourceLandService.selectTResourceLandList(tResourceLand); | |||
| return getDataTable(list); | |||
| @@ -70,6 +85,14 @@ public class TResourceLandController extends BaseController | |||
| @PostMapping("/export") | |||
| public void export(HttpServletResponse response, TResourceLand tResourceLand) | |||
| { | |||
| if(StringUtils.isNull(tResourceLand.getDeptId())){ | |||
| LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest()); | |||
| SysDept dept = deptService.selectDeptById(loginUser.getUser().getDeptId()); | |||
| tResourceLand.setImportCode(dept.getImportCode()); | |||
| }else{ | |||
| SysDept dept = deptService.selectDeptById(tResourceLand.getDeptId()); | |||
| tResourceLand.setImportCode(dept.getImportCode()); | |||
| } | |||
| List<TResourceLand> list = tResourceLandService.selectTResourceLandList(tResourceLand); | |||
| ExcelUtil<TResourceLand> util = new ExcelUtil<TResourceLand>(TResourceLand.class); | |||
| util.exportExcel(response, list, "地块属性数据"); | |||
| @@ -144,9 +167,10 @@ public class TResourceLandController extends BaseController | |||
| resource.setDkImg(operation.getDkImg()); | |||
| resource.setSurveyStatus(operation.getSurveyStatus()); | |||
| TranslateUtils.translate(resource, false); | |||
| } | |||
| TranslateUtils.translate(resource, false); | |||
| return success(resource); | |||
| } | |||
| @@ -167,6 +191,8 @@ public class TResourceLandController extends BaseController | |||
| } | |||
| tResourceLand.setImportCode(dept.getImportCode()); | |||
| tResourceLand.setQsdwdm(dept.getOrgCode()); | |||
| tResourceLand.setQsdwmc(dept.getDeptName()); | |||
| if(StringUtils.isNull(tResourceLand.getDkbm())){ | |||
| if(dept.getOrgCode().length() == 12){ // 12 村级,要后缀 00 | |||
| tResourceLand.setDkbm(tResourceLandService.selectTResourceLandAutoGenCode(dept.getOrgCode() + "00")); | |||
| @@ -4,15 +4,18 @@ import com.ruoyi.common.annotation.Log; | |||
| import com.ruoyi.common.core.controller.BaseController; | |||
| import com.ruoyi.common.core.domain.AjaxResult; | |||
| import com.ruoyi.common.core.domain.entity.SysDept; | |||
| import com.ruoyi.common.core.domain.model.LoginUser; | |||
| import com.ruoyi.common.core.domain.pdf.PageSet; | |||
| import com.ruoyi.common.core.domain.pdf.PdfProperty; | |||
| import com.ruoyi.common.core.domain.pdf.ShoulderItem; | |||
| import com.ruoyi.common.core.page.TableDataInfo; | |||
| import com.ruoyi.common.enums.BusinessType; | |||
| import com.ruoyi.common.utils.ServletUtils; | |||
| import com.ruoyi.common.utils.StringUtils; | |||
| import com.ruoyi.common.utils.pdf.PdfUtils; | |||
| import com.ruoyi.common.utils.poi.ExcelUtil; | |||
| import com.ruoyi.common.utils.translation.TranslateUtils; | |||
| import com.ruoyi.framework.web.service.TokenService; | |||
| import com.ruoyi.resource.domain.TResourceLand; | |||
| import com.ruoyi.resource.domain.TResourceOperation; | |||
| import com.ruoyi.resource.domain.TResourceVo; | |||
| @@ -49,6 +52,10 @@ public class TResourceOperationController extends BaseController | |||
| private ISysDeptService deptService; | |||
| @Autowired | |||
| private TokenService tokenService; | |||
| /** | |||
| * 查询地块经营列表 | |||
| */ | |||
| @@ -56,6 +63,14 @@ public class TResourceOperationController extends BaseController | |||
| @GetMapping("/list") | |||
| public TableDataInfo list(TResourceOperation tResourceOperation) | |||
| { | |||
| if(StringUtils.isNull(tResourceOperation.getDeptId())){ | |||
| LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest()); | |||
| SysDept dept = deptService.selectDeptById(loginUser.getUser().getDeptId()); | |||
| tResourceOperation.setImportCode(dept.getImportCode()); | |||
| }else{ | |||
| SysDept dept = deptService.selectDeptById(tResourceOperation.getDeptId()); | |||
| tResourceOperation.setImportCode(dept.getImportCode()); | |||
| } | |||
| startPage(); | |||
| List<TResourceOperation> list = tResourceOperationService.selectTResourceOperationList(tResourceOperation); | |||
| return getDataTable(list); | |||
| @@ -70,6 +85,14 @@ public class TResourceOperationController extends BaseController | |||
| @PostMapping("/export") | |||
| public void export(HttpServletResponse response, TResourceOperation tResourceOperation) | |||
| { | |||
| if(StringUtils.isNull(tResourceOperation.getDeptId())){ | |||
| LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest()); | |||
| SysDept dept = deptService.selectDeptById(loginUser.getUser().getDeptId()); | |||
| tResourceOperation.setImportCode(dept.getImportCode()); | |||
| }else{ | |||
| SysDept dept = deptService.selectDeptById(tResourceOperation.getDeptId()); | |||
| tResourceOperation.setImportCode(dept.getImportCode()); | |||
| } | |||
| List<TResourceOperation> list = tResourceOperationService.selectTResourceOperationList(tResourceOperation); | |||
| ExcelUtil<TResourceOperation> util = new ExcelUtil<TResourceOperation>(TResourceOperation.class); | |||
| util.exportExcel(response, list, "地块经营数据"); | |||
| @@ -145,8 +168,9 @@ public class TResourceOperationController extends BaseController | |||
| resource.setDkImg(operation.getDkImg()); | |||
| resource.setSurveyStatus(operation.getSurveyStatus()); | |||
| TranslateUtils.translate(resource, false); | |||
| } | |||
| TranslateUtils.translate(resource, false); | |||
| return success(resource); | |||
| } | |||
| @@ -29,7 +29,7 @@ public class TResourceLand extends BaseEntity | |||
| private String deptName; | |||
| /** 标识码 */ | |||
| @Excel(name = "标识码 */") | |||
| @Excel(name = "标识码") | |||
| private Integer bsm; | |||
| /** 要素代码 */ | |||
| @@ -37,7 +37,7 @@ public class TResourceLand extends BaseEntity | |||
| private String ysdm; | |||
| /** 地块代码 */ | |||
| @Excel(name = "地块代码") | |||
| @Excel(name = "地块编码", width = 25) | |||
| private String dkbm; | |||
| /** 地块名称 */ | |||
| @@ -84,22 +84,32 @@ public class TResourceLand extends BaseEntity | |||
| @Excel(name = "地块北至") | |||
| private String dkbz; | |||
| /** 备注信息 */ | |||
| @Excel(name = "备注信息") | |||
| private String dkbzxx; | |||
| /** 指界人姓名 */ | |||
| @Excel(name = "指界人姓名") | |||
| private String zjrxm; | |||
| /** 实测面积( ㎡) */ | |||
| @Excel(name = "实测面积(㎡)") | |||
| private BigDecimal scmj; | |||
| /** 图显面积(亩) */ | |||
| @Excel(name = "图显面积(亩)") | |||
| private BigDecimal txmj; | |||
| /** 实测面积(亩) */ | |||
| @Excel(name = "实测面积(亩)") | |||
| private BigDecimal scmjm; | |||
| /** 是否帐外地 字典 is_common */ | |||
| @Excel(name = "是否帐外地", dictType = "is_common") | |||
| private String sfzwd; | |||
| /** 权属单位代码(即org_code) */ | |||
| private String qsdwdm; | |||
| /** 权属单位名称*/ | |||
| private String qsdwmc; | |||
| /** 备注信息 */ | |||
| @Excel(name = "备注信息") | |||
| private String dkbzxx; | |||
| /** 地块矢量 */ | |||
| private String theGeom; | |||
| @@ -282,14 +292,13 @@ public class TResourceLand extends BaseEntity | |||
| return zjrxm; | |||
| } | |||
| public void setScmj(BigDecimal scmj) | |||
| { | |||
| this.scmj = scmj; | |||
| public BigDecimal getTxmj() { | |||
| return txmj; | |||
| } | |||
| public BigDecimal getScmj() | |||
| { | |||
| return scmj; | |||
| public void setTxmj(BigDecimal txmj) { | |||
| this.txmj = txmj; | |||
| } | |||
| public void setScmjm(BigDecimal scmjm) | |||
| @@ -350,6 +359,30 @@ public class TResourceLand extends BaseEntity | |||
| this.deptId = deptId; | |||
| } | |||
| public String getSfzwd() { | |||
| return sfzwd; | |||
| } | |||
| public void setSfzwd(String sfzwd) { | |||
| this.sfzwd = sfzwd; | |||
| } | |||
| public String getQsdwdm() { | |||
| return qsdwdm; | |||
| } | |||
| public void setQsdwdm(String qsdwdm) { | |||
| this.qsdwdm = qsdwdm; | |||
| } | |||
| public String getQsdwmc() { | |||
| return qsdwmc; | |||
| } | |||
| public void setQsdwmc(String qsdwmc) { | |||
| this.qsdwmc = qsdwmc; | |||
| } | |||
| @Override | |||
| public String toString() { | |||
| return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) | |||
| @@ -370,7 +403,6 @@ public class TResourceLand extends BaseEntity | |||
| .append("dkbz", getDkbz()) | |||
| .append("dkbzxx", getDkbzxx()) | |||
| .append("zjrxm", getZjrxm()) | |||
| .append("scmj", getScmj()) | |||
| .append("scmjm", getScmjm()) | |||
| .append("theGeom", getTheGeom()) | |||
| .append("surveyStatus", getSurveyStatus()) | |||
| @@ -29,7 +29,7 @@ public class TResourceOperation extends BaseEntity | |||
| private String deptName; | |||
| /** 地块编码 */ | |||
| @Excel(name = "地块编码") | |||
| @Excel(name = "地块编码", width = 25) | |||
| private String dkbm; | |||
| /** 地块名称 */ | |||
| @@ -95,6 +95,10 @@ public class TResourceVo { | |||
| @Excel(name = "实测面积(亩)") | |||
| private BigDecimal scmjm; | |||
| /** 是否帐外地 字典 is_common */ | |||
| @Excel(name = "是否帐外地", dictType = "is_common") | |||
| private String sfzwd; | |||
| // ------------------------------ | |||
| @@ -22,9 +22,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | |||
| <result property="dkbz" column="DKBZ" /> | |||
| <result property="dkbzxx" column="DKBZXX" /> | |||
| <result property="zjrxm" column="ZJRXM" /> | |||
| <result property="scmj" column="SCMJ" /> | |||
| <result property="txmj" column="TXMJ" /> | |||
| <result property="scmjm" column="SCMJM" /> | |||
| <result property="theGeom" column="the_geom" /> | |||
| <result property="qsdwdm" column="QSDWDM" /> | |||
| <result property="qsdwmc" column="QSDWMC" /> | |||
| <result property="sfzwd" column="SFZWD" /> | |||
| <result property="surveyStatus" column="survey_status" /> | |||
| <result property="importCode" column="import_code" /> | |||
| <result property="deptName" column="dept_name" /> | |||
| @@ -35,7 +38,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | |||
| </resultMap> | |||
| <sql id="selectTResourceLandVo"> | |||
| select fid, BSM, YSDM, DKBM, DKMC, SYQXZ, DKLB, TDLYLX, DLDJ, TDYT, SFJBNT, DKDZ, DKXZ, DKNZ, DKBZ, DKBZXX, ZJRXM, SCMJ, SCMJM, ST_AsGeoJSON(the_geom) as the_geom, survey_status, import_code, dept_name, create_by, create_time, update_by, update_time from t_resource_land | |||
| select fid, BSM, YSDM, DKBM, DKMC, SYQXZ, DKLB, TDLYLX, DLDJ, TDYT, SFJBNT, DKDZ, DKXZ, DKNZ, DKBZ, DKBZXX, ZJRXM, TXMJ, SCMJM, QSDWDM, QSDWMC, SFZWD, ST_AsGeoJSON(the_geom) as the_geom, survey_status, import_code, dept_name, create_by, create_time, update_by, update_time from t_resource_land | |||
| </sql> | |||
| <select id="selectTResourceLandList" parameterType="TResourceLand" resultMap="TResourceLandResult"> | |||
| @@ -50,8 +53,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | |||
| <if test="dldj != null and dldj != ''"> and DLDJ = #{dldj}</if> | |||
| <if test="tdyt != null and tdyt != ''"> and TDYT = #{tdyt}</if> | |||
| <if test="sfjbnt != null and sfjbnt != ''"> and SFJBNT = #{sfjbnt}</if> | |||
| <if test="sfzwd != null and sfzwd != ''"> and SFZWD = #{sfzwd}</if> | |||
| <if test="surveyStatus != null and surveyStatus != ''"> and survey_status = #{surveyStatus}</if> | |||
| <if test="importCode != null and importCode != ''"> and import_code like concat('%', #{importCode}, '%')</if> | |||
| <if test="importCode != null and importCode != ''"> and import_code like concat(#{importCode}, '%')</if> | |||
| </where> | |||
| </select> | |||
| @@ -88,9 +92,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | |||
| <if test="dkbz != null">DKBZ,</if> | |||
| <if test="dkbzxx != null">DKBZXX,</if> | |||
| <if test="zjrxm != null">ZJRXM,</if> | |||
| <if test="scmj != null">SCMJ,</if> | |||
| <if test="txmj != null">TXMJ,</if> | |||
| <if test="scmjm != null">SCMJM,</if> | |||
| <if test="theGeom != null">the_geom,</if> | |||
| <if test="qsdwdm != null">QSDWDM,</if> | |||
| <if test="qsdwmc != null">QSDWMC,</if> | |||
| <if test="sfzwd != null">SFZWD,</if> | |||
| <if test="surveyStatus != null and surveyStatus != ''">survey_status,</if> | |||
| <if test="importCode != null and importCode != ''">import_code,</if> | |||
| <if test="deptName != null">dept_name,</if> | |||
| @@ -116,9 +123,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | |||
| <if test="dkbz != null">#{dkbz},</if> | |||
| <if test="dkbzxx != null">#{dkbzxx},</if> | |||
| <if test="zjrxm != null">#{zjrxm},</if> | |||
| <if test="scmj != null">#{scmj},</if> | |||
| <if test="txmj != null">#{txmj},</if> | |||
| <if test="scmjm != null">#{scmjm},</if> | |||
| <if test="theGeom != null">ST_GEOMFROMTEXT(#{theGeom}),</if> | |||
| <if test="qsdwdm != null">#{qsdwdm},</if> | |||
| <if test="qsdwmc != null">#{qsdwmc},</if> | |||
| <if test="sfzwd != null">#{sfzwd},</if> | |||
| <if test="surveyStatus != null and surveyStatus != ''">#{surveyStatus},</if> | |||
| <if test="importCode != null and importCode != ''">#{importCode},</if> | |||
| <if test="deptName != null">#{deptName},</if> | |||
| @@ -148,9 +158,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | |||
| DKBZ, | |||
| DKBZXX, | |||
| ZJRXM, | |||
| SCMJ, | |||
| TXMJ, | |||
| SCMJM, | |||
| the_geom, | |||
| QSDWDM, | |||
| QSDWMC, | |||
| SFZWD, | |||
| survey_status, | |||
| import_code, | |||
| dept_name, | |||
| @@ -178,9 +191,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | |||
| #{item.dkbz}, | |||
| #{item.dkbzxx}, | |||
| #{item.zjrxm}, | |||
| #{item.scmj}, | |||
| #{item.txmj}, | |||
| #{item.scmjm}, | |||
| ST_GEOMFROMTEXT(#{item.theGeom}), | |||
| #{item.qsdwdm}, | |||
| #{item.qsdwmc}, | |||
| #{item.sfzwd}, | |||
| #{item.surveyStatus}, | |||
| #{item.importCode}, | |||
| #{item.deptName}, | |||
| @@ -211,9 +227,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | |||
| <if test="dkbz != null">DKBZ = #{dkbz},</if> | |||
| <if test="dkbzxx != null">DKBZXX = #{dkbzxx},</if> | |||
| <if test="zjrxm != null">ZJRXM = #{zjrxm},</if> | |||
| <if test="scmj != null">SCMJ = #{scmj},</if> | |||
| <if test="txmj != null">TXMJ = #{txmj},</if> | |||
| <if test="scmjm != null">SCMJM = #{scmjm},</if> | |||
| <if test="theGeom != null">the_geom = ST_GEOMFROMTEXT(#{theGeom}),</if> | |||
| <if test="qsdwdm != null">QSDWDM = #{qsdwdm},</if> | |||
| <if test="qsdwmc != null">QSDWMC = #{qsdwmc},</if> | |||
| <if test="sfzwd != null">SFZWD = #{sfzwd},</if> | |||
| <if test="surveyStatus != null and surveyStatus != ''">survey_status = #{surveyStatus},</if> | |||
| <if test="importCode != null and importCode != ''">import_code = #{importCode},</if> | |||
| <if test="deptName != null">dept_name = #{deptName},</if> | |||
| @@ -246,9 +265,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | |||
| <if test="item.dkbz != null">DKBZ = #{item.dkbz},</if> | |||
| <if test="item.dkbzxx != null">DKBZXX = #{item.dkbzxx},</if> | |||
| <if test="item.zjrxm != null">ZJRXM = #{item.zjrxm},</if> | |||
| <if test="item.scmj != null">SCMJ = #{item.scmj},</if> | |||
| <if test="item.txmj != null">TXMJ = #{item.txmj},</if> | |||
| <if test="item.scmjm != null">SCMJM = #{item.scmjm},</if> | |||
| <if test="item.theGeom != null">the_geom = ST_GEOMFROMTEXT(#{item.theGeom}),</if> | |||
| <if test="item.qsdwdm != null">QSDWDM = #{item.qsdwdm},</if> | |||
| <if test="item.qsdwmc != null">QSDWMC = #{item.qsdwmc},</if> | |||
| <if test="item.sfzwd != null">SFZWD = #{item.sfzwd},</if> | |||
| <if test="item.surveyStatus != null and item.surveyStatus != ''">survey_status = #{item.surveyStatus},</if> | |||
| <if test="item.importCode != null and item.importCode != ''">import_code = #{item.importCode},</if> | |||
| <if test="item.deptName != null">dept_name = #{item.deptName},</if> | |||
| @@ -52,7 +52,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | |||
| <if test="jydxzjhm != null and jydxzjhm != ''"> and JYDXZJHM = #{jydxzjhm}</if> | |||
| <if test="sfqdht != null and sfqdht != ''"> and SFQDHT = #{sfqdht}</if> | |||
| <if test="surveyStatus != null and surveyStatus != ''"> and survey_status = #{surveyStatus}</if> | |||
| <if test="importCode != null and importCode != ''"> and import_code like concat('%', #{importCode}, '%')</if> | |||
| <if test="importCode != null and importCode != ''"> and import_code like concat(#{importCode}, '%')</if> | |||
| </where> | |||
| </select> | |||