parent
a77c9bb829
commit
be64dba0b5
@ -1,112 +0,0 @@
|
||||
//package com.ruoyi.programManagement.controller;
|
||||
//
|
||||
//import com.ruoyi.common.core.controller.BaseController;
|
||||
//import com.ruoyi.common.core.domain.AjaxResult;
|
||||
//import com.ruoyi.common.core.page.TableDataInfo;
|
||||
//import com.ruoyi.common.utils.StringUtils;
|
||||
//import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
//import com.ruoyi.programManagement.entity.BAdministrative;
|
||||
//import com.ruoyi.programManagement.entity.request.BAdministrativeTreeRequest;
|
||||
//import com.ruoyi.programManagement.service.IBAdministrativeService;
|
||||
//import io.swagger.annotations.Api;
|
||||
//import io.swagger.annotations.ApiOperation;
|
||||
//import org.springframework.beans.factory.annotation.Autowired;
|
||||
//import org.springframework.transaction.annotation.Transactional;
|
||||
//import org.springframework.web.bind.annotation.*;
|
||||
//
|
||||
//import javax.servlet.http.HttpServletResponse;
|
||||
//import java.util.ArrayList;
|
||||
//import java.util.List;
|
||||
//
|
||||
///**
|
||||
// * 行政区划Controller
|
||||
// *
|
||||
// * @author ruoyi
|
||||
// * @date 2023-09-11
|
||||
// */
|
||||
//@Api(tags = "行政区划")
|
||||
//@Transactional(rollbackFor = Exception.class)
|
||||
//@RestController
|
||||
//@RequestMapping("/pharmaceuticals/administrative")
|
||||
//public class BAdministrativeController extends BaseController {
|
||||
// @Autowired
|
||||
// private IBAdministrativeService bAdministrativeService;
|
||||
//
|
||||
// /**
|
||||
// * 查询行政区划列表
|
||||
// */
|
||||
// @GetMapping("/list")
|
||||
// public TableDataInfo list(BAdministrative bAdministrative) {
|
||||
// startPage();
|
||||
// List<BAdministrative> list = bAdministrativeService.selectBAdministrativeList(bAdministrative);
|
||||
// return getDataTable(list);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 导出行政区划列表
|
||||
// */
|
||||
// @PostMapping("/export")
|
||||
// public void export(HttpServletResponse response, BAdministrative bAdministrative) {
|
||||
// List<BAdministrative> list = bAdministrativeService.selectBAdministrativeList(bAdministrative);
|
||||
// ExcelUtil<BAdministrative> util = new ExcelUtil<BAdministrative>(BAdministrative.class);
|
||||
// util.exportExcel(response, list, "行政区划数据");
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 获取行政区划详细信息
|
||||
// */
|
||||
// @GetMapping(value = "/{id}")
|
||||
// public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
// return success(bAdministrativeService.selectBAdministrativeById(id));
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 新增行政区划
|
||||
// */
|
||||
//
|
||||
// @PostMapping
|
||||
// public AjaxResult add(@RequestBody BAdministrative bAdministrative) {
|
||||
// return toAjax(bAdministrativeService.insertBAdministrative(bAdministrative));
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 修改行政区划
|
||||
// */
|
||||
// @PutMapping
|
||||
// public AjaxResult edit(@RequestBody BAdministrative bAdministrative) {
|
||||
// return toAjax(bAdministrativeService.updateBAdministrative(bAdministrative));
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 删除行政区划
|
||||
// */
|
||||
// @DeleteMapping("/{ids}")
|
||||
// public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
// return toAjax(bAdministrativeService.deleteBAdministrativeByIds(ids));
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 行政区划树结构
|
||||
// */
|
||||
// @ApiOperation(value = "行政区划树结构")
|
||||
// @GetMapping("/tree")
|
||||
// public AjaxResult tree() {
|
||||
// List<BAdministrativeTreeRequest> list = bAdministrativeService.selectBAdministrativeTreeRequestList();
|
||||
// List<BAdministrativeTreeRequest> listsub = bAdministrativeService.selectcascadingSelectDataList();
|
||||
// List<BAdministrativeTreeRequest> cascadingSelectData = new ArrayList<>();
|
||||
// for (BAdministrativeTreeRequest item1 : list) {
|
||||
// BAdministrativeTreeRequest parentDto = new BAdministrativeTreeRequest(item1.getCounty(), item1.getSubdistrict(), item1.getInstitutionName());
|
||||
// for (BAdministrativeTreeRequest item2 : listsub) {
|
||||
// if (item2.getSubdistrict()!=null && !item2.getSubdistrict().equals("")){
|
||||
// if (item2.getSubdistrict().substring(0, 7).equals(item1.getCounty().substring(0, 7))) {
|
||||
// BAdministrativeTreeRequest childDto = new BAdministrativeTreeRequest(item2.getCounty(), item2.getSubdistrict(), item2.getInstitutionName());
|
||||
// parentDto.addChild(childDto);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// cascadingSelectData.add(parentDto);
|
||||
// }
|
||||
// return success(cascadingSelectData);
|
||||
// }
|
||||
//
|
||||
//}
|
@ -0,0 +1,127 @@
|
||||
package com.ruoyi.programManagement.controller;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.ruoyi.programManagement.entity.request.BAdministrativeDistrictRequest;
|
||||
import com.ruoyi.programManagement.entity.request.BAdministrativeTreeRequest;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.programManagement.domain.BAdministrativeDivision;
|
||||
import com.ruoyi.programManagement.service.IBAdministrativeDivisionService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 行政区划Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @since 2023-12-12
|
||||
*/
|
||||
@Api(tags = "行政区划")
|
||||
@RestController
|
||||
@RequestMapping("/pharmaceuticals/division")
|
||||
public class BAdministrativeDivisionController extends BaseController {
|
||||
@Resource
|
||||
private IBAdministrativeDivisionService bAdministrativeDivisionService;
|
||||
|
||||
/**
|
||||
* 查询行政区划列表
|
||||
*/
|
||||
@ApiOperation(value = "查询行政区划列表", response = BAdministrativeDivision.class)
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(BAdministrativeDivision bAdministrativeDivision) {
|
||||
startPage();
|
||||
List<BAdministrativeDivision> list = bAdministrativeDivisionService.selectBAdministrativeDivisionList(bAdministrativeDivision);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出行政区划列表
|
||||
*/
|
||||
@ApiOperation(value = "导出行政区划列表")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, BAdministrativeDivision bAdministrativeDivision) {
|
||||
List<BAdministrativeDivision> list = bAdministrativeDivisionService.selectBAdministrativeDivisionList(bAdministrativeDivision);
|
||||
ExcelUtil<BAdministrativeDivision> util = new ExcelUtil<BAdministrativeDivision>(BAdministrativeDivision. class);
|
||||
util.exportExcel(response, list, "行政区划数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取行政区划详细信息
|
||||
*/
|
||||
@ApiOperation(value = " 获取行政区划详细信息")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
return success(bAdministrativeDivisionService.selectBAdministrativeDivisionById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增行政区划
|
||||
*/
|
||||
@ApiOperation(value = " 新增行政区划")
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody BAdministrativeDivision bAdministrativeDivision) {
|
||||
return toAjax(bAdministrativeDivisionService.insertBAdministrativeDivision(bAdministrativeDivision));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改行政区划
|
||||
*/
|
||||
@ApiOperation(value = " 修改行政区划")
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody BAdministrativeDivision bAdministrativeDivision) {
|
||||
return toAjax(bAdministrativeDivisionService.updateBAdministrativeDivision(bAdministrativeDivision));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除行政区划
|
||||
*/
|
||||
@ApiOperation(value = " 删除行政区划")
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(bAdministrativeDivisionService.deleteBAdministrativeDivisionByIds(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 行政区划树结构
|
||||
*/
|
||||
@ApiOperation(value = "行政区划树结构")
|
||||
@GetMapping("/tree")
|
||||
public AjaxResult tree() {
|
||||
//区划list
|
||||
List<BAdministrativeDistrictRequest> list = bAdministrativeDivisionService.selectBycountyList();
|
||||
//乡镇list
|
||||
List<BAdministrativeTreeRequest> listsub = bAdministrativeDivisionService.selectByDistctList();
|
||||
List<BAdministrativeDistrictRequest> cascadingSelectData = new ArrayList<>();
|
||||
for (BAdministrativeDistrictRequest item1 : list) {
|
||||
BAdministrativeDistrictRequest parentDto = new BAdministrativeDistrictRequest(item1.getDistrictCode(),item1.getDistrict());
|
||||
for (BAdministrativeTreeRequest item2 : listsub) {
|
||||
if (item2.getCountyCode() != null && !item2.getCountyCode().equals("")) {
|
||||
if (item2.getCountyCode().substring(0,6).equals(item1.getDistrictCode())) {
|
||||
BAdministrativeTreeRequest childDto = new BAdministrativeTreeRequest(item2.getCounty(), item2.getCountyCode(),item2.getSort());
|
||||
parentDto.addChild(childDto);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
cascadingSelectData.add(parentDto);
|
||||
}
|
||||
return success(cascadingSelectData);
|
||||
}
|
||||
}
|
@ -0,0 +1,88 @@
|
||||
package com.ruoyi.programManagement.controller;
|
||||
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.programManagement.entity.BEnterpriseNew;
|
||||
import com.ruoyi.programManagement.service.IBEnterpriseNewService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 企业新表Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @since 2023-12-12
|
||||
*/
|
||||
@Api(tags = "企业新表")
|
||||
@RestController
|
||||
@RequestMapping("/programManagement/new")
|
||||
public class BEnterpriseNewController extends BaseController {
|
||||
@Resource
|
||||
private IBEnterpriseNewService bEnterpriseNewService;
|
||||
|
||||
/**
|
||||
* 查询企业新表列表
|
||||
*/
|
||||
@ApiOperation(value = "查询企业新表列表", response = BEnterpriseNew.class)
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(BEnterpriseNew bEnterpriseNew) {
|
||||
startPage();
|
||||
List<BEnterpriseNew> list = bEnterpriseNewService.selectBEnterpriseNewList(bEnterpriseNew);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出企业新表列表
|
||||
*/
|
||||
@ApiOperation(value = "导出企业新表列表")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, BEnterpriseNew bEnterpriseNew) {
|
||||
List<BEnterpriseNew> list = bEnterpriseNewService.selectBEnterpriseNewList(bEnterpriseNew);
|
||||
ExcelUtil<BEnterpriseNew> util = new ExcelUtil<BEnterpriseNew>(BEnterpriseNew.class);
|
||||
util.exportExcel(response, list, "企业新表数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取企业新表详细信息
|
||||
*/
|
||||
@ApiOperation(value = " 获取企业新表详细信息")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
return success(bEnterpriseNewService.selectBEnterpriseNewById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增企业新表
|
||||
*/
|
||||
@ApiOperation(value = " 新增企业新表")
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody BEnterpriseNew bEnterpriseNew) {
|
||||
return toAjax(bEnterpriseNewService.insertBEnterpriseNew(bEnterpriseNew));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改企业新表
|
||||
*/
|
||||
@ApiOperation(value = " 修改企业新表")
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody BEnterpriseNew bEnterpriseNew) {
|
||||
return toAjax(bEnterpriseNewService.updateBEnterpriseNew(bEnterpriseNew));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除企业新表
|
||||
*/
|
||||
@ApiOperation(value = " 删除企业新表")
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(bEnterpriseNewService.deleteBEnterpriseNewByIds(ids));
|
||||
}
|
||||
}
|
@ -1,92 +0,0 @@
|
||||
//package com.ruoyi.programManagement.controller;
|
||||
//
|
||||
//import com.ruoyi.common.core.controller.BaseController;
|
||||
//import com.ruoyi.common.core.domain.AjaxResult;
|
||||
//import com.ruoyi.common.core.page.TableDataInfo;
|
||||
//import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
//import com.ruoyi.programManagement.entity.SzEntBasicInfo;
|
||||
//import com.ruoyi.programManagement.entity.request.SzEntBasicInfoPageRequest;
|
||||
//import com.ruoyi.programManagement.entity.response.SzEntBasicInfoPageResponse;
|
||||
//import com.ruoyi.programManagement.service.ISzEntBasicInfoService;
|
||||
//import io.swagger.annotations.Api;
|
||||
//import io.swagger.annotations.ApiOperation;
|
||||
//import org.springframework.beans.factory.annotation.Autowired;
|
||||
//import org.springframework.transaction.annotation.Transactional;
|
||||
//import org.springframework.web.bind.annotation.*;
|
||||
//
|
||||
//import javax.servlet.http.HttpServletResponse;
|
||||
//import javax.validation.Valid;
|
||||
//import java.util.List;
|
||||
//
|
||||
///**
|
||||
// * 企业基本信息Controller
|
||||
// *
|
||||
// * @author ruoyi
|
||||
// * @date 2023-09-09
|
||||
// */
|
||||
//@RestController
|
||||
//@RequestMapping("/pharmaceuticals/info")
|
||||
//@Api(tags = "企业基本信息")
|
||||
//@Transactional(rollbackFor = Exception.class)
|
||||
//public class SzEntBasicInfoController extends BaseController {
|
||||
// @Autowired
|
||||
// private ISzEntBasicInfoService szEntBasicInfoService;
|
||||
//
|
||||
// /**
|
||||
// * 分页查询企业基本信息列表
|
||||
// *
|
||||
// * @Parm req 请求类
|
||||
// */
|
||||
// @ApiOperation(value = "分页查询企业基本信息列表", response = SzEntBasicInfoPageResponse.class)
|
||||
// @GetMapping("/list")
|
||||
// public AjaxResult page(@Valid SzEntBasicInfoPageRequest req) {
|
||||
// return success(szEntBasicInfoService.page(req));
|
||||
// }
|
||||
//
|
||||
//
|
||||
// /**
|
||||
// * 导出企业基本信息列表
|
||||
// */
|
||||
// @PostMapping("/export")
|
||||
// public void export(HttpServletResponse response, SzEntBasicInfo szEntBasicInfo) {
|
||||
// List<SzEntBasicInfo> list = szEntBasicInfoService.selectSzEntBasicInfoList(szEntBasicInfo);
|
||||
// ExcelUtil<SzEntBasicInfo> util = new ExcelUtil<SzEntBasicInfo>(SzEntBasicInfo.class);
|
||||
// util.exportExcel(response, list, "企业基本信息数据");
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 获取企业基本信息详细信息
|
||||
// */
|
||||
//
|
||||
// @GetMapping(value = "/{id}")
|
||||
// public AjaxResult getInfo(@PathVariable("id") String ID) {
|
||||
// return success(szEntBasicInfoService.selectSzEntBasicInfoByID(ID));
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 新增企业基本信息
|
||||
// */
|
||||
//
|
||||
// @PostMapping
|
||||
// public AjaxResult add(@RequestBody SzEntBasicInfo szEntBasicInfo) {
|
||||
// return toAjax(szEntBasicInfoService.insertSzEntBasicInfo(szEntBasicInfo));
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 修改企业基本信息
|
||||
// */
|
||||
//
|
||||
// @PutMapping
|
||||
// public AjaxResult edit(@RequestBody SzEntBasicInfo szEntBasicInfo) {
|
||||
// return toAjax(szEntBasicInfoService.updateSzEntBasicInfo(szEntBasicInfo));
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 删除企业基本信息
|
||||
// */
|
||||
//
|
||||
// @DeleteMapping("/{ids}")
|
||||
// public AjaxResult remove(@PathVariable String[] IDs) {
|
||||
// return toAjax(szEntBasicInfoService.deleteSzEntBasicInfoByIDs(IDs));
|
||||
// }
|
||||
//}
|
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.programManagement.domain;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 行政区划对象 b_administrative_division
|
||||
*
|
||||
* @author ruoyi
|
||||
* @since 2023-12-12
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("行政区划")
|
||||
public class BAdministrativeDivision extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* $column.columnComment
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 区县代码
|
||||
*/
|
||||
@Excel(name = "区县代码")
|
||||
@ApiModelProperty(value = "区县代码")
|
||||
private String districtCode;
|
||||
|
||||
/**
|
||||
* 区县
|
||||
*/
|
||||
@Excel(name = "区县")
|
||||
@ApiModelProperty(value = "区县")
|
||||
private String district;
|
||||
|
||||
/**
|
||||
* 乡镇代码
|
||||
*/
|
||||
@Excel(name = "乡镇代码")
|
||||
@ApiModelProperty(value = "乡镇代码")
|
||||
private String countyCode;
|
||||
|
||||
/**
|
||||
* 乡镇
|
||||
*/
|
||||
@Excel(name = "乡镇")
|
||||
@ApiModelProperty(value = "乡镇")
|
||||
private String county;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
@Excel(name = "排序")
|
||||
@ApiModelProperty(value = "排序")
|
||||
private Long sort;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,109 @@
|
||||
package com.ruoyi.programManagement.entity;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 企业新表对象 b_enterprise_new
|
||||
*
|
||||
* @author ruoyi
|
||||
* @since 2023-12-12
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("企业新表")
|
||||
public class BEnterpriseNew extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* $column.columnComment
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 企业id
|
||||
*/
|
||||
@Excel(name = "企业id")
|
||||
@ApiModelProperty(value = "企业id")
|
||||
private String enterpriseId;
|
||||
|
||||
/**
|
||||
* 企业名称
|
||||
*/
|
||||
@Excel(name = "企业名称")
|
||||
@ApiModelProperty(value = "企业名称")
|
||||
private String enterpriseName;
|
||||
|
||||
/**
|
||||
* 行政区划
|
||||
*/
|
||||
@Excel(name = "行政区划")
|
||||
@ApiModelProperty(value = "行政区划")
|
||||
private String district;
|
||||
|
||||
/**
|
||||
* 行业监管大类编码
|
||||
*/
|
||||
@Excel(name = "行业监管大类编码")
|
||||
@ApiModelProperty(value = "行业监管大类编码")
|
||||
private String supervisionLarge;
|
||||
|
||||
/**
|
||||
* 安全风险等级
|
||||
*/
|
||||
@Excel(name = "安全风险等级")
|
||||
@ApiModelProperty(value = "安全风险等级")
|
||||
private String riskLevel;
|
||||
|
||||
/**
|
||||
* 标准化等级
|
||||
*/
|
||||
@Excel(name = "标准化等级")
|
||||
@ApiModelProperty(value = "标准化等级")
|
||||
private String standLevel;
|
||||
|
||||
/**
|
||||
* 上次检查时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "上次检查时间")
|
||||
@Excel(name = "上次检查时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date examineEndTime;
|
||||
|
||||
/**
|
||||
* 创建者ID
|
||||
*/
|
||||
@Excel(name = "创建者ID")
|
||||
@ApiModelProperty(value = "创建者ID")
|
||||
private Long createId;
|
||||
|
||||
/**
|
||||
* 更新者ID
|
||||
*/
|
||||
@Excel(name = "更新者ID")
|
||||
@ApiModelProperty(value = "更新者ID")
|
||||
private Long updateId;
|
||||
|
||||
/**
|
||||
* 用户权限id
|
||||
*/
|
||||
@Excel(name = "用户权限id")
|
||||
@ApiModelProperty(value = "用户权限id")
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 部门权限id
|
||||
*/
|
||||
@Excel(name = "部门权限id")
|
||||
@ApiModelProperty(value = "部门权限id")
|
||||
private Long deptId;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
package com.ruoyi.programManagement.entity.request;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@ApiModel
|
||||
@Data
|
||||
public class BAdministrativeDistrictRequest {
|
||||
/**
|
||||
* 区划代码
|
||||
*/
|
||||
private String districtCode;
|
||||
/**
|
||||
* 区划
|
||||
*/
|
||||
private String district;
|
||||
private List<BAdministrativeTreeRequest> children;
|
||||
|
||||
public BAdministrativeDistrictRequest(String districtCode,String district) {
|
||||
this.districtCode = districtCode;
|
||||
this.district = district;
|
||||
this.children = new ArrayList<>();
|
||||
}
|
||||
|
||||
public void addChild(BAdministrativeTreeRequest childDto) {
|
||||
this.children.add(childDto);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -0,0 +1,78 @@
|
||||
package com.ruoyi.programManagement.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.programManagement.domain.BAdministrativeDivision;
|
||||
import com.ruoyi.programManagement.entity.request.BAdministrativeDistrictRequest;
|
||||
import com.ruoyi.programManagement.entity.request.BAdministrativeTreeRequest;
|
||||
|
||||
/**
|
||||
* 行政区划Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @since 2023-12-12
|
||||
*/
|
||||
public interface BAdministrativeDivisionMapper {
|
||||
/**
|
||||
* 查询行政区划
|
||||
*
|
||||
* @param id 行政区划主键
|
||||
* @return 行政区划
|
||||
*/
|
||||
public BAdministrativeDivision selectBAdministrativeDivisionById(Long id);
|
||||
|
||||
/**
|
||||
* 查询行政区划列表
|
||||
*
|
||||
* @param bAdministrativeDivision 行政区划
|
||||
* @return 行政区划集合
|
||||
*/
|
||||
List<BAdministrativeDivision> selectBAdministrativeDivisionList(BAdministrativeDivision bAdministrativeDivision);
|
||||
|
||||
/**
|
||||
* 新增行政区划
|
||||
*
|
||||
* @param bAdministrativeDivision 行政区划
|
||||
* @return 结果
|
||||
*/
|
||||
int insertBAdministrativeDivision(BAdministrativeDivision bAdministrativeDivision);
|
||||
|
||||
/**
|
||||
* 修改行政区划
|
||||
*
|
||||
* @param bAdministrativeDivision 行政区划
|
||||
* @return 结果
|
||||
*/
|
||||
int updateBAdministrativeDivision(BAdministrativeDivision bAdministrativeDivision);
|
||||
|
||||
/**
|
||||
* 删除行政区划
|
||||
*
|
||||
* @param id 行政区划主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteBAdministrativeDivisionById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除行政区划
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteBAdministrativeDivisionByIds(Long[] ids);
|
||||
|
||||
|
||||
/**
|
||||
* 行政区划树结构
|
||||
* @return list
|
||||
*/
|
||||
List<BAdministrativeTreeRequest> selectByDistctList();
|
||||
|
||||
|
||||
/**
|
||||
* 行政区划区划树结构
|
||||
*
|
||||
* @return list
|
||||
*/
|
||||
List<BAdministrativeDistrictRequest> selectBycountyList();
|
||||
}
|
@ -0,0 +1,63 @@
|
||||
package com.ruoyi.programManagement.mapper;
|
||||
|
||||
import com.ruoyi.programManagement.entity.BEnterpriseNew;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 企业新表Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @since 2023-12-12
|
||||
*/
|
||||
public interface BEnterpriseNewMapper {
|
||||
/**
|
||||
* 查询企业新表
|
||||
*
|
||||
* @param id 企业新表主键
|
||||
* @return 企业新表
|
||||
*/
|
||||
public BEnterpriseNew selectBEnterpriseNewById(Long id);
|
||||
|
||||
/**
|
||||
* 查询企业新表列表
|
||||
*
|
||||
* @param bEnterpriseNew 企业新表
|
||||
* @return 企业新表集合
|
||||
*/
|
||||
List<BEnterpriseNew> selectBEnterpriseNewList(BEnterpriseNew bEnterpriseNew);
|
||||
|
||||
/**
|
||||
* 新增企业新表
|
||||
*
|
||||
* @param bEnterpriseNew 企业新表
|
||||
* @return 结果
|
||||
*/
|
||||
int insertBEnterpriseNew(BEnterpriseNew bEnterpriseNew);
|
||||
|
||||
/**
|
||||
* 修改企业新表
|
||||
*
|
||||
* @param bEnterpriseNew 企业新表
|
||||
* @return 结果
|
||||
*/
|
||||
int updateBEnterpriseNew(BEnterpriseNew bEnterpriseNew);
|
||||
|
||||
/**
|
||||
* 删除企业新表
|
||||
*
|
||||
* @param id 企业新表主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteBEnterpriseNewById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除企业新表
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteBEnterpriseNewByIds(Long[] ids);
|
||||
}
|
@ -0,0 +1,79 @@
|
||||
package com.ruoyi.programManagement.service;
|
||||
|
||||
import com.ruoyi.programManagement.domain.BAdministrativeDivision;
|
||||
import com.ruoyi.programManagement.entity.request.BAdministrativeDistrictRequest;
|
||||
import com.ruoyi.programManagement.entity.request.BAdministrativeTreeRequest;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 行政区划Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @since 2023-12-12
|
||||
*/
|
||||
public interface IBAdministrativeDivisionService {
|
||||
/**
|
||||
* 查询行政区划
|
||||
*
|
||||
* @param id 行政区划主键
|
||||
* @return 行政区划
|
||||
*/
|
||||
public BAdministrativeDivision selectBAdministrativeDivisionById(Long id);
|
||||
|
||||
/**
|
||||
* 查询行政区划列表
|
||||
*
|
||||
* @param bAdministrativeDivision 行政区划
|
||||
* @return 行政区划集合
|
||||
*/
|
||||
List<BAdministrativeDivision> selectBAdministrativeDivisionList(BAdministrativeDivision bAdministrativeDivision);
|
||||
|
||||
/**
|
||||
* 新增行政区划
|
||||
*
|
||||
* @param bAdministrativeDivision 行政区划
|
||||
* @return 结果
|
||||
*/
|
||||
int insertBAdministrativeDivision(BAdministrativeDivision bAdministrativeDivision);
|
||||
|
||||
/**
|
||||
* 修改行政区划
|
||||
*
|
||||
* @param bAdministrativeDivision 行政区划
|
||||
* @return 结果
|
||||
*/
|
||||
int updateBAdministrativeDivision(BAdministrativeDivision bAdministrativeDivision);
|
||||
|
||||
/**
|
||||
* 批量删除行政区划
|
||||
*
|
||||
* @param ids 需要删除的行政区划主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteBAdministrativeDivisionByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除行政区划信息
|
||||
*
|
||||
* @param id 行政区划主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteBAdministrativeDivisionById(Long id);
|
||||
|
||||
/**
|
||||
* 行政区划乡镇树结构
|
||||
*
|
||||
* @return list
|
||||
*/
|
||||
List<BAdministrativeTreeRequest> selectByDistctList();
|
||||
|
||||
|
||||
/**
|
||||
* 行政区划区划树结构
|
||||
*
|
||||
* @return list
|
||||
*/
|
||||
List<BAdministrativeDistrictRequest> selectBycountyList();
|
||||
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
package com.ruoyi.programManagement.service;
|
||||
|
||||
import com.ruoyi.programManagement.entity.BEnterpriseNew;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 企业新表Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @since 2023-12-12
|
||||
*/
|
||||
public interface IBEnterpriseNewService {
|
||||
/**
|
||||
* 查询企业新表
|
||||
*
|
||||
* @param id 企业新表主键
|
||||
* @return 企业新表
|
||||
*/
|
||||
public BEnterpriseNew selectBEnterpriseNewById(Long id);
|
||||
|
||||
/**
|
||||
* 查询企业新表列表
|
||||
*
|
||||
* @param bEnterpriseNew 企业新表
|
||||
* @return 企业新表集合
|
||||
*/
|
||||
List<BEnterpriseNew> selectBEnterpriseNewList(BEnterpriseNew bEnterpriseNew);
|
||||
|
||||
/**
|
||||
* 新增企业新表
|
||||
*
|
||||
* @param bEnterpriseNew 企业新表
|
||||
* @return 结果
|
||||
*/
|
||||
int insertBEnterpriseNew(BEnterpriseNew bEnterpriseNew);
|
||||
|
||||
/**
|
||||
* 修改企业新表
|
||||
*
|
||||
* @param bEnterpriseNew 企业新表
|
||||
* @return 结果
|
||||
*/
|
||||
int updateBEnterpriseNew(BEnterpriseNew bEnterpriseNew);
|
||||
|
||||
/**
|
||||
* 批量删除企业新表
|
||||
*
|
||||
* @param ids 需要删除的企业新表主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteBEnterpriseNewByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除企业新表信息
|
||||
*
|
||||
* @param id 企业新表主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteBEnterpriseNewById(Long id);
|
||||
}
|
@ -0,0 +1,99 @@
|
||||
package com.ruoyi.programManagement.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.programManagement.entity.request.BAdministrativeDistrictRequest;
|
||||
import com.ruoyi.programManagement.entity.request.BAdministrativeTreeRequest;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.programManagement.mapper.BAdministrativeDivisionMapper;
|
||||
import com.ruoyi.programManagement.domain.BAdministrativeDivision;
|
||||
import com.ruoyi.programManagement.service.IBAdministrativeDivisionService;
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 行政区划Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @since 2023-12-12
|
||||
*/
|
||||
@Service
|
||||
public class BAdministrativeDivisionServiceImpl implements IBAdministrativeDivisionService {
|
||||
@Resource
|
||||
private BAdministrativeDivisionMapper bAdministrativeDivisionMapper;
|
||||
|
||||
/**
|
||||
* 查询行政区划
|
||||
*
|
||||
* @param id 行政区划主键
|
||||
* @return 行政区划
|
||||
*/
|
||||
@Override
|
||||
public BAdministrativeDivision selectBAdministrativeDivisionById(Long id) {
|
||||
return bAdministrativeDivisionMapper.selectBAdministrativeDivisionById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询行政区划列表
|
||||
*
|
||||
* @param bAdministrativeDivision 行政区划
|
||||
* @return 行政区划
|
||||
*/
|
||||
@Override
|
||||
public List<BAdministrativeDivision> selectBAdministrativeDivisionList(BAdministrativeDivision bAdministrativeDivision) {
|
||||
return bAdministrativeDivisionMapper.selectBAdministrativeDivisionList(bAdministrativeDivision);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增行政区划
|
||||
*
|
||||
* @param bAdministrativeDivision 行政区划
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertBAdministrativeDivision(BAdministrativeDivision bAdministrativeDivision) {
|
||||
return bAdministrativeDivisionMapper.insertBAdministrativeDivision(bAdministrativeDivision);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改行政区划
|
||||
*
|
||||
* @param bAdministrativeDivision 行政区划
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateBAdministrativeDivision(BAdministrativeDivision bAdministrativeDivision) {
|
||||
return bAdministrativeDivisionMapper.updateBAdministrativeDivision(bAdministrativeDivision);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除行政区划
|
||||
*
|
||||
* @param ids 需要删除的行政区划主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBAdministrativeDivisionByIds(Long[] ids) {
|
||||
return bAdministrativeDivisionMapper.deleteBAdministrativeDivisionByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除行政区划信息
|
||||
*
|
||||
* @param id 行政区划主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBAdministrativeDivisionById(Long id) {
|
||||
return bAdministrativeDivisionMapper.deleteBAdministrativeDivisionById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BAdministrativeTreeRequest> selectByDistctList() {
|
||||
return bAdministrativeDivisionMapper.selectByDistctList();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BAdministrativeDistrictRequest> selectBycountyList() {
|
||||
return bAdministrativeDivisionMapper.selectBycountyList();
|
||||
}
|
||||
}
|
@ -0,0 +1,90 @@
|
||||
package com.ruoyi.programManagement.service.impl;
|
||||
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.programManagement.entity.BEnterpriseNew;
|
||||
import com.ruoyi.programManagement.mapper.BEnterpriseNewMapper;
|
||||
import com.ruoyi.programManagement.service.IBEnterpriseNewService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 企业新表Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @since 2023-12-12
|
||||
*/
|
||||
@Service
|
||||
public class BEnterpriseNewServiceImpl implements IBEnterpriseNewService {
|
||||
@Resource
|
||||
private BEnterpriseNewMapper bEnterpriseNewMapper;
|
||||
|
||||
/**
|
||||
* 查询企业新表
|
||||
*
|
||||
* @param id 企业新表主键
|
||||
* @return 企业新表
|
||||
*/
|
||||
@Override
|
||||
public BEnterpriseNew selectBEnterpriseNewById(Long id) {
|
||||
return bEnterpriseNewMapper.selectBEnterpriseNewById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询企业新表列表
|
||||
*
|
||||
* @param bEnterpriseNew 企业新表
|
||||
* @return 企业新表
|
||||
*/
|
||||
@Override
|
||||
public List<BEnterpriseNew> selectBEnterpriseNewList(BEnterpriseNew bEnterpriseNew) {
|
||||
return bEnterpriseNewMapper.selectBEnterpriseNewList(bEnterpriseNew);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增企业新表
|
||||
*
|
||||
* @param bEnterpriseNew 企业新表
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertBEnterpriseNew(BEnterpriseNew bEnterpriseNew) {
|
||||
bEnterpriseNew.setCreateTime(DateUtils.getNowDate());
|
||||
return bEnterpriseNewMapper.insertBEnterpriseNew(bEnterpriseNew);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改企业新表
|
||||
*
|
||||
* @param bEnterpriseNew 企业新表
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateBEnterpriseNew(BEnterpriseNew bEnterpriseNew) {
|
||||
bEnterpriseNew.setUpdateTime(DateUtils.getNowDate());
|
||||
return bEnterpriseNewMapper.updateBEnterpriseNew(bEnterpriseNew);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除企业新表
|
||||
*
|
||||
* @param ids 需要删除的企业新表主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBEnterpriseNewByIds(Long[] ids) {
|
||||
return bEnterpriseNewMapper.deleteBEnterpriseNewByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除企业新表信息
|
||||
*
|
||||
* @param id 企业新表主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBEnterpriseNewById(Long id) {
|
||||
return bEnterpriseNewMapper.deleteBEnterpriseNewById(id);
|
||||
}
|
||||
}
|
@ -1,221 +1,305 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.system.mapper.SysUserMapper">
|
||||
|
||||
<resultMap type="SysUser" id="SysUserResult">
|
||||
<id property="userId" column="user_id" />
|
||||
<result property="deptId" column="dept_id" />
|
||||
<result property="userName" column="user_name" />
|
||||
<result property="nickName" column="nick_name" />
|
||||
<result property="email" column="email" />
|
||||
<result property="phonenumber" column="phonenumber" />
|
||||
<result property="sex" column="sex" />
|
||||
<result property="avatar" column="avatar" />
|
||||
<result property="password" column="password" />
|
||||
<result property="status" column="status" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="loginIp" column="login_ip" />
|
||||
<result property="loginDate" column="login_date" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
<association property="dept" column="dept_id" javaType="SysDept" resultMap="deptResult" />
|
||||
<collection property="roles" javaType="java.util.List" resultMap="RoleResult" />
|
||||
<id property="userId" column="user_id"/>
|
||||
<result property="deptId" column="dept_id"/>
|
||||
<result property="userName" column="user_name"/>
|
||||
<result property="nickName" column="nick_name"/>
|
||||
<result property="email" column="email"/>
|
||||
<result property="phonenumber" column="phonenumber"/>
|
||||
<result property="sex" column="sex"/>
|
||||
<result property="avatar" column="avatar"/>
|
||||
<result property="password" column="password"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="loginIp" column="login_ip"/>
|
||||
<result property="loginDate" column="login_date"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="lawSort" column="law_sort"/>
|
||||
<result property="lawAreas" column="law_areas"/>
|
||||
<result property="lawLevel" column="law_level"/>
|
||||
<result property="permissionDescription" column="permission_description"/>
|
||||
<result property="permissionCode" column="permission_code"/>
|
||||
<association property="dept" column="dept_id" javaType="SysDept" resultMap="deptResult"/>
|
||||
<collection property="roles" javaType="java.util.List" resultMap="RoleResult"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
<resultMap id="deptResult" type="SysDept">
|
||||
<id property="deptId" column="dept_id" />
|
||||
<result property="parentId" column="parent_id" />
|
||||
<result property="deptName" column="dept_name" />
|
||||
<result property="ancestors" column="ancestors" />
|
||||
<result property="orderNum" column="order_num" />
|
||||
<result property="leader" column="leader" />
|
||||
<result property="status" column="dept_status" />
|
||||
<id property="deptId" column="dept_id"/>
|
||||
<result property="parentId" column="parent_id"/>
|
||||
<result property="deptName" column="dept_name"/>
|
||||
<result property="ancestors" column="ancestors"/>
|
||||
<result property="orderNum" column="order_num"/>
|
||||
<result property="leader" column="leader"/>
|
||||
<result property="status" column="dept_status"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
<resultMap id="RoleResult" type="SysRole">
|
||||
<id property="roleId" column="role_id" />
|
||||
<result property="roleName" column="role_name" />
|
||||
<result property="roleKey" column="role_key" />
|
||||
<result property="roleSort" column="role_sort" />
|
||||
<result property="dataScope" column="data_scope" />
|
||||
<result property="status" column="role_status" />
|
||||
<id property="roleId" column="role_id"/>
|
||||
<result property="roleName" column="role_name"/>
|
||||
<result property="roleKey" column="role_key"/>
|
||||
<result property="roleSort" column="role_sort"/>
|
||||
<result property="dataScope" column="data_scope"/>
|
||||
<result property="status" column="role_status"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectUserVo">
|
||||
select u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.avatar, u.phonenumber, u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark,
|
||||
d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.status as dept_status,
|
||||
r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status
|
||||
|
||||
<sql id="selectUserVo">
|
||||
select u.user_id,
|
||||
u.dept_id,
|
||||
u.user_name,
|
||||
u.nick_name,
|
||||
u.email,
|
||||
u.avatar,
|
||||
u.phonenumber,
|
||||
u.password,
|
||||
u.sex,
|
||||
u.status,
|
||||
u.del_flag,
|
||||
u.login_ip,
|
||||
u.login_date,
|
||||
u.create_by,
|
||||
u.create_time,
|
||||
u.remark,
|
||||
u.law_sort,
|
||||
u.law_areas,
|
||||
u.law_level,
|
||||
u.permission_description,
|
||||
u.permission_code,
|
||||
d.dept_id,
|
||||
d.parent_id,
|
||||
d.ancestors,
|
||||
d.dept_name,
|
||||
d.order_num,
|
||||
d.leader,
|
||||
d.status as dept_status,
|
||||
r.role_id,
|
||||
r.role_name,
|
||||
r.role_key,
|
||||
r.role_sort,
|
||||
r.data_scope,
|
||||
r.status as role_status
|
||||
from sys_user u
|
||||
left join sys_dept d on u.dept_id = d.dept_id
|
||||
left join sys_user_role ur on u.user_id = ur.user_id
|
||||
left join sys_role r on r.role_id = ur.role_id
|
||||
left join sys_dept d on u.dept_id = d.dept_id
|
||||
left join sys_user_role ur on u.user_id = ur.user_id
|
||||
left join sys_role r on r.role_id = ur.role_id
|
||||
</sql>
|
||||
|
||||
|
||||
<select id="selectUserList" parameterType="SysUser" resultMap="SysUserResult">
|
||||
select u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, d.dept_name, d.leader from sys_user u
|
||||
left join sys_dept d on u.dept_id = d.dept_id
|
||||
where u.del_flag = '0'
|
||||
<if test="userId != null and userId != 0">
|
||||
AND u.user_id = #{userId}
|
||||
</if>
|
||||
<if test="userName != null and userName != ''">
|
||||
AND u.user_name like concat('%', #{userName}, '%')
|
||||
</if>
|
||||
<if test="status != null and status != ''">
|
||||
AND u.status = #{status}
|
||||
</if>
|
||||
<if test="phonenumber != null and phonenumber != ''">
|
||||
AND u.phonenumber like concat('%', #{phonenumber}, '%')
|
||||
</if>
|
||||
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
|
||||
AND date_format(u.create_time,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
|
||||
AND date_format(u.create_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="deptId != null and deptId != 0">
|
||||
AND (u.dept_id = #{deptId} OR u.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE find_in_set(#{deptId}, ancestors) ))
|
||||
</if>
|
||||
<!-- 数据范围过滤 -->
|
||||
${params.dataScope}
|
||||
</select>
|
||||
|
||||
<select id="selectAllocatedList" parameterType="SysUser" resultMap="SysUserResult">
|
||||
select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time
|
||||
from sys_user u
|
||||
left join sys_dept d on u.dept_id = d.dept_id
|
||||
left join sys_user_role ur on u.user_id = ur.user_id
|
||||
left join sys_role r on r.role_id = ur.role_id
|
||||
where u.del_flag = '0' and r.role_id = #{roleId}
|
||||
<if test="userName != null and userName != ''">
|
||||
AND u.user_name like concat('%', #{userName}, '%')
|
||||
</if>
|
||||
<if test="phonenumber != null and phonenumber != ''">
|
||||
AND u.phonenumber like concat('%', #{phonenumber}, '%')
|
||||
</if>
|
||||
<!-- 数据范围过滤 -->
|
||||
${params.dataScope}
|
||||
</select>
|
||||
|
||||
<select id="selectUnallocatedList" parameterType="SysUser" resultMap="SysUserResult">
|
||||
select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time
|
||||
from sys_user u
|
||||
left join sys_dept d on u.dept_id = d.dept_id
|
||||
left join sys_user_role ur on u.user_id = ur.user_id
|
||||
left join sys_role r on r.role_id = ur.role_id
|
||||
where u.del_flag = '0' and (r.role_id != #{roleId} or r.role_id IS NULL)
|
||||
and u.user_id not in (select u.user_id from sys_user u inner join sys_user_role ur on u.user_id = ur.user_id and ur.role_id = #{roleId})
|
||||
<if test="userName != null and userName != ''">
|
||||
AND u.user_name like concat('%', #{userName}, '%')
|
||||
</if>
|
||||
<if test="phonenumber != null and phonenumber != ''">
|
||||
AND u.phonenumber like concat('%', #{phonenumber}, '%')
|
||||
</if>
|
||||
<!-- 数据范围过滤 -->
|
||||
${params.dataScope}
|
||||
</select>
|
||||
|
||||
<select id="selectUserByUserName" parameterType="String" resultMap="SysUserResult">
|
||||
<include refid="selectUserVo"/>
|
||||
where u.user_name = #{userName} and u.del_flag = '0'
|
||||
</select>
|
||||
|
||||
<select id="selectUserById" parameterType="Long" resultMap="SysUserResult">
|
||||
<include refid="selectUserVo"/>
|
||||
where u.user_id = #{userId}
|
||||
</select>
|
||||
|
||||
<select id="checkUserNameUnique" parameterType="String" resultMap="SysUserResult">
|
||||
select user_id, user_name from sys_user where user_name = #{userName} and del_flag = '0' limit 1
|
||||
</select>
|
||||
|
||||
<select id="checkPhoneUnique" parameterType="String" resultMap="SysUserResult">
|
||||
select user_id, phonenumber from sys_user where phonenumber = #{phonenumber} and del_flag = '0' limit 1
|
||||
</select>
|
||||
|
||||
<select id="checkEmailUnique" parameterType="String" resultMap="SysUserResult">
|
||||
select user_id, email from sys_user where email = #{email} and del_flag = '0' limit 1
|
||||
</select>
|
||||
|
||||
<insert id="insertUser" parameterType="SysUser" useGeneratedKeys="true" keyProperty="userId">
|
||||
insert into sys_user(
|
||||
<if test="userId != null and userId != 0">user_id,</if>
|
||||
<if test="deptId != null and deptId != 0">dept_id,</if>
|
||||
<if test="userName != null and userName != ''">user_name,</if>
|
||||
<if test="nickName != null and nickName != ''">nick_name,</if>
|
||||
<if test="email != null and email != ''">email,</if>
|
||||
<if test="avatar != null and avatar != ''">avatar,</if>
|
||||
<if test="phonenumber != null and phonenumber != ''">phonenumber,</if>
|
||||
<if test="sex != null and sex != ''">sex,</if>
|
||||
<if test="password != null and password != ''">password,</if>
|
||||
<if test="status != null and status != ''">status,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
<if test="remark != null and remark != ''">remark,</if>
|
||||
create_time
|
||||
)values(
|
||||
<if test="userId != null and userId != ''">#{userId},</if>
|
||||
<if test="deptId != null and deptId != ''">#{deptId},</if>
|
||||
<if test="userName != null and userName != ''">#{userName},</if>
|
||||
<if test="nickName != null and nickName != ''">#{nickName},</if>
|
||||
<if test="email != null and email != ''">#{email},</if>
|
||||
<if test="avatar != null and avatar != ''">#{avatar},</if>
|
||||
<if test="phonenumber != null and phonenumber != ''">#{phonenumber},</if>
|
||||
<if test="sex != null and sex != ''">#{sex},</if>
|
||||
<if test="password != null and password != ''">#{password},</if>
|
||||
<if test="status != null and status != ''">#{status},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
<if test="remark != null and remark != ''">#{remark},</if>
|
||||
sysdate()
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="updateUser" parameterType="SysUser">
|
||||
update sys_user
|
||||
<set>
|
||||
<if test="deptId != null and deptId != 0">dept_id = #{deptId},</if>
|
||||
<if test="userName != null and userName != ''">user_name = #{userName},</if>
|
||||
<if test="nickName != null and nickName != ''">nick_name = #{nickName},</if>
|
||||
<if test="email != null ">email = #{email},</if>
|
||||
<if test="phonenumber != null ">phonenumber = #{phonenumber},</if>
|
||||
<if test="sex != null and sex != ''">sex = #{sex},</if>
|
||||
<if test="avatar != null and avatar != ''">avatar = #{avatar},</if>
|
||||
<if test="password != null and password != ''">password = #{password},</if>
|
||||
<if test="status != null and status != ''">status = #{status},</if>
|
||||
<if test="loginIp != null and loginIp != ''">login_ip = #{loginIp},</if>
|
||||
<if test="loginDate != null">login_date = #{loginDate},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
update_time = sysdate()
|
||||
</set>
|
||||
where user_id = #{userId}
|
||||
</update>
|
||||
|
||||
<update id="updateUserStatus" parameterType="SysUser">
|
||||
update sys_user set status = #{status} where user_id = #{userId}
|
||||
</update>
|
||||
|
||||
<update id="updateUserAvatar" parameterType="SysUser">
|
||||
update sys_user set avatar = #{avatar} where user_name = #{userName}
|
||||
</update>
|
||||
|
||||
<update id="resetUserPwd" parameterType="SysUser">
|
||||
update sys_user set password = #{password} where user_name = #{userName}
|
||||
</update>
|
||||
|
||||
<delete id="deleteUserById" parameterType="Long">
|
||||
update sys_user set del_flag = '2' where user_id = #{userId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteUserByIds" parameterType="Long">
|
||||
update sys_user set del_flag = '2' where user_id in
|
||||
<foreach collection="array" item="userId" open="(" separator="," close=")">
|
||||
#{userId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
select u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.sex, u.status,
|
||||
u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark,u.law_sort,
|
||||
u.law_areas,
|
||||
u.law_level,
|
||||
u.permission_description,
|
||||
u.permission_code, d.dept_name, d.leader from sys_user
|
||||
u
|
||||
left join sys_dept d on u.dept_id = d.dept_id
|
||||
where u.del_flag = '0'
|
||||
<if test="userId != null and userId != 0">
|
||||
AND u.user_id = #{userId}
|
||||
</if>
|
||||
<if test="userName != null and userName != ''">
|
||||
AND u.user_name like concat('%', #{userName}, '%')
|
||||
</if>
|
||||
<if test="status != null and status != ''">
|
||||
AND u.status = #{status}
|
||||
</if>
|
||||
<if test="phonenumber != null and phonenumber != ''">
|
||||
AND u.phonenumber like concat('%', #{phonenumber}, '%')
|
||||
</if>
|
||||
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
|
||||
AND date_format(u.create_time,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
|
||||
AND date_format(u.create_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="deptId != null and deptId != 0">
|
||||
AND (u.dept_id = #{deptId} OR u.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE find_in_set(#{deptId},
|
||||
ancestors) ))
|
||||
</if>
|
||||
<!-- 数据范围过滤 -->
|
||||
${params.dataScope}
|
||||
</select>
|
||||
|
||||
<select id="selectAllocatedList" parameterType="SysUser" resultMap="SysUserResult">
|
||||
select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time,u.law_sort,
|
||||
u.law_areas,
|
||||
u.law_level,
|
||||
u.permission_description,
|
||||
u.permission_code
|
||||
from sys_user u
|
||||
left join sys_dept d on u.dept_id = d.dept_id
|
||||
left join sys_user_role ur on u.user_id = ur.user_id
|
||||
left join sys_role r on r.role_id = ur.role_id
|
||||
where u.del_flag = '0' and r.role_id = #{roleId}
|
||||
<if test="userName != null and userName != ''">
|
||||
AND u.user_name like concat('%', #{userName}, '%')
|
||||
</if>
|
||||
<if test="phonenumber != null and phonenumber != ''">
|
||||
AND u.phonenumber like concat('%', #{phonenumber}, '%')
|
||||
</if>
|
||||
<!-- 数据范围过滤 -->
|
||||
${params.dataScope}
|
||||
</select>
|
||||
|
||||
<select id="selectUnallocatedList" parameterType="SysUser" resultMap="SysUserResult">
|
||||
select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time,u.law_sort,
|
||||
u.law_areas,
|
||||
u.law_level,
|
||||
u.permission_description,
|
||||
u.permission_code
|
||||
from sys_user u
|
||||
left join sys_dept d on u.dept_id = d.dept_id
|
||||
left join sys_user_role ur on u.user_id = ur.user_id
|
||||
left join sys_role r on r.role_id = ur.role_id
|
||||
where u.del_flag = '0' and (r.role_id != #{roleId} or r.role_id IS NULL)
|
||||
and u.user_id not in (select u.user_id from sys_user u inner join sys_user_role ur on u.user_id = ur.user_id and
|
||||
ur.role_id = #{roleId})
|
||||
<if test="userName != null and userName != ''">
|
||||
AND u.user_name like concat('%', #{userName}, '%')
|
||||
</if>
|
||||
<if test="phonenumber != null and phonenumber != ''">
|
||||
AND u.phonenumber like concat('%', #{phonenumber}, '%')
|
||||
</if>
|
||||
<!-- 数据范围过滤 -->
|
||||
${params.dataScope}
|
||||
</select>
|
||||
|
||||
<select id="selectUserByUserName" parameterType="String" resultMap="SysUserResult">
|
||||
<include refid="selectUserVo"/>
|
||||
where u.user_name = #{userName} and u.del_flag = '0'
|
||||
</select>
|
||||
|
||||
<select id="selectUserById" parameterType="Long" resultMap="SysUserResult">
|
||||
<include refid="selectUserVo"/>
|
||||
where u.user_id = #{userId}
|
||||
</select>
|
||||
|
||||
<select id="checkUserNameUnique" parameterType="String" resultMap="SysUserResult">
|
||||
select user_id, user_name
|
||||
from sys_user
|
||||
where user_name = #{userName}
|
||||
and del_flag = '0' limit 1
|
||||
</select>
|
||||
|
||||
<select id="checkPhoneUnique" parameterType="String" resultMap="SysUserResult">
|
||||
select user_id, phonenumber
|
||||
from sys_user
|
||||
where phonenumber = #{phonenumber}
|
||||
and del_flag = '0' limit 1
|
||||
</select>
|
||||
|
||||
<select id="checkEmailUnique" parameterType="String" resultMap="SysUserResult">
|
||||
select user_id, email
|
||||
from sys_user
|
||||
where email = #{email}
|
||||
and del_flag = '0' limit 1
|
||||
</select>
|
||||
|
||||
<insert id="insertUser" parameterType="SysUser" useGeneratedKeys="true" keyProperty="userId">
|
||||
insert into sys_user(
|
||||
<if test="userId != null and userId != 0">user_id,</if>
|
||||
<if test="deptId != null and deptId != 0">dept_id,</if>
|
||||
<if test="userName != null and userName != ''">user_name,</if>
|
||||
<if test="nickName != null and nickName != ''">nick_name,</if>
|
||||
<if test="email != null and email != ''">email,</if>
|
||||
<if test="avatar != null and avatar != ''">avatar,</if>
|
||||
<if test="phonenumber != null and phonenumber != ''">phonenumber,</if>
|
||||
<if test="sex != null and sex != ''">sex,</if>
|
||||
<if test="password != null and password != ''">password,</if>
|
||||
<if test="status != null and status != ''">status,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
<if test="remark != null and remark != ''">remark,</if>
|
||||
<if test="lawSort != null and lawSort != ''">law_sort,</if>
|
||||
<if test="lawAreas != null and lawAreas != ''">law_areas,</if>
|
||||
<if test="lawLevel != null and lawLevel != ''">law_level,</if>
|
||||
<if test="permissionDescription != null and permissionDescription != ''">permission_description,</if>
|
||||
<if test="permissionCode != null and permissionCode != ''">permission_code,</if>
|
||||
create_time
|
||||
)values(
|
||||
<if test="userId != null and userId != ''">#{userId},</if>
|
||||
<if test="deptId != null and deptId != ''">#{deptId},</if>
|
||||
<if test="userName != null and userName != ''">#{userName},</if>
|
||||
<if test="nickName != null and nickName != ''">#{nickName},</if>
|
||||
<if test="email != null and email != ''">#{email},</if>
|
||||
<if test="avatar != null and avatar != ''">#{avatar},</if>
|
||||
<if test="phonenumber != null and phonenumber != ''">#{phonenumber},</if>
|
||||
<if test="sex != null and sex != ''">#{sex},</if>
|
||||
<if test="password != null and password != ''">#{password},</if>
|
||||
<if test="status != null and status != ''">#{status},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
<if test="remark != null and remark != ''">#{remark},</if>
|
||||
<if test="lawSort != null and lawSort != ''">#{lawSort},</if>
|
||||
<if test="lawAreas != null and lawAreas != ''">#{lawAreas},</if>
|
||||
<if test="lawLevel != null and lawLevel != ''">#{lawLevel},</if>
|
||||
<if test="permissionDescription != null and permissionDescription != ''">#{permissionDescription},</if>
|
||||
<if test="permissionCode != null and permissionCode != ''">#{permissionCode},</if>
|
||||
sysdate()
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="updateUser" parameterType="SysUser">
|
||||
update sys_user
|
||||
<set>
|
||||
<if test="deptId != null and deptId != 0">dept_id = #{deptId},</if>
|
||||
<if test="userName != null and userName != ''">user_name = #{userName},</if>
|
||||
<if test="nickName != null and nickName != ''">nick_name = #{nickName},</if>
|
||||
<if test="email != null ">email = #{email},</if>
|
||||
<if test="phonenumber != null ">phonenumber = #{phonenumber},</if>
|
||||
<if test="sex != null and sex != ''">sex = #{sex},</if>
|
||||
<if test="avatar != null and avatar != ''">avatar = #{avatar},</if>
|
||||
<if test="password != null and password != ''">password = #{password},</if>
|
||||
<if test="status != null and status != ''">status = #{status},</if>
|
||||
<if test="loginIp != null and loginIp != ''">login_ip = #{loginIp},</if>
|
||||
<if test="loginDate != null">login_date = #{loginDate},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="lawSort != null">law_sort = #{lawSort},</if>
|
||||
<if test="lawAreas != null">law_areas = #{lawAreas},</if>
|
||||
<if test="lawLevel != null">law_level = #{lawLevel},</if>
|
||||
<if test="permissionDescription != null">permission_description = #{permissionDescription},</if>
|
||||
<if test="permissionCode != null">permission_code = #{permissionCode},</if>
|
||||
update_time = sysdate()
|
||||
</set>
|
||||
where user_id = #{userId}
|
||||
</update>
|
||||
|
||||
<update id="updateUserStatus" parameterType="SysUser">
|
||||
update sys_user
|
||||
set status = #{status}
|
||||
where user_id = #{userId}
|
||||
</update>
|
||||
|
||||
<update id="updateUserAvatar" parameterType="SysUser">
|
||||
update sys_user
|
||||
set avatar = #{avatar}
|
||||
where user_name = #{userName}
|
||||
</update>
|
||||
|
||||
<update id="resetUserPwd" parameterType="SysUser">
|
||||
update sys_user
|
||||
set password = #{password}
|
||||
where user_name = #{userName}
|
||||
</update>
|
||||
|
||||
<delete id="deleteUserById" parameterType="Long">
|
||||
update sys_user
|
||||
set del_flag = '2'
|
||||
where user_id = #{userId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteUserByIds" parameterType="Long">
|
||||
update sys_user set del_flag = '2' where user_id in
|
||||
<foreach collection="array" item="userId" open="(" separator="," close=")">
|
||||
#{userId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
@ -0,0 +1,92 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.programManagement.mapper.BAdministrativeDivisionMapper">
|
||||
|
||||
<resultMap type="BAdministrativeDivision" id="BAdministrativeDivisionResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="districtCode" column="district_code"/>
|
||||
<result property="district" column="district"/>
|
||||
<result property="countyCode" column="county_code"/>
|
||||
<result property="county" column="county"/>
|
||||
<result property="sort" column="sort"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBAdministrativeDivisionVo">
|
||||
select id, district_code, district, county_code, county, sort
|
||||
from b_administrative_division
|
||||
</sql>
|
||||
|
||||
<select id="selectBAdministrativeDivisionList" parameterType="BAdministrativeDivision"
|
||||
resultMap="BAdministrativeDivisionResult">
|
||||
<include refid="selectBAdministrativeDivisionVo"/>
|
||||
<where>
|
||||
<if test="districtCode != null and districtCode != ''">and district_code = #{districtCode}</if>
|
||||
<if test="district != null and district != ''">and district = #{district}</if>
|
||||
<if test="countyCode != null and countyCode != ''">and county_code = #{countyCode}</if>
|
||||
<if test="county != null and county != ''">and county = #{county}</if>
|
||||
<if test="sort != null ">and sort = #{sort}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBAdministrativeDivisionById" parameterType="Long" resultMap="BAdministrativeDivisionResult">
|
||||
<include refid="selectBAdministrativeDivisionVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
<select id="selectByDistctList"
|
||||
resultType="com.ruoyi.programManagement.entity.request.BAdministrativeTreeRequest">
|
||||
select county_code as countyCode, county, sort
|
||||
from b_administrative_division
|
||||
</select>
|
||||
<select id="selectBycountyList"
|
||||
resultType="com.ruoyi.programManagement.entity.request.BAdministrativeDistrictRequest">
|
||||
select district_code as districtCode,district
|
||||
from b_administrative_division
|
||||
group by districtCode,district
|
||||
</select>
|
||||
|
||||
<insert id="insertBAdministrativeDivision" parameterType="BAdministrativeDivision" useGeneratedKeys="true"
|
||||
keyProperty="id">
|
||||
insert into b_administrative_division
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="districtCode != null">district_code,</if>
|
||||
<if test="district != null">district,</if>
|
||||
<if test="countyCode != null">county_code,</if>
|
||||
<if test="county != null">county,</if>
|
||||
<if test="sort != null">sort,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="districtCode != null">#{districtCode},</if>
|
||||
<if test="district != null">#{district},</if>
|
||||
<if test="countyCode != null">#{countyCode},</if>
|
||||
<if test="county != null">#{county},</if>
|
||||
<if test="sort != null">#{sort},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateBAdministrativeDivision" parameterType="BAdministrativeDivision">
|
||||
update b_administrative_division
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="districtCode != null">district_code = #{districtCode},</if>
|
||||
<if test="district != null">district = #{district},</if>
|
||||
<if test="countyCode != null">county_code = #{countyCode},</if>
|
||||
<if test="county != null">county = #{county},</if>
|
||||
<if test="sort != null">sort = #{sort},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBAdministrativeDivisionById" parameterType="Long">
|
||||
delete
|
||||
from b_administrative_division
|
||||
where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBAdministrativeDivisionByIds" parameterType="String">
|
||||
delete from b_administrative_division where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
@ -0,0 +1,126 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.programManagement.mapper.BEnterpriseNewMapper">
|
||||
|
||||
<resultMap type="BEnterpriseNew" id="BEnterpriseNewResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="enterpriseId" column="enterprise_id" />
|
||||
<result property="enterpriseName" column="enterprise_name" />
|
||||
<result property="district" column="district" />
|
||||
<result property="supervisionLarge" column="SUPERVISION_LARGE" />
|
||||
<result property="riskLevel" column="RISK_LEVEL" />
|
||||
<result property="standLevel" column="STAND_LEVEL" />
|
||||
<result property="examineEndTime" column="EXAMINE_END_TIME" />
|
||||
<result property="createId" column="create_id" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateId" column="update_id" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="deptId" column="dept_id" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBEnterpriseNewVo">
|
||||
select id, enterprise_id, enterprise_name, district, SUPERVISION_LARGE, RISK_LEVEL, STAND_LEVEL, EXAMINE_END_TIME, create_id, create_by, create_time, update_id, update_by, update_time, remark, user_id, dept_id from b_enterprise_new
|
||||
</sql>
|
||||
|
||||
<select id="selectBEnterpriseNewList" parameterType="BEnterpriseNew" resultMap="BEnterpriseNewResult">
|
||||
<include refid="selectBEnterpriseNewVo"/>
|
||||
<where>
|
||||
<if test="enterpriseId != null and enterpriseId != ''"> and enterprise_id = #{enterpriseId}</if>
|
||||
<if test="enterpriseName != null and enterpriseName != ''"> and enterprise_name like concat('%', #{enterpriseName}, '%')</if>
|
||||
<if test="district != null and district != ''"> and district = #{district}</if>
|
||||
<if test="supervisionLarge != null and supervisionLarge != ''"> and SUPERVISION_LARGE = #{supervisionLarge}</if>
|
||||
<if test="riskLevel != null and riskLevel != ''"> and RISK_LEVEL = #{riskLevel}</if>
|
||||
<if test="standLevel != null and standLevel != ''"> and STAND_LEVEL = #{standLevel}</if>
|
||||
<if test="examineEndTime != null "> and EXAMINE_END_TIME = #{examineEndTime}</if>
|
||||
<if test="createId != null "> and create_id = #{createId}</if>
|
||||
<if test="updateId != null "> and update_id = #{updateId}</if>
|
||||
<if test="userId != null "> and user_id = #{userId}</if>
|
||||
<if test="deptId != null "> and dept_id = #{deptId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBEnterpriseNewById" parameterType="Long" resultMap="BEnterpriseNewResult">
|
||||
<include refid="selectBEnterpriseNewVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertBEnterpriseNew" parameterType="BEnterpriseNew" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into b_enterprise_new
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="enterpriseId != null">enterprise_id,</if>
|
||||
<if test="enterpriseName != null">enterprise_name,</if>
|
||||
<if test="district != null">district,</if>
|
||||
<if test="supervisionLarge != null">SUPERVISION_LARGE,</if>
|
||||
<if test="riskLevel != null">RISK_LEVEL,</if>
|
||||
<if test="standLevel != null">STAND_LEVEL,</if>
|
||||
<if test="examineEndTime != null">EXAMINE_END_TIME,</if>
|
||||
<if test="createId != null">create_id,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateId != null">update_id,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="deptId != null">dept_id,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="enterpriseId != null">#{enterpriseId},</if>
|
||||
<if test="enterpriseName != null">#{enterpriseName},</if>
|
||||
<if test="district != null">#{district},</if>
|
||||
<if test="supervisionLarge != null">#{supervisionLarge},</if>
|
||||
<if test="riskLevel != null">#{riskLevel},</if>
|
||||
<if test="standLevel != null">#{standLevel},</if>
|
||||
<if test="examineEndTime != null">#{examineEndTime},</if>
|
||||
<if test="createId != null">#{createId},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateId != null">#{updateId},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="deptId != null">#{deptId},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateBEnterpriseNew" parameterType="BEnterpriseNew">
|
||||
update b_enterprise_new
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="enterpriseId != null">enterprise_id = #{enterpriseId},</if>
|
||||
<if test="enterpriseName != null">enterprise_name = #{enterpriseName},</if>
|
||||
<if test="district != null">district = #{district},</if>
|
||||
<if test="supervisionLarge != null">SUPERVISION_LARGE = #{supervisionLarge},</if>
|
||||
<if test="riskLevel != null">RISK_LEVEL = #{riskLevel},</if>
|
||||
<if test="standLevel != null">STAND_LEVEL = #{standLevel},</if>
|
||||
<if test="examineEndTime != null">EXAMINE_END_TIME = #{examineEndTime},</if>
|
||||
<if test="createId != null">create_id = #{createId},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateId != null">update_id = #{updateId},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="userId != null">user_id = #{userId},</if>
|
||||
<if test="deptId != null">dept_id = #{deptId},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBEnterpriseNewById" parameterType="Long">
|
||||
delete from b_enterprise_new where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBEnterpriseNewByIds" parameterType="String">
|
||||
delete from b_enterprise_new where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
Loading…
Reference in new issue