一个小问题

main
fengxiaoyu 2023-02-17 15:29:26 +08:00
parent afc05a575f
commit 60351f2096
15 changed files with 141 additions and 159 deletions

View File

@ -78,6 +78,9 @@
<orderEntry type="library" name="Maven: com.github.virtuald:curvesapi:1.06" 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: 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: 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: 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-data-redis:2.7.3" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.7.3" level="project" /> <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.7.3" level="project" />

View File

@ -223,5 +223,7 @@
<orderEntry type="library" name="Maven: org.apache.commons:commons-compress:1.19" level="project" /> <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: 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: 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> </component>
</module> </module>

View File

@ -21,8 +21,7 @@ import com.hbt.common.core.web.page.TableDataInfo;
*/ */
@RestController @RestController
@RequestMapping("/operation") @RequestMapping("/operation")
public class HazardousOperationController extends BaseController public class HazardousOperationController extends BaseController {
{
@Autowired @Autowired
private IHazardousOperationService hazardousOperationService; private IHazardousOperationService hazardousOperationService;
@ -30,8 +29,7 @@ public class HazardousOperationController extends BaseController
* *
*/ */
@GetMapping("/list") @GetMapping("/list")
public String list() public String list() {
{
List<HazardousOperation> list = hazardousOperationService.selectHazardousOperationList(); List<HazardousOperation> list = hazardousOperationService.selectHazardousOperationList();
TableDataInfo tableDataInfo = getDataTable(list); TableDataInfo tableDataInfo = getDataTable(list);
return JSONObject.toJSONString(tableDataInfo); return JSONObject.toJSONString(tableDataInfo);
@ -41,8 +39,7 @@ public class HazardousOperationController extends BaseController
* *
*/ */
@GetMapping(value = "/getInfo") @GetMapping(value = "/getInfo")
public String getInfo(int id) public String getInfo(int id) {
{
AjaxResult ajaxResult = success(hazardousOperationService.selectHazardousOperationById(id)); AjaxResult ajaxResult = success(hazardousOperationService.selectHazardousOperationById(id));
return JSONObject.toJSONString(ajaxResult); return JSONObject.toJSONString(ajaxResult);
} }
@ -51,8 +48,7 @@ public class HazardousOperationController extends BaseController
* *
*/ */
@GetMapping(value = "/add") @GetMapping(value = "/add")
public String add(@RequestBody HazardousOperation hazardousOperation) public String add(@RequestBody HazardousOperation hazardousOperation) {
{
AjaxResult ajaxResult = toAjax(hazardousOperationService.insertHazardousOperation(hazardousOperation)); AjaxResult ajaxResult = toAjax(hazardousOperationService.insertHazardousOperation(hazardousOperation));
return JSONObject.toJSONString(ajaxResult); return JSONObject.toJSONString(ajaxResult);
} }
@ -61,8 +57,7 @@ public class HazardousOperationController extends BaseController
* *
*/ */
@GetMapping(value = "/edit") @GetMapping(value = "/edit")
public String edit(@RequestBody HazardousOperation hazardousOperation) public String edit(@RequestBody HazardousOperation hazardousOperation) {
{
AjaxResult ajaxResult = toAjax(hazardousOperationService.updateHazardousOperation(hazardousOperation)); AjaxResult ajaxResult = toAjax(hazardousOperationService.updateHazardousOperation(hazardousOperation));
return JSONObject.toJSONString(ajaxResult); return JSONObject.toJSONString(ajaxResult);
} }
@ -71,8 +66,7 @@ public class HazardousOperationController extends BaseController
* *
*/ */
@GetMapping(value = "/remove") @GetMapping(value = "/remove")
public String remove(int[] ids) public String remove(int[] ids) {
{
AjaxResult ajaxResult = toAjax(hazardousOperationService.deleteHazardousOperationByIds(ids)); AjaxResult ajaxResult = toAjax(hazardousOperationService.deleteHazardousOperationByIds(ids));
return JSONObject.toJSONString(ajaxResult); return JSONObject.toJSONString(ajaxResult);
} }
@ -81,8 +75,7 @@ public class HazardousOperationController extends BaseController
* *
*/ */
@GetMapping(value = "/hazardousOperationStatistics") @GetMapping(value = "/hazardousOperationStatistics")
public String hazardousOperationStatistics() public String hazardousOperationStatistics() {
{
return hazardousOperationService.hazardousOperationStatistics(); return hazardousOperationService.hazardousOperationStatistics();
} }
@ -90,8 +83,7 @@ public class HazardousOperationController extends BaseController
* *
*/ */
@GetMapping(value = "/hazardousOperationManagement") @GetMapping(value = "/hazardousOperationManagement")
public String hazardousOperationManagement() public String hazardousOperationManagement() {
{
return hazardousOperationService.hazardousOperationManagement(); return hazardousOperationService.hazardousOperationManagement();
} }
} }

View File

@ -20,8 +20,7 @@ import com.hbt.common.core.web.domain.AjaxResult;
*/ */
@RestController @RestController
@RequestMapping("/sources") @RequestMapping("/sources")
public class MajorHazardSourcesController extends BaseController public class MajorHazardSourcesController extends BaseController {
{
@Autowired @Autowired
private IMajorHazardSourcesService majorHazardSourcesService; private IMajorHazardSourcesService majorHazardSourcesService;
@ -29,8 +28,7 @@ public class MajorHazardSourcesController extends BaseController
* *
*/ */
@GetMapping("/list") @GetMapping("/list")
public String list(MajorHazardSources majorHazardSources) public String list(MajorHazardSources majorHazardSources) {
{
List<MajorHazardSources> list = majorHazardSourcesService.selectMajorHazardSourcesList(majorHazardSources); List<MajorHazardSources> list = majorHazardSourcesService.selectMajorHazardSourcesList(majorHazardSources);
return JSONObject.toJSONString(list); return JSONObject.toJSONString(list);
} }
@ -39,8 +37,7 @@ public class MajorHazardSourcesController extends BaseController
* *
*/ */
@GetMapping(value = "/getInfo") @GetMapping(value = "/getInfo")
public String getInfo(int id) public String getInfo(int id) {
{
MajorHazardSources majorHazardSources = majorHazardSourcesService.selectMajorHazardSourcesById(id); MajorHazardSources majorHazardSources = majorHazardSourcesService.selectMajorHazardSourcesById(id);
return JSONObject.toJSONString(majorHazardSources); return JSONObject.toJSONString(majorHazardSources);
} }
@ -49,8 +46,7 @@ public class MajorHazardSourcesController extends BaseController
* *
*/ */
@GetMapping(value = "/add") @GetMapping(value = "/add")
public String add(@RequestBody MajorHazardSources majorHazardSources) public String add(@RequestBody MajorHazardSources majorHazardSources) {
{
AjaxResult ajaxResult = toAjax(majorHazardSourcesService.insertMajorHazardSources(majorHazardSources)); AjaxResult ajaxResult = toAjax(majorHazardSourcesService.insertMajorHazardSources(majorHazardSources));
return JSONObject.toJSONString(ajaxResult); return JSONObject.toJSONString(ajaxResult);
} }
@ -59,8 +55,7 @@ public class MajorHazardSourcesController extends BaseController
* *
*/ */
@GetMapping(value = "/edit") @GetMapping(value = "/edit")
public String edit(@RequestBody MajorHazardSources majorHazardSources) public String edit(@RequestBody MajorHazardSources majorHazardSources) {
{
AjaxResult ajaxResult = toAjax(majorHazardSourcesService.updateMajorHazardSources(majorHazardSources)); AjaxResult ajaxResult = toAjax(majorHazardSourcesService.updateMajorHazardSources(majorHazardSources));
return JSONObject.toJSONString(ajaxResult); return JSONObject.toJSONString(ajaxResult);
} }
@ -69,8 +64,7 @@ public class MajorHazardSourcesController extends BaseController
* *
*/ */
@GetMapping(value = "/remove") @GetMapping(value = "/remove")
public String remove(int[] ids) public String remove(int[] ids) {
{
AjaxResult ajaxResult = toAjax(majorHazardSourcesService.deleteMajorHazardSourcesByIds(ids)); AjaxResult ajaxResult = toAjax(majorHazardSourcesService.deleteMajorHazardSourcesByIds(ids));
return JSONObject.toJSONString(ajaxResult); return JSONObject.toJSONString(ajaxResult);
} }
@ -79,8 +73,7 @@ public class MajorHazardSourcesController extends BaseController
* *
*/ */
@GetMapping(value = "/majorHazardSourcesStatistics") @GetMapping(value = "/majorHazardSourcesStatistics")
public String majorHazardSourcesStatistics() public String majorHazardSourcesStatistics() {
{
return majorHazardSourcesService.majorHazardSourcesStatistics(); return majorHazardSourcesService.majorHazardSourcesStatistics();
} }

View File

@ -3,13 +3,13 @@ package com.hbt.safety.supervision.controller;
import java.util.List; import java.util.List;
import com.alibaba.fastjson.JSONObject; 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.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; 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.controller.BaseController;
import com.hbt.common.core.web.domain.AjaxResult; import com.hbt.common.core.web.domain.AjaxResult;
import com.hbt.common.core.web.page.TableDataInfo; import com.hbt.common.core.web.page.TableDataInfo;
@ -20,20 +20,20 @@ import com.hbt.common.core.web.page.TableDataInfo;
* @author * @author
*/ */
@RestController @RestController
@RequestMapping("/persion") @RequestMapping("/person")
public class PersionController extends BaseController public class PersonController extends BaseController
{ {
@Autowired @Autowired
private IPersionService persionService; private IPersonService personService;
/** /**
* *
*/ */
@GetMapping("/list") @GetMapping("/list")
public String list(Persion persion) public String list(Person person)
{ {
startPage(); startPage();
List<Persion> list = persionService.selectPersionList(persion); List<Person> list = personService.selectPersonList(person);
TableDataInfo tableDataInfo = getDataTable(list); TableDataInfo tableDataInfo = getDataTable(list);
return JSONObject.toJSONString(tableDataInfo); return JSONObject.toJSONString(tableDataInfo);
} }
@ -44,17 +44,17 @@ public class PersionController extends BaseController
@GetMapping(value = "/getInfo") @GetMapping(value = "/getInfo")
public String getInfo(int id) public String getInfo(int id)
{ {
Persion persion = persionService.selectPersionById(id); Person person = personService.selectPersonById(id);
return JSONObject.toJSONString(persion); return JSONObject.toJSONString(person);
} }
/** /**
* *
*/ */
@GetMapping(value = "/add") @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); return JSONObject.toJSONString(ajaxResult);
} }
@ -62,9 +62,9 @@ public class PersionController extends BaseController
* *
*/ */
@GetMapping(value = "/edit") @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); return JSONObject.toJSONString(ajaxResult);
} }
@ -74,7 +74,7 @@ public class PersionController extends BaseController
@GetMapping(value = "/remove") @GetMapping(value = "/remove")
public String remove(int[] ids) public String remove(int[] ids)
{ {
AjaxResult ajaxResult = toAjax(persionService.deletePersionByIds(ids)); AjaxResult ajaxResult = toAjax(personService.deletePersonByIds(ids));
return JSONObject.toJSONString(ajaxResult); return JSONObject.toJSONString(ajaxResult);
} }
} }

