forked from xxhjsb/wit-park-backend
一个小问题
parent
afc05a575f
commit
60351f2096
|
@ -78,6 +78,9 @@
|
|||
<orderEntry type="library" name="Maven: com.github.virtuald:curvesapi:1.06" level="project" />
|
||||
<orderEntry type="library" name="Maven: javax.servlet:javax.servlet-api:4.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.swagger:swagger-annotations:1.6.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.projectlombok:lombok:1.18.12" level="project" />
|
||||
<orderEntry type="library" name="Maven: cn.hutool:hutool-all:5.4.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.bouncycastle:bcprov-jdk15to18:1.69" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.hbt:hbt-common-redis:3.6.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-data-redis:2.7.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.7.3" level="project" />
|
||||
|
|
|
@ -223,5 +223,7 @@
|
|||
<orderEntry type="library" name="Maven: org.apache.commons:commons-compress:1.19" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.virtuald:curvesapi:1.06" level="project" />
|
||||
<orderEntry type="library" name="Maven: javax.servlet:javax.servlet-api:4.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: cn.hutool:hutool-all:5.4.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.bouncycastle:bcprov-jdk15to18:1.69" level="project" />
|
||||
</component>
|
||||
</module>
|
|
@ -21,8 +21,7 @@ import com.hbt.common.core.web.page.TableDataInfo;
|
|||
*/
|
||||
@RestController
|
||||
@RequestMapping("/operation")
|
||||
public class HazardousOperationController extends BaseController
|
||||
{
|
||||
public class HazardousOperationController extends BaseController {
|
||||
@Autowired
|
||||
private IHazardousOperationService hazardousOperationService;
|
||||
|
||||
|
@ -30,8 +29,7 @@ public class HazardousOperationController extends BaseController
|
|||
* 查询危险作业列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public String list()
|
||||
{
|
||||
public String list() {
|
||||
List<HazardousOperation> list = hazardousOperationService.selectHazardousOperationList();
|
||||
TableDataInfo tableDataInfo = getDataTable(list);
|
||||
return JSONObject.toJSONString(tableDataInfo);
|
||||
|
@ -41,8 +39,7 @@ public class HazardousOperationController extends BaseController
|
|||
* 获取危险作业详细信息
|
||||
*/
|
||||
@GetMapping(value = "/getInfo")
|
||||
public String getInfo(int id)
|
||||
{
|
||||
public String getInfo(int id) {
|
||||
AjaxResult ajaxResult = success(hazardousOperationService.selectHazardousOperationById(id));
|
||||
return JSONObject.toJSONString(ajaxResult);
|
||||
}
|
||||
|
@ -51,8 +48,7 @@ public class HazardousOperationController extends BaseController
|
|||
* 新增危险作业
|
||||
*/
|
||||
@GetMapping(value = "/add")
|
||||
public String add(@RequestBody HazardousOperation hazardousOperation)
|
||||
{
|
||||
public String add(@RequestBody HazardousOperation hazardousOperation) {
|
||||
AjaxResult ajaxResult = toAjax(hazardousOperationService.insertHazardousOperation(hazardousOperation));
|
||||
return JSONObject.toJSONString(ajaxResult);
|
||||
}
|
||||
|
@ -61,8 +57,7 @@ public class HazardousOperationController extends BaseController
|
|||
* 修改危险作业
|
||||
*/
|
||||
@GetMapping(value = "/edit")
|
||||
public String edit(@RequestBody HazardousOperation hazardousOperation)
|
||||
{
|
||||
public String edit(@RequestBody HazardousOperation hazardousOperation) {
|
||||
AjaxResult ajaxResult = toAjax(hazardousOperationService.updateHazardousOperation(hazardousOperation));
|
||||
return JSONObject.toJSONString(ajaxResult);
|
||||
}
|
||||
|
@ -71,8 +66,7 @@ public class HazardousOperationController extends BaseController
|
|||
* 删除危险作业
|
||||
*/
|
||||
@GetMapping(value = "/remove")
|
||||
public String remove(int[] ids)
|
||||
{
|
||||
public String remove(int[] ids) {
|
||||
AjaxResult ajaxResult = toAjax(hazardousOperationService.deleteHazardousOperationByIds(ids));
|
||||
return JSONObject.toJSONString(ajaxResult);
|
||||
}
|
||||
|
@ -81,8 +75,7 @@ public class HazardousOperationController extends BaseController
|
|||
* 首页危险作业统计
|
||||
*/
|
||||
@GetMapping(value = "/hazardousOperationStatistics")
|
||||
public String hazardousOperationStatistics()
|
||||
{
|
||||
public String hazardousOperationStatistics() {
|
||||
return hazardousOperationService.hazardousOperationStatistics();
|
||||
}
|
||||
|
||||
|
@ -90,8 +83,7 @@ public class HazardousOperationController extends BaseController
|
|||
* 危险作业统计
|
||||
*/
|
||||
@GetMapping(value = "/hazardousOperationManagement")
|
||||
public String hazardousOperationManagement()
|
||||
{
|
||||
public String hazardousOperationManagement() {
|
||||
return hazardousOperationService.hazardousOperationManagement();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,8 +20,7 @@ import com.hbt.common.core.web.domain.AjaxResult;
|
|||
*/
|
||||
@RestController
|
||||
@RequestMapping("/sources")
|
||||
public class MajorHazardSourcesController extends BaseController
|
||||
{
|
||||
public class MajorHazardSourcesController extends BaseController {
|
||||
@Autowired
|
||||
private IMajorHazardSourcesService majorHazardSourcesService;
|
||||
|
||||
|
@ -29,8 +28,7 @@ public class MajorHazardSourcesController extends BaseController
|
|||
* 查询重大危险源列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public String list(MajorHazardSources majorHazardSources)
|
||||
{
|
||||
public String list(MajorHazardSources majorHazardSources) {
|
||||
List<MajorHazardSources> list = majorHazardSourcesService.selectMajorHazardSourcesList(majorHazardSources);
|
||||
return JSONObject.toJSONString(list);
|
||||
}
|
||||
|
@ -39,8 +37,7 @@ public class MajorHazardSourcesController extends BaseController
|
|||
* 获取重大危险源详细信息
|
||||
*/
|
||||
@GetMapping(value = "/getInfo")
|
||||
public String getInfo(int id)
|
||||
{
|
||||
public String getInfo(int id) {
|
||||
MajorHazardSources majorHazardSources = majorHazardSourcesService.selectMajorHazardSourcesById(id);
|
||||
return JSONObject.toJSONString(majorHazardSources);
|
||||
}
|
||||
|
@ -49,8 +46,7 @@ public class MajorHazardSourcesController extends BaseController
|
|||
* 新增重大危险源
|
||||
*/
|
||||
@GetMapping(value = "/add")
|
||||
public String add(@RequestBody MajorHazardSources majorHazardSources)
|
||||
{
|
||||
public String add(@RequestBody MajorHazardSources majorHazardSources) {
|
||||
AjaxResult ajaxResult = toAjax(majorHazardSourcesService.insertMajorHazardSources(majorHazardSources));
|
||||
return JSONObject.toJSONString(ajaxResult);
|
||||
}
|
||||
|
@ -59,8 +55,7 @@ public class MajorHazardSourcesController extends BaseController
|
|||
* 修改重大危险源
|
||||
*/
|
||||
@GetMapping(value = "/edit")
|
||||
public String edit(@RequestBody MajorHazardSources majorHazardSources)
|
||||
{
|
||||
public String edit(@RequestBody MajorHazardSources majorHazardSources) {
|
||||
AjaxResult ajaxResult = toAjax(majorHazardSourcesService.updateMajorHazardSources(majorHazardSources));
|
||||
return JSONObject.toJSONString(ajaxResult);
|
||||
}
|
||||
|
@ -69,8 +64,7 @@ public class MajorHazardSourcesController extends BaseController
|
|||
* 删除重大危险源
|
||||
*/
|
||||
@GetMapping(value = "/remove")
|
||||
public String remove(int[] ids)
|
||||
{
|
||||
public String remove(int[] ids) {
|
||||
AjaxResult ajaxResult = toAjax(majorHazardSourcesService.deleteMajorHazardSourcesByIds(ids));
|
||||
return JSONObject.toJSONString(ajaxResult);
|
||||
}
|
||||
|
@ -79,8 +73,7 @@ public class MajorHazardSourcesController extends BaseController
|
|||
* 重大危险源统计
|
||||
*/
|
||||
@GetMapping(value = "/majorHazardSourcesStatistics")
|
||||
public String majorHazardSourcesStatistics()
|
||||
{
|
||||
public String majorHazardSourcesStatistics() {
|
||||
return majorHazardSourcesService.majorHazardSourcesStatistics();
|
||||
}
|
||||
|
||||
|
|
|
@ -3,13 +3,13 @@ package com.hbt.safety.supervision.controller;
|
|||
import java.util.List;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hbt.safety.supervision.pojo.Persion;
|
||||
import com.hbt.safety.supervision.pojo.Person;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.hbt.safety.supervision.service.IPersionService;
|
||||
import com.hbt.safety.supervision.service.IPersonService;
|
||||
import com.hbt.common.core.web.controller.BaseController;
|
||||
import com.hbt.common.core.web.domain.AjaxResult;
|
||||
import com.hbt.common.core.web.page.TableDataInfo;
|
||||
|
@ -20,20 +20,20 @@ import com.hbt.common.core.web.page.TableDataInfo;
|
|||
* @author 张雨
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/persion")
|
||||
public class PersionController extends BaseController
|
||||
@RequestMapping("/person")
|
||||
public class PersonController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IPersionService persionService;
|
||||
private IPersonService personService;
|
||||
|
||||
/**
|
||||
* 查询人员信息列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public String list(Persion persion)
|
||||
public String list(Person person)
|
||||
{
|
||||
startPage();
|
||||
List<Persion> list = persionService.selectPersionList(persion);
|
||||
List<Person> list = personService.selectPersonList(person);
|
||||
TableDataInfo tableDataInfo = getDataTable(list);
|
||||
return JSONObject.toJSONString(tableDataInfo);
|
||||
}
|
||||
|
@ -44,17 +44,17 @@ public class PersionController extends BaseController
|
|||
@GetMapping(value = "/getInfo")
|
||||
public String getInfo(int id)
|
||||
{
|
||||
Persion persion = persionService.selectPersionById(id);
|
||||
return JSONObject.toJSONString(persion);
|
||||
Person person = personService.selectPersonById(id);
|
||||
return JSONObject.toJSONString(person);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增人员信息
|
||||
*/
|
||||
@GetMapping(value = "/add")
|
||||
public String add(@RequestBody Persion persion)
|
||||
public String add(@RequestBody Person person)
|
||||
{
|
||||
AjaxResult ajaxResult = toAjax(persionService.insertPersion(persion));
|
||||
AjaxResult ajaxResult = toAjax(personService.insertPerson(person));
|
||||
return JSONObject.toJSONString(ajaxResult);
|
||||
}
|
||||
|
||||
|
@ -62,9 +62,9 @@ public class PersionController extends BaseController
|
|||
* 修改人员信息
|
||||
*/
|
||||
@GetMapping(value = "/edit")
|
||||
public String edit(@RequestBody Persion persion)
|
||||
public String edit(@RequestBody Person person)
|
||||
{
|
||||
AjaxResult ajaxResult = toAjax(persionService.updatePersion(persion));
|
||||
AjaxResult ajaxResult = toAjax(personService.updatePerson(person));
|
||||
return JSONObject.toJSONString(ajaxResult);
|
||||
}
|
||||
|
||||
|
@ -74,7 +74,7 @@ public class PersionController extends BaseController
|
|||
@GetMapping(value = "/remove")
|
||||
public String remove(int[] ids)
|
||||
{
|
||||
AjaxResult ajaxResult = toAjax(persionService.deletePersionByIds(ids));
|
||||
AjaxResult ajaxResult = toAjax(personService.deletePersonByIds(ids));
|
||||
return JSONObject.toJSONString(ajaxResult);
|
||||
}
|
||||
}
|
|
@ -2,7 +2,7 @@ package com.hbt.safety.supervision.mapper;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbt.safety.supervision.pojo.Persion;
|
||||
import com.hbt.safety.supervision.pojo.Person;
|
||||
|
||||
/**
|
||||
* 人员信息Mapper接口
|
||||
|
@ -10,39 +10,38 @@ import com.hbt.safety.supervision.pojo.Persion;
|
|||
* @author 张雨
|
||||
* @date 2023-02-14
|
||||
*/
|
||||
public interface PersionMapper
|
||||
{
|
||||
public interface PersonMapper {
|
||||
/**
|
||||
* 查询人员信息
|
||||
*
|
||||
* @param id 人员信息主键
|
||||
* @return 人员信息
|
||||
*/
|
||||
Persion selectPersionById(int id);
|
||||
Person selectPersonById(int id);
|
||||
|
||||
/**
|
||||
* 查询人员信息列表
|
||||
*
|
||||
* @param persion 人员信息
|
||||
* @param person 人员信息
|
||||
* @return 人员信息集合
|
||||
*/
|
||||
List<Persion> selectPersionList(Persion persion);
|
||||
List<Person> selectPersonList(Person person);
|
||||
|
||||
/**
|
||||
* 新增人员信息
|
||||
*
|
||||
* @param persion 人员信息
|
||||
* @param person 人员信息
|
||||
* @return 结果
|
||||
*/
|
||||
int insertPersion(Persion persion);
|
||||
int insertPerson(Person person);
|
||||
|
||||
/**
|
||||
* 修改人员信息
|
||||
*
|
||||
* @param persion 人员信息
|
||||
* @param person 人员信息
|
||||
* @return 结果
|
||||
*/
|
||||
int updatePersion(Persion persion);
|
||||
int updatePerson(Person person);
|
||||
|
||||
/**
|
||||
* 删除人员信息
|
||||
|
@ -50,7 +49,7 @@ public interface PersionMapper
|
|||
* @param id 人员信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deletePersionById(int id);
|
||||
int deletePersonById(int id);
|
||||
|
||||
/**
|
||||
* 批量删除人员信息
|
||||
|
@ -58,7 +57,7 @@ public interface PersionMapper
|
|||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deletePersionByIds(int[] ids);
|
||||
int deletePersonByIds(int[] ids);
|
||||
|
||||
int getPersionCount();
|
||||
int getPersonCount();
|
||||
}
|
|
@ -24,7 +24,7 @@ public class LawEnforcementInspection extends BaseEntity
|
|||
|
||||
/** 巡查人员 */
|
||||
@Excel(name = "巡查人员")
|
||||
private String persion;
|
||||
private String person;
|
||||
|
||||
/** 巡查名称 */
|
||||
@Excel(name = "巡查名称")
|
||||
|
@ -58,14 +58,14 @@ public class LawEnforcementInspection extends BaseEntity
|
|||
{
|
||||
return inspectionDate;
|
||||
}
|
||||
public void setPersionId(String persion)
|
||||
public void setPersonId(String person)
|
||||
{
|
||||
this.persion = persion;
|
||||
this.person = person;
|
||||
}
|
||||
|
||||
public String getPersionId()
|
||||
public String getPersonId()
|
||||
{
|
||||
return persion;
|
||||
return person;
|
||||
}
|
||||
public void setName(String name)
|
||||
{
|
||||
|
@ -86,12 +86,12 @@ public class LawEnforcementInspection extends BaseEntity
|
|||
return remarks;
|
||||
}
|
||||
|
||||
public String getPersion() {
|
||||
return persion;
|
||||
public String getPerson() {
|
||||
return person;
|
||||
}
|
||||
|
||||
public void setPersion(String persion) {
|
||||
this.persion = persion;
|
||||
public void setPerson(String person) {
|
||||
this.person = person;
|
||||
}
|
||||
|
||||
public int getHiddenDangerId() {
|
||||
|
@ -115,7 +115,7 @@ public class LawEnforcementInspection extends BaseEntity
|
|||
return "LawEnforcementInspection{" +
|
||||
"id=" + id +
|
||||
", inspectionDate=" + inspectionDate +
|
||||
", persion='" + persion + '\'' +
|
||||
", person='" + person + '\'' +
|
||||
", name='" + name + '\'' +
|
||||
", remarks='" + remarks + '\'' +
|
||||
", hiddenDangerId=" + hiddenDangerId +
|
||||
|
|
|
@ -7,13 +7,13 @@ import org.apache.commons.lang3.builder.ToStringBuilder;
|
|||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
/**
|
||||
* 人员信息对象 persion
|
||||
* 人员信息对象 person
|
||||
*
|
||||
* @author 张雨
|
||||
* @date 2023-02-14
|
||||
*/
|
||||
@Data
|
||||
public class Persion extends BaseEntity
|
||||
public class Person extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
|
@ -2,7 +2,7 @@ package com.hbt.safety.supervision.service;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbt.safety.supervision.pojo.Persion;
|
||||
import com.hbt.safety.supervision.pojo.Person;
|
||||
|
||||
/**
|
||||
* 人员信息Service接口
|
||||
|
@ -10,7 +10,7 @@ import com.hbt.safety.supervision.pojo.Persion;
|
|||
* @author 张雨
|
||||
* @date 2023-02-14
|
||||
*/
|
||||
public interface IPersionService
|
||||
public interface IPersonService
|
||||
{
|
||||
/**
|
||||
* 查询人员信息
|
||||
|
@ -18,31 +18,31 @@ public interface IPersionService
|
|||
* @param id 人员信息主键
|
||||
* @return 人员信息
|
||||
*/
|
||||
Persion selectPersionById(int id);
|
||||
Person selectPersonById(int id);
|
||||
|
||||
/**
|
||||
* 查询人员信息列表
|
||||
*
|
||||
* @param persion 人员信息
|
||||
* @param person 人员信息
|
||||
* @return 人员信息集合
|
||||
*/
|
||||
List<Persion> selectPersionList(Persion persion);
|
||||
List<Person> selectPersonList(Person person);
|
||||
|
||||
/**
|
||||
* 新增人员信息
|
||||
*
|
||||
* @param persion 人员信息
|
||||
* @param person 人员信息
|
||||
* @return 结果
|
||||
*/
|
||||
int insertPersion(Persion persion);
|
||||
int insertPerson(Person person);
|
||||
|
||||
/**
|
||||
* 修改人员信息
|
||||
*
|
||||
* @param persion 人员信息
|
||||
* @param person 人员信息
|
||||
* @return 结果
|
||||
*/
|
||||
int updatePersion(Persion persion);
|
||||
int updatePerson(Person person);
|
||||
|
||||
/**
|
||||
* 批量删除人员信息
|
||||
|
@ -50,7 +50,7 @@ public interface IPersionService
|
|||
* @param ids 需要删除的人员信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deletePersionByIds(int[] ids);
|
||||
int deletePersonByIds(int[] ids);
|
||||
|
||||
/**
|
||||
* 删除人员信息信息
|
||||
|
@ -58,5 +58,5 @@ public interface IPersionService
|
|||
* @param id 人员信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deletePersionById(int id);
|
||||
int deletePersonById(int id);
|
||||
}
|
|
@ -8,7 +8,7 @@ import com.alibaba.fastjson.JSONObject;
|
|||
import com.hbt.safety.supervision.mapper.EnterpriseInfomationMapper;
|
||||
import com.hbt.safety.supervision.pojo.EnterpriseInfomation;
|
||||
import com.hbt.safety.supervision.service.IEnterpriseInfomationService;
|
||||
import com.hbt.safety.supervision.mapper.PersionMapper;
|
||||
import com.hbt.safety.supervision.mapper.PersonMapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
|
@ -19,13 +19,12 @@ import org.springframework.stereotype.Service;
|
|||
* @date 2023-02-14
|
||||
*/
|
||||
@Service
|
||||
public class EnterpriseInfomationServiceImpl implements IEnterpriseInfomationService
|
||||
{
|
||||
public class EnterpriseInfomationServiceImpl implements IEnterpriseInfomationService {
|
||||
@Autowired
|
||||
private EnterpriseInfomationMapper enterpriseInfomationMapper;
|
||||
|
||||
@Autowired
|
||||
PersionMapper persionMapper;
|
||||
PersonMapper personMapper;
|
||||
|
||||
/**
|
||||
* 查询企业信息
|
||||
|
@ -34,8 +33,7 @@ public class EnterpriseInfomationServiceImpl implements IEnterpriseInfomationSer
|
|||
* @return 企业信息
|
||||
*/
|
||||
@Override
|
||||
public EnterpriseInfomation selectEnterpriseInfomationById(int id)
|
||||
{
|
||||
public EnterpriseInfomation selectEnterpriseInfomationById(int id) {
|
||||
return enterpriseInfomationMapper.selectEnterpriseInfomationById(id);
|
||||
}
|
||||
|
||||
|
@ -46,8 +44,7 @@ public class EnterpriseInfomationServiceImpl implements IEnterpriseInfomationSer
|
|||
* @return 企业信息
|
||||
*/
|
||||
@Override
|
||||
public List<EnterpriseInfomation> selectEnterpriseInfomationList(EnterpriseInfomation enterpriseInfomation)
|
||||
{
|
||||
public List<EnterpriseInfomation> selectEnterpriseInfomationList(EnterpriseInfomation enterpriseInfomation) {
|
||||
return enterpriseInfomationMapper.selectEnterpriseInfomationList(enterpriseInfomation);
|
||||
}
|
||||
|
||||
|
@ -58,8 +55,7 @@ public class EnterpriseInfomationServiceImpl implements IEnterpriseInfomationSer
|
|||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertEnterpriseInfomation(EnterpriseInfomation enterpriseInfomation)
|
||||
{
|
||||
public int insertEnterpriseInfomation(EnterpriseInfomation enterpriseInfomation) {
|
||||
return enterpriseInfomationMapper.insertEnterpriseInfomation(enterpriseInfomation);
|
||||
}
|
||||
|
||||
|
@ -70,8 +66,7 @@ public class EnterpriseInfomationServiceImpl implements IEnterpriseInfomationSer
|
|||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateEnterpriseInfomation(EnterpriseInfomation enterpriseInfomation)
|
||||
{
|
||||
public int updateEnterpriseInfomation(EnterpriseInfomation enterpriseInfomation) {
|
||||
return enterpriseInfomationMapper.updateEnterpriseInfomation(enterpriseInfomation);
|
||||
}
|
||||
|
||||
|
@ -82,8 +77,7 @@ public class EnterpriseInfomationServiceImpl implements IEnterpriseInfomationSer
|
|||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteEnterpriseInfomationByIds(int[] ids)
|
||||
{
|
||||
public int deleteEnterpriseInfomationByIds(int[] ids) {
|
||||
return enterpriseInfomationMapper.deleteEnterpriseInfomationByIds(ids);
|
||||
}
|
||||
|
||||
|
@ -94,8 +88,7 @@ public class EnterpriseInfomationServiceImpl implements IEnterpriseInfomationSer
|
|||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteEnterpriseInfomationById(int id)
|
||||
{
|
||||
public int deleteEnterpriseInfomationById(int id) {
|
||||
return enterpriseInfomationMapper.deleteEnterpriseInfomationById(id);
|
||||
}
|
||||
|
||||
|
@ -112,13 +105,13 @@ public class EnterpriseInfomationServiceImpl implements IEnterpriseInfomationSer
|
|||
// 在管企业数量
|
||||
int enterpriseCount = enterpriseInfomationMapper.getEnterpriseCount();
|
||||
// 企业员工数
|
||||
int persionCount = persionMapper.getPersionCount();
|
||||
int personCount = personMapper.getPersonCount();
|
||||
|
||||
// 等级车辆数
|
||||
int carCount = enterpriseInfomationMapper.getCarCount();
|
||||
map.put("enterpriseClassification", list);
|
||||
map.put("enterpriseCount", enterpriseCount);
|
||||
map.put("personCount", persionCount);
|
||||
map.put("personCount", personCount);
|
||||
map.put("carCount", carCount);
|
||||
return JSONObject.toJSONString(map);
|
||||
}
|
||||
|
|
|
@ -2,11 +2,11 @@ package com.hbt.safety.supervision.service.impl;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbt.safety.supervision.pojo.Persion;
|
||||
import com.hbt.safety.supervision.pojo.Person;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.hbt.safety.supervision.mapper.PersionMapper;
|
||||
import com.hbt.safety.supervision.service.IPersionService;
|
||||
import com.hbt.safety.supervision.mapper.PersonMapper;
|
||||
import com.hbt.safety.supervision.service.IPersonService;
|
||||
|
||||
/**
|
||||
* 人员信息Service业务层处理
|
||||
|
@ -15,10 +15,10 @@ import com.hbt.safety.supervision.service.IPersionService;
|
|||
* @date 2023-02-14
|
||||
*/
|
||||
@Service
|
||||
public class PersionServiceImpl implements IPersionService
|
||||
public class PersonServiceImpl implements IPersonService
|
||||
{
|
||||
@Autowired
|
||||
private PersionMapper persionMapper;
|
||||
private PersonMapper personMapper;
|
||||
|
||||
/**
|
||||
* 查询人员信息
|
||||
|
@ -27,45 +27,45 @@ public class PersionServiceImpl implements IPersionService
|
|||
* @return 人员信息
|
||||
*/
|
||||
@Override
|
||||
public Persion selectPersionById(int id)
|
||||
public Person selectPersonById(int id)
|
||||
{
|
||||
return persionMapper.selectPersionById(id);
|
||||
return personMapper.selectPersonById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询人员信息列表
|
||||
*
|
||||
* @param persion 人员信息
|
||||
* @param person 人员信息
|
||||
* @return 人员信息
|
||||
*/
|
||||
@Override
|
||||
public List<Persion> selectPersionList(Persion persion)
|
||||
public List<Person> selectPersonList(Person person)
|
||||
{
|
||||
return persionMapper.selectPersionList(persion);
|
||||
return personMapper.selectPersonList(person);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增人员信息
|
||||
*
|
||||
* @param persion 人员信息
|
||||
* @param person 人员信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertPersion(Persion persion)
|
||||
public int insertPerson(Person person)
|
||||
{
|
||||
return persionMapper.insertPersion(persion);
|
||||
return personMapper.insertPerson(person);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改人员信息
|
||||
*
|
||||
* @param persion 人员信息
|
||||
* @param person 人员信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updatePersion(Persion persion)
|
||||
public int updatePerson(Person person)
|
||||
{
|
||||
return persionMapper.updatePersion(persion);
|
||||
return personMapper.updatePerson(person);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -75,9 +75,9 @@ public class PersionServiceImpl implements IPersionService
|
|||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deletePersionByIds(int[] ids)
|
||||
public int deletePersonByIds(int[] ids)
|
||||
{
|
||||
return persionMapper.deletePersionByIds(ids);
|
||||
return personMapper.deletePersonByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -87,8 +87,8 @@ public class PersionServiceImpl implements IPersionService
|
|||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deletePersionById(int id)
|
||||
public int deletePersonById(int id)
|
||||
{
|
||||
return persionMapper.deletePersionById(id);
|
||||
return personMapper.deletePersonById(id);
|
||||
}
|
||||
}
|
|
@ -38,7 +38,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
r.name as riskName
|
||||
from hidden_danger as a
|
||||
left join enterprise_infomation as b on a.enterprise_id = b.id
|
||||
left join persion as p on a.person_id = p.id
|
||||
left join person as p on a.person_id = p.id
|
||||
left join risk as r on a.risk_id = r.id
|
||||
</sql>
|
||||
|
||||
|
|
|
@ -7,13 +7,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<resultMap type="com.hbt.safety.supervision.pojo.LawEnforcementInspection" id="LawEnforcementInspectionResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="inspectionDate" column="inspection_date" />
|
||||
<result property="persion" column="persion" />
|
||||
<result property="person" column="person" />
|
||||
<result property="name" column="name" />
|
||||
<result property="remarks" column="remarks" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectLawEnforcementInspectionVo">
|
||||
select distinct(a.id) id, a.inspection_date, a.inspection_date, a.persion persion, a.name name,
|
||||
select distinct(a.id) id, a.inspection_date, a.inspection_date, a.person person, a.name name,
|
||||
b.hidden_danger_id hiddenDangerId,
|
||||
c.risk_id riskId
|
||||
from law_enforcement_inspection as a
|
||||
|
@ -35,14 +35,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="inspectionDate != null">inspection_date,</if>
|
||||
<if test="persion != null">persion,</if>
|
||||
<if test="person != null">person,</if>
|
||||
<if test="name != null">name,</if>
|
||||
<if test="remarks != null">remarks,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="inspectionDate != null">#{inspectionDate},</if>
|
||||
<if test="persion != null">#{persion},</if>
|
||||
<if test="person != null">#{person},</if>
|
||||
<if test="name != null">#{name},</if>
|
||||
<if test="remarks != null">#{remarks},</if>
|
||||
</trim>
|
||||
|
@ -52,7 +52,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
update law_enforcement_inspection
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="inspectionDate != null">inspection_date = #{inspectionDate},</if>
|
||||
<if test="persion != null">persion = #{persion},</if>
|
||||
<if test="person != null">person = #{person},</if>
|
||||
<if test="name != null">name = #{name},</if>
|
||||
<if test="remarks != null">remarks = #{remarks},</if>
|
||||
</trim>
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.hbt.safety.supervision.mapper.PersionMapper">
|
||||
<mapper namespace="com.hbt.safety.supervision.mapper.PersonMapper">
|
||||
|
||||
<resultMap type="com.hbt.safety.supervision.pojo.Persion" id="PersionResult">
|
||||
<resultMap type="com.hbt.safety.supervision.pojo.Person" id="PersonResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="name" column="name" />
|
||||
<result property="sex" column="sex" />
|
||||
|
@ -16,24 +16,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="addr" column="addr" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectPersionVo">
|
||||
select name, phone, addr from persion
|
||||
<sql id="selectPersonVo">
|
||||
select name, phone, addr from person
|
||||
</sql>
|
||||
|
||||
<select id="selectPersionList" parameterType="com.hbt.safety.supervision.pojo.Persion" resultMap="PersionResult">
|
||||
<include refid="selectPersionVo"/>
|
||||
<select id="selectPersonList" parameterType="com.hbt.safety.supervision.pojo.Person" resultMap="PersonResult">
|
||||
<include refid="selectPersonVo"/>
|
||||
<where>
|
||||
<if test="enterpriseId != null "> and enterprise_id = #{enterpriseId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectPersionById" parameterType="Integer" resultMap="PersionResult">
|
||||
<include refid="selectPersionVo"/>
|
||||
<select id="selectPersonById" parameterType="Integer" resultMap="PersonResult">
|
||||
<include refid="selectPersonVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertPersion" parameterType="com.hbt.safety.supervision.pojo.Persion">
|
||||
insert into persion
|
||||
<insert id="insertPerson" parameterType="com.hbt.safety.supervision.pojo.Person">
|
||||
insert into person
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="name != null">name,</if>
|
||||
|
@ -58,8 +58,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updatePersion" parameterType="com.hbt.safety.supervision.pojo.Persion">
|
||||
update persion
|
||||
<update id="updatePerson" parameterType="com.hbt.safety.supervision.pojo.Person">
|
||||
update person
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="name != null">name = #{name},</if>
|
||||
<if test="sex != null">sex = #{sex},</if>
|
||||
|
@ -73,18 +73,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deletePersionById" parameterType="Integer">
|
||||
delete from persion where id = #{id}
|
||||
<delete id="deletePersonById" parameterType="Integer">
|
||||
delete from person where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deletePersionByIds" parameterType="String">
|
||||
delete from persion where id in
|
||||
<delete id="deletePersonByIds" parameterType="String">
|
||||
delete from person where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="getPersionCount" resultType="Integer">
|
||||
select count(*) from persion
|
||||
<select id="getPersonCount" resultType="Integer">
|
||||
select count(*) from person
|
||||
</select>
|
||||
</mapper>
|
|
@ -35,7 +35,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
p.name as responsiblePerson
|
||||
from risk as a
|
||||
left join enterprise_infomation as b on a.enterprise_id = b.id
|
||||
left join persion as p on a.responsible_person_id = p.id
|
||||
left join person as p on a.responsible_person_id = p.id
|
||||
</sql>
|
||||
<select id="selectRiskById" parameterType="Integer" resultType="Risk">
|
||||
<include refid="selectRisk"/>
|
||||
|
|
Loading…
Reference in New Issue