View File

@ -2,7 +2,7 @@ package com.hbt.safety.supervision.mapper;
import java.util.List; import java.util.List;
import com.hbt.safety.supervision.pojo.Persion; import com.hbt.safety.supervision.pojo.Person;
/** /**
* Mapper * Mapper
@ -10,39 +10,38 @@ import com.hbt.safety.supervision.pojo.Persion;
* @author * @author
* @date 2023-02-14 * @date 2023-02-14
*/ */
public interface PersionMapper public interface PersonMapper {
{
/** /**
* *
* *
* @param id * @param id
* @return * @return
*/ */
Persion selectPersionById(int id); Person selectPersonById(int id);
/** /**
* *
* *
* @param persion * @param person
* @return * @return
*/ */
List<Persion> selectPersionList(Persion persion); List<Person> selectPersonList(Person person);
/** /**
* *
* *
* @param persion * @param person
* @return * @return
*/ */
int insertPersion(Persion persion); int insertPerson(Person person);
/** /**
* *
* *
* @param persion * @param person
* @return * @return
*/ */
int updatePersion(Persion persion); int updatePerson(Person person);
/** /**
* *
@ -50,7 +49,7 @@ public interface PersionMapper
* @param id * @param id
* @return * @return
*/ */
int deletePersionById(int id); int deletePersonById(int id);
/** /**
* *
@ -58,7 +57,7 @@ public interface PersionMapper
* @param ids * @param ids
* @return * @return
*/ */
int deletePersionByIds(int[] ids); int deletePersonByIds(int[] ids);
int getPersionCount(); int getPersonCount();
} }

View File

@ -24,7 +24,7 @@ public class LawEnforcementInspection extends BaseEntity
/** 巡查人员 */ /** 巡查人员 */
@Excel(name = "巡查人员") @Excel(name = "巡查人员")
private String persion; private String person;
/** 巡查名称 */ /** 巡查名称 */
@Excel(name = "巡查名称") @Excel(name = "巡查名称")
@ -58,14 +58,14 @@ public class LawEnforcementInspection extends BaseEntity
{ {
return inspectionDate; 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) public void setName(String name)
{ {
@ -86,12 +86,12 @@ public class LawEnforcementInspection extends BaseEntity
return remarks; return remarks;
} }
public String getPersion() { public String getPerson() {
return persion; return person;
} }
public void setPersion(String persion) { public void setPerson(String person) {
this.persion = persion; this.person = person;
} }
public int getHiddenDangerId() { public int getHiddenDangerId() {
@ -115,7 +115,7 @@ public class LawEnforcementInspection extends BaseEntity
return "LawEnforcementInspection{" + return "LawEnforcementInspection{" +
"id=" + id + "id=" + id +
", inspectionDate=" + inspectionDate + ", inspectionDate=" + inspectionDate +
", persion='" + persion + '\'' + ", person='" + person + '\'' +
", name='" + name + '\'' + ", name='" + name + '\'' +
", remarks='" + remarks + '\'' + ", remarks='" + remarks + '\'' +
", hiddenDangerId=" + hiddenDangerId + ", hiddenDangerId=" + hiddenDangerId +

View File

@ -7,13 +7,13 @@ import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle; import org.apache.commons.lang3.builder.ToStringStyle;
/** /**
* persion * person
* *
* @author * @author
* @date 2023-02-14 * @date 2023-02-14
*/ */
@Data @Data
public class Persion extends BaseEntity public class Person extends BaseEntity
{ {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;

View File

@ -2,7 +2,7 @@ package com.hbt.safety.supervision.service;
import java.util.List; import java.util.List;
import com.hbt.safety.supervision.pojo.Persion; import com.hbt.safety.supervision.pojo.Person;
/** /**
* Service * Service
@ -10,7 +10,7 @@ import com.hbt.safety.supervision.pojo.Persion;
* @author * @author
* @date 2023-02-14 * @date 2023-02-14
*/ */
public interface IPersionService public interface IPersonService
{ {
/** /**
* *
@ -18,31 +18,31 @@ public interface IPersionService
* @param id * @param id
* @return * @return
*/ */
Persion selectPersionById(int id); Person selectPersonById(int id);
/** /**
* *
* *
* @param persion * @param person
* @return * @return
*/ */
List<Persion> selectPersionList(Persion persion); List<Person> selectPersonList(Person person);
/** /**
* *
* *
* @param persion * @param person
* @return * @return
*/ */
int insertPersion(Persion persion); int insertPerson(Person person);
/** /**
* *
* *
* @param persion * @param person
* @return * @return
*/ */
int updatePersion(Persion persion); int updatePerson(Person person);
/** /**
* *
@ -50,7 +50,7 @@ public interface IPersionService
* @param ids * @param ids
* @return * @return
*/ */
int deletePersionByIds(int[] ids); int deletePersonByIds(int[] ids);
/** /**
* *
@ -58,5 +58,5 @@ public interface IPersionService
* @param id * @param id
* @return * @return
*/ */
int deletePersionById(int id); int deletePersonById(int id);
} }

View File

@ -8,7 +8,7 @@ import com.alibaba.fastjson.JSONObject;
import com.hbt.safety.supervision.mapper.EnterpriseInfomationMapper; import com.hbt.safety.supervision.mapper.EnterpriseInfomationMapper;
import com.hbt.safety.supervision.pojo.EnterpriseInfomation; import com.hbt.safety.supervision.pojo.EnterpriseInfomation;
import com.hbt.safety.supervision.service.IEnterpriseInfomationService; 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.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -19,13 +19,12 @@ import org.springframework.stereotype.Service;
* @date 2023-02-14 * @date 2023-02-14
*/ */
@Service @Service
public class EnterpriseInfomationServiceImpl implements IEnterpriseInfomationService public class EnterpriseInfomationServiceImpl implements IEnterpriseInfomationService {
{
@Autowired @Autowired
private EnterpriseInfomationMapper enterpriseInfomationMapper; private EnterpriseInfomationMapper enterpriseInfomationMapper;
@Autowired @Autowired
PersionMapper persionMapper; PersonMapper personMapper;
/** /**
* *
@ -34,8 +33,7 @@ public class EnterpriseInfomationServiceImpl implements IEnterpriseInfomationSer
* @return * @return
*/ */
@Override @Override
public EnterpriseInfomation selectEnterpriseInfomationById(int id) public EnterpriseInfomation selectEnterpriseInfomationById(int id) {
{
return enterpriseInfomationMapper.selectEnterpriseInfomationById(id); return enterpriseInfomationMapper.selectEnterpriseInfomationById(id);
} }
@ -46,8 +44,7 @@ public class EnterpriseInfomationServiceImpl implements IEnterpriseInfomationSer
* @return * @return
*/ */
@Override @Override
public List<EnterpriseInfomation> selectEnterpriseInfomationList(EnterpriseInfomation enterpriseInfomation) public List<EnterpriseInfomation> selectEnterpriseInfomationList(EnterpriseInfomation enterpriseInfomation) {
{
return enterpriseInfomationMapper.selectEnterpriseInfomationList(enterpriseInfomation); return enterpriseInfomationMapper.selectEnterpriseInfomationList(enterpriseInfomation);
} }
@ -58,8 +55,7 @@ public class EnterpriseInfomationServiceImpl implements IEnterpriseInfomationSer
* @return * @return
*/ */
@Override @Override
public int insertEnterpriseInfomation(EnterpriseInfomation enterpriseInfomation) public int insertEnterpriseInfomation(EnterpriseInfomation enterpriseInfomation) {
{
return enterpriseInfomationMapper.insertEnterpriseInfomation(enterpriseInfomation); return enterpriseInfomationMapper.insertEnterpriseInfomation(enterpriseInfomation);
} }
@ -70,8 +66,7 @@ public class EnterpriseInfomationServiceImpl implements IEnterpriseInfomationSer
* @return * @return
*/ */
@Override @Override
public int updateEnterpriseInfomation(EnterpriseInfomation enterpriseInfomation) public int updateEnterpriseInfomation(EnterpriseInfomation enterpriseInfomation) {
{
return enterpriseInfomationMapper.updateEnterpriseInfomation(enterpriseInfomation); return enterpriseInfomationMapper.updateEnterpriseInfomation(enterpriseInfomation);
} }
@ -82,8 +77,7 @@ public class EnterpriseInfomationServiceImpl implements IEnterpriseInfomationSer
* @return * @return
*/ */
@Override @Override
public int deleteEnterpriseInfomationByIds(int[] ids) public int deleteEnterpriseInfomationByIds(int[] ids) {
{
return enterpriseInfomationMapper.deleteEnterpriseInfomationByIds(ids); return enterpriseInfomationMapper.deleteEnterpriseInfomationByIds(ids);
} }
@ -94,8 +88,7 @@ public class EnterpriseInfomationServiceImpl implements IEnterpriseInfomationSer
* @return * @return
*/ */
@Override @Override
public int deleteEnterpriseInfomationById(int id) public int deleteEnterpriseInfomationById(int id) {
{
return enterpriseInfomationMapper.deleteEnterpriseInfomationById(id); return enterpriseInfomationMapper.deleteEnterpriseInfomationById(id);
} }
@ -112,13 +105,13 @@ public class EnterpriseInfomationServiceImpl implements IEnterpriseInfomationSer
// 在管企业数量 // 在管企业数量
int enterpriseCount = enterpriseInfomationMapper.getEnterpriseCount(); int enterpriseCount = enterpriseInfomationMapper.getEnterpriseCount();
// 企业员工数 // 企业员工数
int persionCount = persionMapper.getPersionCount(); int personCount = personMapper.getPersonCount();
// 等级车辆数 // 等级车辆数
int carCount = enterpriseInfomationMapper.getCarCount(); int carCount = enterpriseInfomationMapper.getCarCount();
map.put("enterpriseClassification", list); map.put("enterpriseClassification", list);
map.put("enterpriseCount", enterpriseCount); map.put("enterpriseCount", enterpriseCount);
map.put("personCount", persionCount); map.put("personCount", personCount);
map.put("carCount", carCount); map.put("carCount", carCount);
return JSONObject.toJSONString(map); return JSONObject.toJSONString(map);
} }

View File

@ -2,11 +2,11 @@ package com.hbt.safety.supervision.service.impl;
import java.util.List; 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.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.hbt.safety.supervision.mapper.PersionMapper; import com.hbt.safety.supervision.mapper.PersonMapper;
import com.hbt.safety.supervision.service.IPersionService; import com.hbt.safety.supervision.service.IPersonService;
/** /**
* Service * Service
@ -15,10 +15,10 @@ import com.hbt.safety.supervision.service.IPersionService;
* @date 2023-02-14 * @date 2023-02-14
*/ */
@Service @Service
public class PersionServiceImpl implements IPersionService public class PersonServiceImpl implements IPersonService
{ {
@Autowired @Autowired
private PersionMapper persionMapper; private PersonMapper personMapper;
/** /**
* *
@ -27,45 +27,45 @@ public class PersionServiceImpl implements IPersionService
* @return * @return
*/ */
@Override @Override
public Persion selectPersionById(int id) public Person selectPersonById(int id)
{ {
return persionMapper.selectPersionById(id); return personMapper.selectPersonById(id);
} }
/** /**
* *
* *
* @param persion * @param person
* @return * @return
*/ */
@Override @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 * @return
*/ */
@Override @Override
public int insertPersion(Persion persion) public int insertPerson(Person person)
{ {
return persionMapper.insertPersion(persion); return personMapper.insertPerson(person);
} }
/** /**
* *
* *
* @param persion * @param person
* @return * @return
*/ */
@Override @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 * @return
*/ */
@Override @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 * @return
*/ */
@Override @Override
public int deletePersionById(int id) public int deletePersonById(int id)
{ {
return persionMapper.deletePersionById(id); return personMapper.deletePersonById(id);
} }
} }

View File

@ -38,7 +38,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
r.name as riskName r.name as riskName
from hidden_danger as a from hidden_danger as a
left join enterprise_infomation as b on a.enterprise_id = b.id 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 left join risk as r on a.risk_id = r.id
</sql> </sql>

View File

@ -7,13 +7,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<resultMap type="com.hbt.safety.supervision.pojo.LawEnforcementInspection" id="LawEnforcementInspectionResult"> <resultMap type="com.hbt.safety.supervision.pojo.LawEnforcementInspection" id="LawEnforcementInspectionResult">
<result property="id" column="id" /> <result property="id" column="id" />
<result property="inspectionDate" column="inspection_date" /> <result property="inspectionDate" column="inspection_date" />
<result property="persion" column="persion" /> <result property="person" column="person" />
<result property="name" column="name" /> <result property="name" column="name" />
<result property="remarks" column="remarks" /> <result property="remarks" column="remarks" />
</resultMap> </resultMap>
<sql id="selectLawEnforcementInspectionVo"> <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, b.hidden_danger_id hiddenDangerId,
c.risk_id riskId c.risk_id riskId
from law_enforcement_inspection as a from law_enforcement_inspection as a
@ -35,14 +35,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if> <if test="id != null">id,</if>
<if test="inspectionDate != null">inspection_date,</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="name != null">name,</if>
<if test="remarks != null">remarks,</if> <if test="remarks != null">remarks,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if> <if test="id != null">#{id},</if>
<if test="inspectionDate != null">#{inspectionDate},</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="name != null">#{name},</if>
<if test="remarks != null">#{remarks},</if> <if test="remarks != null">#{remarks},</if>
</trim> </trim>
@ -52,7 +52,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update law_enforcement_inspection update law_enforcement_inspection
<trim prefix="SET" suffixOverrides=","> <trim prefix="SET" suffixOverrides=",">
<if test="inspectionDate != null">inspection_date = #{inspectionDate},</if> <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="name != null">name = #{name},</if>
<if test="remarks != null">remarks = #{remarks},</if> <if test="remarks != null">remarks = #{remarks},</if>
</trim> </trim>

View File

@ -2,9 +2,9 @@
<!DOCTYPE mapper <!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "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="id" column="id" />
<result property="name" column="name" /> <result property="name" column="name" />
<result property="sex" column="sex" /> <result property="sex" column="sex" />
@ -16,24 +16,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="addr" column="addr" /> <result property="addr" column="addr" />
</resultMap> </resultMap>
<sql id="selectPersionVo"> <sql id="selectPersonVo">
select name, phone, addr from persion select name, phone, addr from person
</sql> </sql>
<select id="selectPersionList" parameterType="com.hbt.safety.supervision.pojo.Persion" resultMap="PersionResult"> <select id="selectPersonList" parameterType="com.hbt.safety.supervision.pojo.Person" resultMap="PersonResult">
<include refid="selectPersionVo"/> <include refid="selectPersonVo"/>
<where> <where>
<if test="enterpriseId != null "> and enterprise_id = #{enterpriseId}</if> <if test="enterpriseId != null "> and enterprise_id = #{enterpriseId}</if>
</where> </where>
</select> </select>
<select id="selectPersionById" parameterType="Integer" resultMap="PersionResult"> <select id="selectPersonById" parameterType="Integer" resultMap="PersonResult">
<include refid="selectPersionVo"/> <include refid="selectPersonVo"/>
where id = #{id} where id = #{id}
</select> </select>
<insert id="insertPersion" parameterType="com.hbt.safety.supervision.pojo.Persion"> <insert id="insertPerson" parameterType="com.hbt.safety.supervision.pojo.Person">
insert into persion insert into person
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if> <if test="id != null">id,</if>
<if test="name != null">name,</if> <if test="name != null">name,</if>
@ -58,8 +58,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</trim> </trim>
</insert> </insert>
<update id="updatePersion" parameterType="com.hbt.safety.supervision.pojo.Persion"> <update id="updatePerson" parameterType="com.hbt.safety.supervision.pojo.Person">
update persion update person
<trim prefix="SET" suffixOverrides=","> <trim prefix="SET" suffixOverrides=",">
<if test="name != null">name = #{name},</if> <if test="name != null">name = #{name},</if>
<if test="sex != null">sex = #{sex},</if> <if test="sex != null">sex = #{sex},</if>
@ -73,18 +73,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where id = #{id} where id = #{id}
</update> </update>
<delete id="deletePersionById" parameterType="Integer"> <delete id="deletePersonById" parameterType="Integer">
delete from persion where id = #{id} delete from person where id = #{id}
</delete> </delete>
<delete id="deletePersionByIds" parameterType="String"> <delete id="deletePersonByIds" parameterType="String">
delete from persion where id in delete from person where id in
<foreach item="id" collection="array" open="(" separator="," close=")"> <foreach item="id" collection="array" open="(" separator="," close=")">
#{id} #{id}
</foreach> </foreach>
</delete> </delete>
<select id="getPersionCount" resultType="Integer"> <select id="getPersonCount" resultType="Integer">
select count(*) from persion select count(*) from person
</select> </select>
</mapper> </mapper>

View File

@ -35,7 +35,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
p.name as responsiblePerson p.name as responsiblePerson
from risk as a from risk as a
left join enterprise_infomation as b on a.enterprise_id = b.id 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> </sql>
<select id="selectRiskById" parameterType="Integer" resultType="Risk"> <select id="selectRiskById" parameterType="Integer" resultType="Risk">
<include refid="selectRisk"/> <include refid="selectRisk"/>