forked from xxhjsb/wit-park-backend
统计接口代码提交
parent
f44b0f0b22
commit
49f9ec766f
|
@ -7,11 +7,9 @@ import com.hbt.safety.supervision.pojo.EnterpriseInfomation;
|
|||
import com.hbt.safety.supervision.service.IEnterpriseInfomationService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
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.hbt.common.security.annotation.RequiresPermissions;
|
||||
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,7 +18,6 @@ import com.hbt.common.core.web.page.TableDataInfo;
|
|||
* 企业信息Controller
|
||||
*
|
||||
* @author zhangyu
|
||||
* @date 2023-02-14
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/infomation")
|
||||
|
@ -44,9 +41,8 @@ public class EnterpriseInfomationController extends BaseController
|
|||
/**
|
||||
* 获取企业信息详细信息
|
||||
*/
|
||||
@RequiresPermissions("ep:infomation:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public String getInfo(@PathVariable("id") int id)
|
||||
@GetMapping(value = "/getInfo")
|
||||
public String getInfo(int id)
|
||||
{
|
||||
AjaxResult ajaxResult = success(enterpriseInfomationService.selectEnterpriseInfomationById(id));
|
||||
return JSONObject.toJSONString(ajaxResult);
|
||||
|
@ -76,7 +72,7 @@ public class EnterpriseInfomationController extends BaseController
|
|||
* 删除企业信息
|
||||
*/
|
||||
@GetMapping("/remove")
|
||||
public String remove(@PathVariable int[] ids)
|
||||
public String remove(int[] ids)
|
||||
{
|
||||
AjaxResult ajaxResult = toAjax(enterpriseInfomationService.deleteEnterpriseInfomationByIds(ids));
|
||||
return JSONObject.toJSONString(ajaxResult);
|
||||
|
|
|
@ -6,7 +6,6 @@ import com.alibaba.fastjson.JSONObject;
|
|||
import com.hbt.safety.supervision.pojo.EscalateHiddenDanger;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
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;
|
||||
|
@ -19,7 +18,6 @@ import com.hbt.common.core.web.page.TableDataInfo;
|
|||
* 上报隐患Controller
|
||||
*
|
||||
* @author 张雨
|
||||
* @date 2023-02-14
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/danger")
|
||||
|
@ -43,8 +41,8 @@ public class EscalateHiddenDangerController extends BaseController
|
|||
/**
|
||||
* 获取上报隐患详细信息
|
||||
*/
|
||||
@GetMapping(value = "/{id}")
|
||||
public String getInfo(@PathVariable("id") int id)
|
||||
@GetMapping(value = "/getInfo")
|
||||
public String getInfo(int id)
|
||||
{
|
||||
AjaxResult ajaxResult = success(escalateHiddenDangerService.selectEscalateHiddenDangerById(id));
|
||||
return JSONObject.toJSONString(ajaxResult);
|
||||
|
@ -74,7 +72,7 @@ public class EscalateHiddenDangerController extends BaseController
|
|||
* 删除上报隐患
|
||||
*/
|
||||
@GetMapping(value = "/remove")
|
||||
public String remove(@PathVariable int[] ids)
|
||||
public String remove(int[] ids)
|
||||
{
|
||||
AjaxResult ajaxResult = toAjax(escalateHiddenDangerService.deleteEscalateHiddenDangerByIds(ids));
|
||||
return JSONObject.toJSONString(ajaxResult);
|
||||
|
|
|
@ -6,7 +6,6 @@ import com.alibaba.fastjson.JSONObject;
|
|||
import com.hbt.safety.supervision.pojo.EscalateRisk;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
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;
|
||||
|
@ -19,7 +18,6 @@ import com.hbt.common.core.web.page.TableDataInfo;
|
|||
* 上报风险Controller
|
||||
*
|
||||
* @author 张雨
|
||||
* @date 2023-02-14
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/escalateRisk")
|
||||
|
@ -32,10 +30,9 @@ public class EscalateRiskController extends BaseController
|
|||
* 查询上报风险列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public String list(EscalateRisk escalateRisk)
|
||||
public String list()
|
||||
{
|
||||
startPage();
|
||||
List<EscalateRisk> list = escalateRiskService.selectEscalateRiskList(escalateRisk);
|
||||
List<EscalateRisk> list = escalateRiskService.selectEscalateRiskList();
|
||||
TableDataInfo tableDataInfo = getDataTable(list);
|
||||
return JSONObject.toJSONString(tableDataInfo);
|
||||
}
|
||||
|
@ -43,8 +40,8 @@ public class EscalateRiskController extends BaseController
|
|||
/**
|
||||
* 获取上报风险详细信息
|
||||
*/
|
||||
@GetMapping(value = "/{id}")
|
||||
public String getInfo(@PathVariable("id") int id)
|
||||
@GetMapping(value = "/getInfo")
|
||||
public String getInfo(int id)
|
||||
{
|
||||
AjaxResult ajaxResult = success(escalateRiskService.selectEscalateRiskById(id));
|
||||
return JSONObject.toJSONString(ajaxResult);
|
||||
|
@ -74,7 +71,7 @@ public class EscalateRiskController extends BaseController
|
|||
* 删除上报风险
|
||||
*/
|
||||
@GetMapping(value = "/remove")
|
||||
public String remove(@PathVariable int[] ids)
|
||||
public String remove(int[] ids)
|
||||
{
|
||||
AjaxResult ajaxResult = toAjax(escalateRiskService.deleteEscalateRiskByIds(ids));
|
||||
return JSONObject.toJSONString(ajaxResult);
|
||||
|
|
|
@ -6,7 +6,6 @@ import com.alibaba.fastjson.JSONObject;
|
|||
import com.hbt.safety.supervision.pojo.HazardousOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
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;
|
||||
|
@ -19,7 +18,6 @@ import com.hbt.common.core.web.page.TableDataInfo;
|
|||
* 危险作业Controller
|
||||
*
|
||||
* @author zhangyu
|
||||
* @date 2023-02-14
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/operation")
|
||||
|
@ -32,10 +30,9 @@ public class HazardousOperationController extends BaseController
|
|||
* 查询危险作业列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public String list(HazardousOperation hazardousOperation)
|
||||
public String list()
|
||||
{
|
||||
startPage();
|
||||
List<HazardousOperation> list = hazardousOperationService.selectHazardousOperationList(hazardousOperation);
|
||||
List<HazardousOperation> list = hazardousOperationService.selectHazardousOperationList();
|
||||
TableDataInfo tableDataInfo = getDataTable(list);
|
||||
return JSONObject.toJSONString(tableDataInfo);
|
||||
}
|
||||
|
@ -43,8 +40,8 @@ public class HazardousOperationController extends BaseController
|
|||
/**
|
||||
* 获取危险作业详细信息
|
||||
*/
|
||||
@GetMapping(value = "/{id}")
|
||||
public String getInfo(@PathVariable("id") int id)
|
||||
@GetMapping(value = "/getInfo")
|
||||
public String getInfo(int id)
|
||||
{
|
||||
AjaxResult ajaxResult = success(hazardousOperationService.selectHazardousOperationById(id));
|
||||
return JSONObject.toJSONString(ajaxResult);
|
||||
|
@ -74,7 +71,7 @@ public class HazardousOperationController extends BaseController
|
|||
* 删除危险作业
|
||||
*/
|
||||
@GetMapping(value = "/remove")
|
||||
public String remove(@PathVariable int[] ids)
|
||||
public String remove(int[] ids)
|
||||
{
|
||||
AjaxResult ajaxResult = toAjax(hazardousOperationService.deleteHazardousOperationByIds(ids));
|
||||
return JSONObject.toJSONString(ajaxResult);
|
||||
|
@ -88,4 +85,13 @@ public class HazardousOperationController extends BaseController
|
|||
{
|
||||
return hazardousOperationService.hazardousOperationStatistics();
|
||||
}
|
||||
|
||||
/**
|
||||
* 危险作业统计
|
||||
*/
|
||||
@GetMapping(value = "/hazardousOperationManagement")
|
||||
public String hazardousOperationManagement()
|
||||
{
|
||||
return hazardousOperationService.hazardousOperationManagement();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,7 +7,6 @@ import com.hbt.safety.supervision.pojo.HiddenDanger;
|
|||
import com.hbt.safety.supervision.service.IHiddenDangerService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
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;
|
||||
|
@ -19,7 +18,6 @@ import com.hbt.common.core.web.page.TableDataInfo;
|
|||
* 隐患Controller
|
||||
*
|
||||
* @author hbt
|
||||
* @date 2023-02-14
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/hiddenDanger")
|
||||
|
@ -43,8 +41,8 @@ public class HiddenDangerController extends BaseController
|
|||
/**
|
||||
* 获取隐患详细信息
|
||||
*/
|
||||
@GetMapping(value = "/{id}")
|
||||
public String getInfo(@PathVariable("id") int id)
|
||||
@GetMapping(value = "/getInfo")
|
||||
public String getInfo(int id)
|
||||
{
|
||||
AjaxResult ajaxResult = success(hiddenDangerService.selectHiddenDangerById(id));
|
||||
return JSONObject.toJSONString(ajaxResult);
|
||||
|
@ -74,7 +72,7 @@ public class HiddenDangerController extends BaseController
|
|||
* 删除隐患
|
||||
*/
|
||||
@GetMapping(value = "/remove")
|
||||
public String remove(@PathVariable int[] ids)
|
||||
public String remove(int[] ids)
|
||||
{
|
||||
AjaxResult ajaxResult = toAjax(hiddenDangerService.deleteHiddenDangerByIds(ids));
|
||||
return JSONObject.toJSONString(ajaxResult);
|
||||
|
@ -88,4 +86,22 @@ public class HiddenDangerController extends BaseController
|
|||
{
|
||||
return hiddenDangerService.hiddenDangerStatistics();
|
||||
}
|
||||
|
||||
/**
|
||||
* 隐患治理统计信息
|
||||
*/
|
||||
@GetMapping(value = "/hiddenDangerManagement")
|
||||
public String hiddenDangerManagement()
|
||||
{
|
||||
return hiddenDangerService.hiddenDangerManagement();
|
||||
}
|
||||
|
||||
/**
|
||||
* 隐患每周数量统计
|
||||
*/
|
||||
@GetMapping(value = "/hiddenDangerWeeklyStatistics")
|
||||
public String hiddenDangerWeeklyStatistics()
|
||||
{
|
||||
return hiddenDangerService.hiddenDangerWeeklyStatistics();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,7 +6,6 @@ import com.alibaba.fastjson.JSONObject;
|
|||
import com.hbt.safety.supervision.pojo.LawEnforcementInspection;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
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;
|
||||
|
@ -19,7 +18,6 @@ import com.hbt.common.core.web.page.TableDataInfo;
|
|||
* 执法巡查Controller
|
||||
*
|
||||
* @author zhangyu
|
||||
* @date 2023-02-14
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/inspection")
|
||||
|
@ -32,10 +30,9 @@ public class LawEnforcementInspectionController extends BaseController
|
|||
* 查询执法巡查列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public String list(LawEnforcementInspection lawEnforcementInspection)
|
||||
public String list()
|
||||
{
|
||||
startPage();
|
||||
List<LawEnforcementInspection> list = lawEnforcementInspectionService.selectLawEnforcementInspectionList(lawEnforcementInspection);
|
||||
List<LawEnforcementInspection> list = lawEnforcementInspectionService.selectLawEnforcementInspectionList();
|
||||
TableDataInfo tableDataInfo = getDataTable(list);
|
||||
return JSONObject.toJSONString(tableDataInfo);
|
||||
}
|
||||
|
@ -43,8 +40,8 @@ public class LawEnforcementInspectionController extends BaseController
|
|||
/**
|
||||
* 获取执法巡查详细信息
|
||||
*/
|
||||
@GetMapping(value = "/{id}")
|
||||
public String getInfo(@PathVariable("id") int id)
|
||||
@GetMapping(value = "/getInfo")
|
||||
public String getInfo(int id)
|
||||
{
|
||||
AjaxResult ajaxResult = success(lawEnforcementInspectionService.selectLawEnforcementInspectionById(id));
|
||||
return JSONObject.toJSONString(ajaxResult);
|
||||
|
@ -74,7 +71,7 @@ public class LawEnforcementInspectionController extends BaseController
|
|||
* 删除执法巡查
|
||||
*/
|
||||
@GetMapping(value = "/remove")
|
||||
public String remove(@PathVariable int[] ids)
|
||||
public String remove(int[] ids)
|
||||
{
|
||||
AjaxResult ajaxResult = toAjax(lawEnforcementInspectionService.deleteLawEnforcementInspectionByIds(ids));
|
||||
return JSONObject.toJSONString(ajaxResult);
|
||||
|
|
|
@ -7,7 +7,6 @@ import com.hbt.safety.supervision.pojo.MajorHazardSources;
|
|||
import com.hbt.safety.supervision.service.IMajorHazardSourcesService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
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;
|
||||
|
@ -18,7 +17,6 @@ import com.hbt.common.core.web.domain.AjaxResult;
|
|||
* 重大危险源Controller
|
||||
*
|
||||
* @author zhangyu
|
||||
* @date 2023-02-14
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/sources")
|
||||
|
@ -40,8 +38,8 @@ public class MajorHazardSourcesController extends BaseController
|
|||
/**
|
||||
* 获取重大危险源详细信息
|
||||
*/
|
||||
@GetMapping(value = "/{id}")
|
||||
public String getInfo(@PathVariable("id") int id)
|
||||
@GetMapping(value = "/getInfo")
|
||||
public String getInfo(int id)
|
||||
{
|
||||
MajorHazardSources majorHazardSources = majorHazardSourcesService.selectMajorHazardSourcesById(id);
|
||||
return JSONObject.toJSONString(majorHazardSources);
|
||||
|
@ -71,7 +69,7 @@ public class MajorHazardSourcesController extends BaseController
|
|||
* 删除重大危险源
|
||||
*/
|
||||
@GetMapping(value = "/remove")
|
||||
public String remove(@PathVariable int[] ids)
|
||||
public String remove(int[] ids)
|
||||
{
|
||||
AjaxResult ajaxResult = toAjax(majorHazardSourcesService.deleteMajorHazardSourcesByIds(ids));
|
||||
return JSONObject.toJSONString(ajaxResult);
|
||||
|
|
|
@ -6,7 +6,6 @@ import com.alibaba.fastjson.JSONObject;
|
|||
import com.hbt.safety.supervision.pojo.Persion;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
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;
|
||||
|
@ -19,7 +18,6 @@ import com.hbt.common.core.web.page.TableDataInfo;
|
|||
* 人员信息Controller
|
||||
*
|
||||
* @author 张雨
|
||||
* @date 2023-02-14
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/persion")
|
||||
|
@ -43,8 +41,8 @@ public class PersionController extends BaseController
|
|||
/**
|
||||
* 获取人员信息详细信息
|
||||
*/
|
||||
@GetMapping(value = "/{id}")
|
||||
public String getInfo(@PathVariable("id") int id)
|
||||
@GetMapping(value = "/getInfo")
|
||||
public String getInfo(int id)
|
||||
{
|
||||
Persion persion = persionService.selectPersionById(id);
|
||||
return JSONObject.toJSONString(persion);
|
||||
|
@ -74,7 +72,7 @@ public class PersionController extends BaseController
|
|||
* 删除人员信息
|
||||
*/
|
||||
@GetMapping(value = "/remove")
|
||||
public String remove(@PathVariable int[] ids)
|
||||
public String remove(int[] ids)
|
||||
{
|
||||
AjaxResult ajaxResult = toAjax(persionService.deletePersionByIds(ids));
|
||||
return JSONObject.toJSONString(ajaxResult);
|
||||
|
|
|
@ -7,7 +7,6 @@ import com.hbt.safety.supervision.pojo.RiskArea;
|
|||
import com.hbt.safety.supervision.service.IRiskAreaService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
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;
|
||||
|
@ -19,7 +18,6 @@ import com.hbt.common.core.web.page.TableDataInfo;
|
|||
* 风险区域Controller
|
||||
*
|
||||
* @author 张雨
|
||||
* @date 2023-02-14
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/area")
|
||||
|
@ -44,8 +42,8 @@ public class RiskAreaController extends BaseController
|
|||
/**
|
||||
* 获取风险区域详细信息
|
||||
*/
|
||||
@GetMapping(value = "/{id}")
|
||||
public String getInfo(@PathVariable("id") int id)
|
||||
@GetMapping(value = "/getInfo")
|
||||
public String getInfo(int id)
|
||||
{
|
||||
AjaxResult ajaxResult = success(riskAreaService.selectRiskAreaById(id));
|
||||
return JSONObject.toJSONString(ajaxResult);
|
||||
|
@ -75,7 +73,7 @@ public class RiskAreaController extends BaseController
|
|||
* 删除风险区域
|
||||
*/
|
||||
@GetMapping(value = "/remove")
|
||||
public String remove(@PathVariable int[] ids)
|
||||
public String remove(int[] ids)
|
||||
{
|
||||
AjaxResult ajaxResult = toAjax(riskAreaService.deleteRiskAreaByIds(ids));
|
||||
return JSONObject.toJSONString(ajaxResult);
|
||||
|
|
|
@ -6,7 +6,6 @@ import com.alibaba.fastjson.JSONObject;
|
|||
import com.hbt.safety.supervision.pojo.Risk;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
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;
|
||||
|
@ -19,7 +18,6 @@ import com.hbt.common.core.web.page.TableDataInfo;
|
|||
* 风险Controller
|
||||
*
|
||||
* @author 张雨
|
||||
* @date 2023-02-14
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/risk")
|
||||
|
@ -43,8 +41,8 @@ public class RiskController extends BaseController
|
|||
/**
|
||||
* 获取风险详细信息
|
||||
*/
|
||||
@GetMapping(value = "/{id}")
|
||||
public String getInfo(@PathVariable("id") int id)
|
||||
@GetMapping(value = "/getInfo")
|
||||
public String getInfo(int id)
|
||||
{
|
||||
AjaxResult ajaxResult = success(riskService.selectRiskById(id));
|
||||
return JSONObject.toJSONString(ajaxResult);
|
||||
|
@ -73,8 +71,8 @@ public class RiskController extends BaseController
|
|||
/**
|
||||
* 删除风险
|
||||
*/
|
||||
@GetMapping("/{ids}")
|
||||
public String remove(@PathVariable int[] ids)
|
||||
@GetMapping("/remove")
|
||||
public String remove(int[] ids)
|
||||
{
|
||||
AjaxResult ajaxResult = toAjax(riskService.deleteRiskByIds(ids));
|
||||
return JSONObject.toJSONString(ajaxResult);
|
||||
|
@ -82,10 +80,27 @@ public class RiskController extends BaseController
|
|||
|
||||
/**
|
||||
* 风险统计
|
||||
* @return
|
||||
* @return 统计信息
|
||||
*/
|
||||
@GetMapping("/riskStatistics")
|
||||
public String riskStatistics() {
|
||||
return riskService.riskStatistics();
|
||||
}
|
||||
|
||||
/**
|
||||
* 风险管控数据统计
|
||||
*/
|
||||
@GetMapping("/riskManagementAndControlStatistics")
|
||||
public String riskManagementAndControlStatistics() {
|
||||
return riskService.riskManagementAndControlStatistics();
|
||||
}
|
||||
|
||||
/**
|
||||
* 风险项每周数量统计
|
||||
*/
|
||||
@GetMapping("/weeklyQuantityStatistics")
|
||||
public String weeklyQuantityStatistics() {
|
||||
return riskService.weeklyQuantityStatistics();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -9,7 +9,6 @@ import com.hbt.safety.supervision.pojo.EnterpriseInfomation;
|
|||
* 企业信息Mapper接口
|
||||
*
|
||||
* @author zhangyu
|
||||
* @date 2023-02-14
|
||||
*/
|
||||
public interface EnterpriseInfomationMapper
|
||||
{
|
||||
|
@ -68,9 +67,24 @@ public interface EnterpriseInfomationMapper
|
|||
*/
|
||||
List<EnterpriseInfomation> selectEnterpriseInfomations();
|
||||
|
||||
/**
|
||||
* 在管企业分类统计
|
||||
*
|
||||
* @return 统计信息
|
||||
*/
|
||||
List<Map<Object, Object>> enterpriseStatistics();
|
||||
|
||||
/**
|
||||
* 获取在管企业数量
|
||||
*
|
||||
* @return 在管企业数量
|
||||
*/
|
||||
int getEnterpriseCount();
|
||||
|
||||
/**
|
||||
* 获取在管车辆
|
||||
*
|
||||
* @return 在管车辆
|
||||
*/
|
||||
int getCarCount();
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@ package com.hbt.safety.supervision.mapper;
|
|||
import java.util.List;
|
||||
|
||||
import com.hbt.safety.supervision.pojo.EscalateHiddenDanger;
|
||||
import com.hbt.safety.supervision.pojo.HiddenDanger;
|
||||
|
||||
/**
|
||||
* 上报隐患Mapper接口
|
||||
|
@ -18,7 +19,7 @@ public interface EscalateHiddenDangerMapper
|
|||
* @param id 上报隐患主键
|
||||
* @return 上报隐患
|
||||
*/
|
||||
EscalateHiddenDanger selectEscalateHiddenDangerById(int id);
|
||||
HiddenDanger selectEscalateHiddenDangerById(int id);
|
||||
|
||||
/**
|
||||
* 查询上报隐患列表
|
||||
|
@ -60,7 +61,10 @@ public interface EscalateHiddenDangerMapper
|
|||
*/
|
||||
int deleteEscalateHiddenDangerByIds(int[] ids);
|
||||
|
||||
int getTotalEscalateHiddenDanger();
|
||||
|
||||
/**
|
||||
* 获取上报隐患id集合
|
||||
*
|
||||
* @return 上报隐患id集合
|
||||
*/
|
||||
List<String> getEscalateHiddenDangerIds();
|
||||
}
|
||||
|
|
|
@ -22,10 +22,9 @@ public interface EscalateRiskMapper
|
|||
/**
|
||||
* 查询上报风险列表
|
||||
*
|
||||
* @param escalateRisk 上报风险
|
||||
* @return 上报风险集合
|
||||
*/
|
||||
List<EscalateRisk> selectEscalateRiskList(EscalateRisk escalateRisk);
|
||||
List<EscalateRisk> selectEscalateRiskList();
|
||||
|
||||
/**
|
||||
* 新增上报风险
|
||||
|
@ -59,5 +58,9 @@ public interface EscalateRiskMapper
|
|||
*/
|
||||
int deleteEscalateRiskByIds(int[] ids);
|
||||
|
||||
/**
|
||||
* 查询上报风险id集合
|
||||
* @return 上报风险id集合
|
||||
*/
|
||||
List<String> getEscalateRiskIds();
|
||||
}
|
||||
|
|
|
@ -23,10 +23,9 @@ public interface HazardousOperationMapper
|
|||
/**
|
||||
* 查询危险作业列表
|
||||
*
|
||||
* @param hazardousOperation 危险作业
|
||||
* @return 危险作业集合
|
||||
*/
|
||||
List<HazardousOperation> selectHazardousOperationList(HazardousOperation hazardousOperation);
|
||||
List<HazardousOperation> selectHazardousOperationList();
|
||||
|
||||
/**
|
||||
* 新增危险作业
|
||||
|
@ -64,6 +63,12 @@ public interface HazardousOperationMapper
|
|||
* 查询统计所需数据
|
||||
* @return
|
||||
*/
|
||||
|
||||
List<HazardousOperation> selectHazardousOperations();
|
||||
|
||||
/**
|
||||
* 查询危险作业管理信息
|
||||
*
|
||||
* @return 危险作业管理信息
|
||||
*/
|
||||
List<HazardousOperation> hazardousOperationManagement();
|
||||
}
|
||||
|
|
|
@ -60,5 +60,16 @@ public interface HiddenDangerMapper
|
|||
*/
|
||||
int deleteHiddenDangerByIds(int[] ids);
|
||||
|
||||
/**
|
||||
* 隐患信息列表
|
||||
*/
|
||||
List<HiddenDanger> selectHiddenDangers();
|
||||
|
||||
/**
|
||||
* 查询所有上报时间对应的周数
|
||||
*
|
||||
* @param year 当前年份
|
||||
* @return 返回值
|
||||
*/
|
||||
List<Integer> selectHiddenDangerSubmitDats(int year);
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ public interface LawEnforcementInspectionMapper
|
|||
* @param lawEnforcementInspection 执法巡查
|
||||
* @return 执法巡查集合
|
||||
*/
|
||||
List<LawEnforcementInspection> selectLawEnforcementInspectionList(LawEnforcementInspection lawEnforcementInspection);
|
||||
List<LawEnforcementInspection> selectLawEnforcementInspectionList();
|
||||
|
||||
/**
|
||||
* 新增执法巡查
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package com.hbt.safety.supervision.mapper;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
@ -63,7 +64,26 @@ public interface RiskMapper
|
|||
*/
|
||||
int deleteRiskByIds(int[] ids);
|
||||
|
||||
/**
|
||||
* 查询风险统计
|
||||
*
|
||||
* @return 返回值
|
||||
*/
|
||||
List<Map<Object, Object>> riskStatistics();
|
||||
|
||||
/**
|
||||
* 查询风险列表
|
||||
*
|
||||
* @return 返回值
|
||||
*/
|
||||
List<Risk> selectRisks();
|
||||
|
||||
/**
|
||||
* 查询所有上报时间对应的周数
|
||||
*
|
||||
* @param year 当前年份
|
||||
* @return 返回值
|
||||
*/
|
||||
List<Integer> selectRiskSubmitDats(int year);
|
||||
|
||||
}
|
||||
|
|
|
@ -57,6 +57,9 @@ public class HazardousOperation extends BaseEntity
|
|||
@Excel(name = "作业结束时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date operationEnd;
|
||||
|
||||
/** 作业地点 */
|
||||
private String operationSite;
|
||||
|
||||
public void setId(int id)
|
||||
{
|
||||
this.id = id;
|
||||
|
@ -147,6 +150,14 @@ public class HazardousOperation extends BaseEntity
|
|||
this.operationLevel = operationLevel;
|
||||
}
|
||||
|
||||
public String getOperationSite() {
|
||||
return operationSite;
|
||||
}
|
||||
|
||||
public void setOperationSite(String operationSite) {
|
||||
this.operationSite = operationSite;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "HazardousOperation{" +
|
||||
|
@ -160,6 +171,7 @@ public class HazardousOperation extends BaseEntity
|
|||
", operationType=" + operationType +
|
||||
", operationStart=" + operationStart +
|
||||
", operationEnd=" + operationEnd +
|
||||
", operationSite='" + operationSite + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,6 +32,9 @@ public class HiddenDanger extends BaseEntity
|
|||
@Excel(name = "风险表id")
|
||||
private int riskId;
|
||||
|
||||
/** 风险名称 */
|
||||
private String riskName;
|
||||
|
||||
/** 上报日期 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "上报日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
|
@ -56,14 +59,20 @@ public class HiddenDanger extends BaseEntity
|
|||
@Excel(name = "超期状态")
|
||||
private int exceedTimeLimitStatus;
|
||||
|
||||
/** 企业id */
|
||||
@Excel(name = "企业id")
|
||||
/** 责任企业id */
|
||||
@Excel(name = "责任企业id")
|
||||
private int enterpriseId;
|
||||
|
||||
/** 责任企业 */
|
||||
private String enterprise;
|
||||
|
||||
/** 责任人id */
|
||||
@Excel(name = "责任人id")
|
||||
private int personId;
|
||||
|
||||
/** 责任人 */
|
||||
private String person;
|
||||
|
||||
/** 备注 */
|
||||
@Excel(name = "备注")
|
||||
private String remarks;
|
||||
|
@ -198,6 +207,30 @@ public class HiddenDanger extends BaseEntity
|
|||
this.submitEnterpriseId = submitEnterpriseId;
|
||||
}
|
||||
|
||||
public String getRiskName() {
|
||||
return riskName;
|
||||
}
|
||||
|
||||
public void setRiskName(String riskName) {
|
||||
this.riskName = riskName;
|
||||
}
|
||||
|
||||
public String getEnterprise() {
|
||||
return enterprise;
|
||||
}
|
||||
|
||||
public void setEnterprise(String enterprise) {
|
||||
this.enterprise = enterprise;
|
||||
}
|
||||
|
||||
public String getPerson() {
|
||||
return person;
|
||||
}
|
||||
|
||||
public void setPerson(String person) {
|
||||
this.person = person;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "HiddenDanger{" +
|
||||
|
@ -205,14 +238,17 @@ public class HiddenDanger extends BaseEntity
|
|||
", name='" + name + '\'' +
|
||||
", details='" + details + '\'' +
|
||||
", riskId=" + riskId +
|
||||
", riskName='" + riskName + '\'' +
|
||||
", submitDate=" + submitDate +
|
||||
", submitPersonId=" + submitPersonId +
|
||||
", submitEnterpriseId=" + submitEnterpriseId +
|
||||
", reformMeasures='" + reformMeasures + '\'' +
|
||||
", reformStatus=" + reformStatus +
|
||||
", reformStatus='" + reformStatus + '\'' +
|
||||
", exceedTimeLimitStatus=" + exceedTimeLimitStatus +
|
||||
", enterpriseId=" + enterpriseId +
|
||||
", enterprise='" + enterprise + '\'' +
|
||||
", personId=" + personId +
|
||||
", person='" + person + '\'' +
|
||||
", remarks='" + remarks + '\'' +
|
||||
", rectificationPeriod='" + rectificationPeriod + '\'' +
|
||||
'}';
|
||||
|
|
|
@ -4,14 +4,11 @@ import java.util.Date;
|
|||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.hbt.common.core.annotation.Excel;
|
||||
import com.hbt.common.core.web.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
/**
|
||||
* 执法巡查对象 law_enforcement_inspection
|
||||
*
|
||||
* @author zhangyu
|
||||
* @date 2023-02-14
|
||||
*/
|
||||
public class LawEnforcementInspection extends BaseEntity
|
||||
{
|
||||
|
@ -25,9 +22,9 @@ public class LawEnforcementInspection extends BaseEntity
|
|||
@Excel(name = "巡查日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date inspectionDate;
|
||||
|
||||
/** 巡查人员id */
|
||||
@Excel(name = "巡查人员id")
|
||||
private int persionId;
|
||||
/** 巡查人员 */
|
||||
@Excel(name = "巡查人员")
|
||||
private String persion;
|
||||
|
||||
/** 巡查名称 */
|
||||
@Excel(name = "巡查名称")
|
||||
|
@ -37,6 +34,12 @@ public class LawEnforcementInspection extends BaseEntity
|
|||
@Excel(name = "备注")
|
||||
private String remarks;
|
||||
|
||||
/** 上报隐患id */
|
||||
private int hiddenDangerId;
|
||||
|
||||
/** 上报风险id */
|
||||
private int riskId;
|
||||
|
||||
public void setId(int id)
|
||||
{
|
||||
this.id = id;
|
||||
|
@ -55,14 +58,14 @@ public class LawEnforcementInspection extends BaseEntity
|
|||
{
|
||||
return inspectionDate;
|
||||
}
|
||||
public void setPersionId(int persionId)
|
||||
public void setPersionId(String persion)
|
||||
{
|
||||
this.persionId = persionId;
|
||||
this.persion = persion;
|
||||
}
|
||||
|
||||
public int getPersionId()
|
||||
public String getPersionId()
|
||||
{
|
||||
return persionId;
|
||||
return persion;
|
||||
}
|
||||
public void setName(String name)
|
||||
{
|
||||
|
@ -83,14 +86,40 @@ public class LawEnforcementInspection extends BaseEntity
|
|||
return remarks;
|
||||
}
|
||||
|
||||
public String getPersion() {
|
||||
return persion;
|
||||
}
|
||||
|
||||
public void setPersion(String persion) {
|
||||
this.persion = persion;
|
||||
}
|
||||
|
||||
public int getHiddenDangerId() {
|
||||
return hiddenDangerId;
|
||||
}
|
||||
|
||||
public void setHiddenDangerId(int hiddenDangerId) {
|
||||
this.hiddenDangerId = hiddenDangerId;
|
||||
}
|
||||
|
||||
public int getRiskId() {
|
||||
return riskId;
|
||||
}
|
||||
|
||||
public void setRiskId(int riskId) {
|
||||
this.riskId = riskId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("inspectionDate", getInspectionDate())
|
||||
.append("persionId", getPersionId())
|
||||
.append("name", getName())
|
||||
.append("remarks", getRemarks())
|
||||
.toString();
|
||||
return "LawEnforcementInspection{" +
|
||||
"id=" + id +
|
||||
", inspectionDate=" + inspectionDate +
|
||||
", persion='" + persion + '\'' +
|
||||
", name='" + name + '\'' +
|
||||
", remarks='" + remarks + '\'' +
|
||||
", hiddenDangerId=" + hiddenDangerId +
|
||||
", riskId=" + riskId +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
|
|
@ -40,14 +40,21 @@ public class Risk extends BaseEntity
|
|||
@Excel(name = "风险等级")
|
||||
private int level;
|
||||
|
||||
/** 企业id */
|
||||
/** 责任企业id */
|
||||
@Excel(name = "企业id")
|
||||
private int enterpriseId;
|
||||
|
||||
/** 责任企业 */
|
||||
private String enterprise;
|
||||
|
||||
/** 责任人id */
|
||||
@Excel(name = "责任人id")
|
||||
private int responsiblePersonId;
|
||||
|
||||
/** 责任人id */
|
||||
@Excel(name = "责任人")
|
||||
private String responsiblePerson;
|
||||
|
||||
/** 风险管控措施 */
|
||||
@Excel(name = "风险管控措施")
|
||||
private String riskControlMeasures;
|
||||
|
@ -61,6 +68,13 @@ public class Risk extends BaseEntity
|
|||
@Excel(name = "重大危险源id")
|
||||
private int majorHazardSourcesId;
|
||||
|
||||
/** 上报时间 */
|
||||
private Date submitDate;
|
||||
|
||||
/** 上报人id */
|
||||
private int submitPersonId;
|
||||
|
||||
|
||||
public void setId(int id)
|
||||
{
|
||||
this.id = id;
|
||||
|
@ -161,20 +175,57 @@ public class Risk extends BaseEntity
|
|||
return majorHazardSourcesId;
|
||||
}
|
||||
|
||||
public String getEnterprise() {
|
||||
return enterprise;
|
||||
}
|
||||
|
||||
public void setEnterprise(String enterprise) {
|
||||
this.enterprise = enterprise;
|
||||
}
|
||||
|
||||
public String getResponsiblePerson() {
|
||||
return responsiblePerson;
|
||||
}
|
||||
|
||||
public void setResponsiblePerson(String responsiblePerson) {
|
||||
this.responsiblePerson = responsiblePerson;
|
||||
}
|
||||
|
||||
public Date getSubmitDate() {
|
||||
return submitDate;
|
||||
}
|
||||
|
||||
public void setSubmitDate(Date submitDate) {
|
||||
this.submitDate = submitDate;
|
||||
}
|
||||
|
||||
public int getSubmitPersonId() {
|
||||
return submitPersonId;
|
||||
}
|
||||
|
||||
public void setSubmitPersonId(int submitPersonId) {
|
||||
this.submitPersonId = submitPersonId;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("name", getName())
|
||||
.append("riskProbability", getRiskProbability())
|
||||
.append("riskFactor", getRiskFactor())
|
||||
.append("affectConsequences", getAffectConsequences())
|
||||
.append("level", getLevel())
|
||||
.append("enterpriseId", getEnterpriseId())
|
||||
.append("responsiblePersonId", getResponsiblePersonId())
|
||||
.append("riskControlMeasures", getRiskControlMeasures())
|
||||
.append("lastReviewDate", getLastReviewDate())
|
||||
.append("majorHazardSourcesId", getMajorHazardSourcesId())
|
||||
.toString();
|
||||
return "Risk{" +
|
||||
"id=" + id +
|
||||
", name='" + name + '\'' +
|
||||
", riskProbability='" + riskProbability + '\'' +
|
||||
", riskFactor='" + riskFactor + '\'' +
|
||||
", affectConsequences='" + affectConsequences + '\'' +
|
||||
", level=" + level +
|
||||
", enterpriseId=" + enterpriseId +
|
||||
", enterprise='" + enterprise + '\'' +
|
||||
", responsiblePersonId=" + responsiblePersonId +
|
||||
", responsiblePerson='" + responsiblePerson + '\'' +
|
||||
", riskControlMeasures='" + riskControlMeasures + '\'' +
|
||||
", lastReviewDate=" + lastReviewDate +
|
||||
", majorHazardSourcesId=" + majorHazardSourcesId +
|
||||
", submitDate=" + submitDate +
|
||||
", submitPersonId=" + submitPersonId +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
|
|
@ -60,5 +60,10 @@ public interface IEnterpriseInfomationService
|
|||
*/
|
||||
int deleteEnterpriseInfomationById(int id);
|
||||
|
||||
/**
|
||||
* 在管企业分类统计
|
||||
*
|
||||
* @return 统计信息
|
||||
*/
|
||||
String enterpriseStatistics();
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@ package com.hbt.safety.supervision.service;
|
|||
import java.util.List;
|
||||
|
||||
import com.hbt.safety.supervision.pojo.EscalateHiddenDanger;
|
||||
import com.hbt.safety.supervision.pojo.HiddenDanger;
|
||||
|
||||
/**
|
||||
* 上报隐患Service接口
|
||||
|
@ -18,7 +19,7 @@ public interface IEscalateHiddenDangerService
|
|||
* @param id 上报隐患主键
|
||||
* @return 上报隐患
|
||||
*/
|
||||
EscalateHiddenDanger selectEscalateHiddenDangerById(int id);
|
||||
HiddenDanger selectEscalateHiddenDangerById(int id);
|
||||
|
||||
/**
|
||||
* 查询上报隐患列表
|
||||
|
|
|
@ -26,7 +26,7 @@ public interface IEscalateRiskService
|
|||
* @param escalateRisk 上报风险
|
||||
* @return 上报风险集合
|
||||
*/
|
||||
List<EscalateRisk> selectEscalateRiskList(EscalateRisk escalateRisk);
|
||||
List<EscalateRisk> selectEscalateRiskList();
|
||||
|
||||
/**
|
||||
* 新增上报风险
|
||||
|
|
|
@ -26,7 +26,7 @@ public interface IHazardousOperationService
|
|||
* @param hazardousOperation 危险作业
|
||||
* @return 危险作业集合
|
||||
*/
|
||||
List<HazardousOperation> selectHazardousOperationList(HazardousOperation hazardousOperation);
|
||||
List<HazardousOperation> selectHazardousOperationList();
|
||||
|
||||
/**
|
||||
* 新增危险作业
|
||||
|
@ -61,4 +61,6 @@ public interface IHazardousOperationService
|
|||
int deleteHazardousOperationById(int id);
|
||||
|
||||
String hazardousOperationStatistics();
|
||||
|
||||
String hazardousOperationManagement();
|
||||
}
|
||||
|
|
|
@ -60,5 +60,24 @@ public interface IHiddenDangerService
|
|||
*/
|
||||
int deleteHiddenDangerById(int id);
|
||||
|
||||
/**
|
||||
* 隐患统计
|
||||
*
|
||||
* @return 返回值
|
||||
*/
|
||||
String hiddenDangerStatistics();
|
||||
|
||||
/**
|
||||
* 隐患治理统计
|
||||
*
|
||||
* @return 返回值
|
||||
*/
|
||||
String hiddenDangerManagement();
|
||||
|
||||
/**
|
||||
* 隐患每周数量统计
|
||||
*
|
||||
* @return 返回值
|
||||
*/
|
||||
String hiddenDangerWeeklyStatistics();
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ public interface ILawEnforcementInspectionService
|
|||
* @param lawEnforcementInspection 执法巡查
|
||||
* @return 执法巡查集合
|
||||
*/
|
||||
List<LawEnforcementInspection> selectLawEnforcementInspectionList(LawEnforcementInspection lawEnforcementInspection);
|
||||
List<LawEnforcementInspection> selectLawEnforcementInspectionList();
|
||||
|
||||
/**
|
||||
* 新增执法巡查
|
||||
|
|
|
@ -60,5 +60,24 @@ public interface IRiskService
|
|||
*/
|
||||
int deleteRiskById(int id);
|
||||
|
||||
/**
|
||||
* 风险统计
|
||||
*
|
||||
* @return 返回值
|
||||
*/
|
||||
String riskStatistics();
|
||||
|
||||
/**
|
||||
* 风险管控数据统计
|
||||
*
|
||||
* @return 返回值
|
||||
*/
|
||||
String riskManagementAndControlStatistics();
|
||||
|
||||
/**
|
||||
* 风险项每周数量统计
|
||||
*
|
||||
* @return 返回值
|
||||
*/
|
||||
String weeklyQuantityStatistics();
|
||||
}
|
||||
|
|
|
@ -99,6 +99,11 @@ public class EnterpriseInfomationServiceImpl implements IEnterpriseInfomationSer
|
|||
return enterpriseInfomationMapper.deleteEnterpriseInfomationById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 在管企业分类统计
|
||||
*
|
||||
* @return 统计信息
|
||||
*/
|
||||
@Override
|
||||
public String enterpriseStatistics() {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
|
|
|
@ -4,6 +4,7 @@ import java.util.List;
|
|||
|
||||
import com.hbt.safety.supervision.mapper.EscalateHiddenDangerMapper;
|
||||
import com.hbt.safety.supervision.pojo.EscalateHiddenDanger;
|
||||
import com.hbt.safety.supervision.pojo.HiddenDanger;
|
||||
import com.hbt.safety.supervision.service.IEscalateHiddenDangerService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
@ -27,7 +28,7 @@ public class EscalateHiddenDangerServiceImpl implements IEscalateHiddenDangerSer
|
|||
* @return 上报隐患
|
||||
*/
|
||||
@Override
|
||||
public EscalateHiddenDanger selectEscalateHiddenDangerById(int id)
|
||||
public HiddenDanger selectEscalateHiddenDangerById(int id)
|
||||
{
|
||||
return escalateHiddenDangerMapper.selectEscalateHiddenDangerById(id);
|
||||
}
|
||||
|
|
|
@ -39,9 +39,9 @@ public class EscalateRiskServiceImpl implements IEscalateRiskService
|
|||
* @return 上报风险
|
||||
*/
|
||||
@Override
|
||||
public List<EscalateRisk> selectEscalateRiskList(EscalateRisk escalateRisk)
|
||||
public List<EscalateRisk> selectEscalateRiskList()
|
||||
{
|
||||
return escalateRiskMapper.selectEscalateRiskList(escalateRisk);
|
||||
return escalateRiskMapper.selectEscalateRiskList();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -41,9 +41,9 @@ public class HazardousOperationServiceImpl implements IHazardousOperationService
|
|||
* @return 危险作业
|
||||
*/
|
||||
@Override
|
||||
public List<HazardousOperation> selectHazardousOperationList(HazardousOperation hazardousOperation)
|
||||
public List<HazardousOperation> selectHazardousOperationList()
|
||||
{
|
||||
return hazardousOperationMapper.selectHazardousOperationList(hazardousOperation);
|
||||
return hazardousOperationMapper.selectHazardousOperationList();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -144,4 +144,36 @@ public class HazardousOperationServiceImpl implements IHazardousOperationService
|
|||
map.put("historyHazardousOperation", historyHazardousOperation);
|
||||
return JSONObject.toJSONString(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String hazardousOperationManagement() {
|
||||
// 获取当前时间
|
||||
Date date = new Date();
|
||||
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
|
||||
// 查询危险作业信息
|
||||
List<HazardousOperation> list = hazardousOperationMapper.hazardousOperationManagement();
|
||||
if (list == null) {
|
||||
return "";
|
||||
}
|
||||
|
||||
// 进行中的危险作业
|
||||
List<HazardousOperation> hazardousOperations = list.stream()
|
||||
.filter(s -> s.getOperationStart().before(date) && s.getOperationEnd().after(date))
|
||||
.collect(Collectors.toList());
|
||||
map.put("underwayHazardousOperation", hazardousOperations);
|
||||
|
||||
|
||||
// 待开始危险作业
|
||||
List<HazardousOperation> toBeStarted = list.stream()
|
||||
.filter(s -> s.getOperationStart().after(date)).collect(Collectors.toList());
|
||||
map.put("toBeStarted", toBeStarted);
|
||||
|
||||
// 历史危险作业
|
||||
List<HazardousOperation> historyHazardousOperation = list.stream()
|
||||
.filter(s -> s.getOperationEnd().before(date)).collect(Collectors.toList());
|
||||
map.put("historyHazardousOperation", historyHazardousOperation);
|
||||
return JSONObject.toJSONString(map);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,6 +9,7 @@ import com.alibaba.fastjson.JSONObject;
|
|||
import com.hbt.safety.supervision.mapper.HiddenDangerMapper;
|
||||
import com.hbt.safety.supervision.pojo.HiddenDanger;
|
||||
import com.hbt.safety.supervision.service.IHiddenDangerService;
|
||||
import com.hbt.safety.supervision.util.YearWeeksUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
|
@ -95,6 +96,9 @@ public class HiddenDangerServiceImpl implements IHiddenDangerService
|
|||
return hiddenDangerMapper.deleteHiddenDangerById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 隐患统计信息
|
||||
*/
|
||||
public String hiddenDangerStatistics() {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
|
||||
|
@ -112,4 +116,31 @@ public class HiddenDangerServiceImpl implements IHiddenDangerService
|
|||
map.put("hiddenDangerList", hiddenDangerList);
|
||||
return JSONObject.toJSONString(map);
|
||||
}
|
||||
|
||||
/**
|
||||
* 隐患治理统计信息
|
||||
*/
|
||||
@Override
|
||||
public String hiddenDangerManagement() {
|
||||
List<HiddenDanger> list = hiddenDangerMapper.selectHiddenDangers();
|
||||
if (list == null) {
|
||||
return "";
|
||||
}
|
||||
Map<Object, List<HiddenDanger>> hiddenDangerMap = list.stream()
|
||||
.collect(Collectors.groupingBy(HiddenDanger::getReformStatus));
|
||||
return JSONObject.toJSONString(hiddenDangerMap);
|
||||
}
|
||||
|
||||
/**
|
||||
* 隐患每周数量统计
|
||||
*
|
||||
* @return 返回值
|
||||
*/
|
||||
public String hiddenDangerWeeklyStatistics() {
|
||||
// 获取当前年份
|
||||
int year = YearWeeksUtil.getCurrentYear();
|
||||
List<Integer> list = hiddenDangerMapper.selectHiddenDangerSubmitDats(year);
|
||||
// 处理数据
|
||||
return YearWeeksUtil.dealWeekDate(list, year);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,6 +13,7 @@ import com.hbt.safety.supervision.mapper.LawEnforcementInspectionMapper;
|
|||
import com.hbt.safety.supervision.pojo.LawEnforcementInspection;
|
||||
import com.hbt.safety.supervision.pojo.vo.LawEnforcementInspectionStatics;
|
||||
import com.hbt.safety.supervision.pojo.vo.LawEnforcementInspectionVo;
|
||||
import com.hbt.safety.supervision.util.YearWeeksUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.hbt.safety.supervision.service.ILawEnforcementInspectionService;
|
||||
|
@ -54,9 +55,9 @@ public class LawEnforcementInspectionServiceImpl implements ILawEnforcementInspe
|
|||
* @return 执法巡查
|
||||
*/
|
||||
@Override
|
||||
public List<LawEnforcementInspection> selectLawEnforcementInspectionList(LawEnforcementInspection lawEnforcementInspection)
|
||||
public List<LawEnforcementInspection> selectLawEnforcementInspectionList()
|
||||
{
|
||||
return lawEnforcementInspectionMapper.selectLawEnforcementInspectionList(lawEnforcementInspection);
|
||||
return lawEnforcementInspectionMapper.selectLawEnforcementInspectionList();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -112,8 +113,7 @@ public class LawEnforcementInspectionServiceImpl implements ILawEnforcementInspe
|
|||
List<LawEnforcementInspectionStatics> list = new ArrayList<>();
|
||||
|
||||
// 获取当前年份
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
int year = calendar.get(Calendar.YEAR);
|
||||
int year = YearWeeksUtil.getCurrentYear();
|
||||
// 查询巡查列表
|
||||
List<LawEnforcementInspectionVo> lawList = lawEnforcementInspectionMapper.selectLawEnforcementInspections(year);
|
||||
if (lawList == null) {
|
||||
|
|
|
@ -1,12 +1,16 @@
|
|||
package com.hbt.safety.supervision.service.impl;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hbt.safety.supervision.mapper.RiskMapper;
|
||||
import com.hbt.safety.supervision.pojo.Risk;
|
||||
import com.hbt.safety.supervision.service.IRiskService;
|
||||
import com.hbt.safety.supervision.util.YearWeeksUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
|
@ -98,4 +102,27 @@ public class RiskServiceImpl implements IRiskService
|
|||
List<Map<Object, Object>> map = riskMapper.riskStatistics();
|
||||
return JSONObject.toJSONString(map);
|
||||
}
|
||||
|
||||
/**
|
||||
* 风险管控数据统计
|
||||
*/
|
||||
public String riskManagementAndControlStatistics() {
|
||||
List<Risk> list = riskMapper.selectRisks();
|
||||
if (list == null) {
|
||||
return "";
|
||||
}
|
||||
Map<Object, List<Risk>> map = list.stream().collect(Collectors.groupingBy(s -> s.getLevel()));
|
||||
return JSONObject.toJSONString(map);
|
||||
}
|
||||
|
||||
/**
|
||||
* 风险项每周数量统计
|
||||
*/
|
||||
public String weeklyQuantityStatistics() {
|
||||
// 获取当前年份
|
||||
int year = YearWeeksUtil.getCurrentYear();
|
||||
List<Integer> list = riskMapper.selectRiskSubmitDats(year);
|
||||
// 处理数据
|
||||
return YearWeeksUtil.dealWeekDate(list, year);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,91 @@
|
|||
package com.hbt.safety.supervision.util;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 时间工具类
|
||||
*/
|
||||
public class YearWeeksUtil {
|
||||
|
||||
/**
|
||||
* 获取当前年
|
||||
*
|
||||
* @return 年份
|
||||
*/
|
||||
public static int getCurrentYear() {
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
int weekYear = calendar.get(Calendar.YEAR);//获得当前的年
|
||||
return weekYear;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取某年某周的时间跨度
|
||||
* @param year
|
||||
* @param week
|
||||
* @return
|
||||
*/
|
||||
public static Map<String, String> getWeekRangeMap(int year, int week) {
|
||||
Map<String, String> timeMap = new HashMap<>();
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.set(Calendar.YEAR,year);
|
||||
calendar.setFirstDayOfWeek(Calendar.MONDAY);//设置星期一为一周开始的第一天
|
||||
calendar.setMinimalDaysInFirstWeek(4);//可以不用设置
|
||||
int weekYear = calendar.get(Calendar.YEAR);//获得当前的年
|
||||
calendar.setWeekDate(weekYear, week, 2);//获得指定年的第几周的开始日期
|
||||
Date time=calendar.getTime();
|
||||
String startTime = new SimpleDateFormat("yyyy-MM-dd").format(time)+" 00:00:00";
|
||||
timeMap.put("startTime",startTime);
|
||||
calendar.setWeekDate(weekYear, week, 1);//获得指定年的第几周的结束日期
|
||||
time=calendar.getTime();
|
||||
String endTime = new SimpleDateFormat("yyyy-MM-dd").format(time)+" 23:59:59";
|
||||
timeMap.put("endTime",endTime);
|
||||
return timeMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取某年有多少周
|
||||
*
|
||||
* @param year 年份
|
||||
* @return 一年的周数
|
||||
* @throws ParseException
|
||||
*/
|
||||
public static int getYearWeekConut(int year){
|
||||
int week = 52;
|
||||
try {
|
||||
Map<String, String> timeMap = getWeekRangeMap(year,53);
|
||||
if(!CollectionUtils.isEmpty(timeMap)){
|
||||
String startTime = timeMap.get("startTime");
|
||||
if(startTime.substring(0, 4).equals(year+"")){ //判断年度是否相符,如果相符说明有53个周。
|
||||
week = 53;
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return week;
|
||||
}
|
||||
|
||||
public static String dealWeekDate(List<Integer> list, int year) {
|
||||
Map<Object, List<Integer>> weekList = new HashMap<>();
|
||||
if (list != null) {
|
||||
weekList = list.stream().collect(Collectors.groupingBy(s -> s));
|
||||
}
|
||||
Map<Integer, Integer> weekStatistics = new HashMap<>();
|
||||
// 获取当前年份周数
|
||||
int week = YearWeeksUtil.getYearWeekConut(year);
|
||||
for (int i = 1; i <= week; i++) {
|
||||
if (weekList.containsKey(i)) {
|
||||
weekStatistics.put(i, weekList.get(i).size());
|
||||
} else {
|
||||
weekStatistics.put(i, 0);
|
||||
}
|
||||
}
|
||||
return JSONObject.toJSONString(weekStatistics);
|
||||
}
|
||||
}
|
|
@ -20,9 +20,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectEscalateHiddenDangerById" parameterType="Integer" resultMap="EscalateHiddenDangerResult">
|
||||
<include refid="selectEscalateHiddenDangerVo"/>
|
||||
where id = #{id}
|
||||
<sql id="selectEscalateHiddenDanger">
|
||||
select distinct(h.id) id, h.name name, e.name enterprise
|
||||
from escalate_hidden_danger as a
|
||||
left join hidden_danger as h on a.hidden_danger_id = h.id
|
||||
left join enterprise_infomation as e on h.enterprise_id = e.id
|
||||
</sql>
|
||||
|
||||
<select id="selectEscalateHiddenDangerById" parameterType="Integer" resultType="HiddenDanger">
|
||||
<include refid="selectEscalateHiddenDanger"/>
|
||||
where a.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertEscalateHiddenDanger" parameterType="com.hbt.safety.supervision.pojo.EscalateHiddenDanger">
|
||||
|
|
|
@ -20,9 +20,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</where>
|
||||
</select>
|
||||
|
||||
<sql id="selectEscalateRisk">
|
||||
select distinct(h.id) id, h.name name, e.name enterprise
|
||||
from escalate_risk as a
|
||||
left join risk as h on a.risk_id = h.id
|
||||
left join enterprise_infomation as e on h.enterprise_id = e.id
|
||||
</sql>
|
||||
|
||||
<select id="selectEscalateRiskById" parameterType="Integer" resultMap="EscalateRiskResult">
|
||||
<include refid="selectEscalateRiskVo"/>
|
||||
where id = #{id}
|
||||
<include refid="selectEscalateRisk"/>
|
||||
where a.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertEscalateRisk" parameterType="com.hbt.safety.supervision.pojo.EscalateRisk">
|
||||
|
|
|
@ -15,22 +15,27 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="operationType" column="operation_type" />
|
||||
<result property="operationStart" column="operation_start" />
|
||||
<result property="operationEnd" column="operation_end" />
|
||||
<result property="operationSite" column="operation_site" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectHazardousOperationVo">
|
||||
select id, name, operation_level, enterprise_id, operation_content, operation_longitude, operation_latitude, operation_type, operation_start, operation_end from hazardous_operation
|
||||
select id, name, operation_longitude, operation_latitude, operation_type, operation_start, operation_end, operation_site from hazardous_operation
|
||||
</sql>
|
||||
|
||||
<select id="selectHazardousOperationList" parameterType="com.hbt.safety.supervision.pojo.HazardousOperation" resultMap="HazardousOperationResult">
|
||||
<include refid="selectHazardousOperationVo"/>
|
||||
<where>
|
||||
<if test="id != null "> and id = #{id}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<sql id="selectHazardousOperation">
|
||||
select distinct(a.id) id, a.name name, a.operation_level operationLevel, a.enterprise_id enterpriseId, a.operation_content operationContent, a.operation_type operationType, a.operation_start operationStart, a.operation_end operationEnd,a.operation_site operationSite,
|
||||
e.name
|
||||
from hazardous_operation as a
|
||||
left join enterprise_infomation as e on a.enterprise_id = e.id
|
||||
</sql>
|
||||
|
||||
<select id="selectHazardousOperationById" parameterType="Integer" resultMap="HazardousOperationResult">
|
||||
<include refid="selectHazardousOperationVo"/>
|
||||
where id = #{id}
|
||||
<include refid="selectHazardousOperation"/>
|
||||
where a.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertHazardousOperation" parameterType="com.hbt.safety.supervision.pojo.HazardousOperation">
|
||||
|
@ -46,6 +51,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="operationType != null">operation_type,</if>
|
||||
<if test="operationStart != null">operation_start,</if>
|
||||
<if test="operationEnd != null">operation_end,</if>
|
||||
<if test="operationSite != null">operation_site,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
|
@ -58,6 +64,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="operationType != null">#{operationType},</if>
|
||||
<if test="operationStart != null">#{operationStart},</if>
|
||||
<if test="operationEnd != null">#{operationEnd},</if>
|
||||
<if test="operationSite != null">#{operationSite},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
|
@ -73,6 +80,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="operationType != null">operation_type = #{operationType},</if>
|
||||
<if test="operationStart != null">operation_start = #{operationStart},</if>
|
||||
<if test="operationEnd != null">operation_end = #{operationEnd},</if>
|
||||
<if test="operationSite != null">operation_site = #{operationSite},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
@ -91,4 +99,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<select id="selectHazardousOperations" resultType="com.hbt.safety.supervision.pojo.HazardousOperation">
|
||||
select id,operation_type operationType,operation_start operationStart ,operation_end operationEnd,enterprise_id enterpriseId from hazardous_operation
|
||||
</select>
|
||||
|
||||
<select id="hazardousOperationManagement" resultType="HazardousOperation">
|
||||
select name,operation_start operationStart ,operation_end operationEnd from hazardous_operation
|
||||
</select>
|
||||
</mapper>
|
|
@ -31,9 +31,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectHiddenDangerById" parameterType="Integer" resultMap="HiddenDangerResult">
|
||||
<include refid="selectHiddenDangerVo"/>
|
||||
where id = #{id}
|
||||
<sql id="selectHiddenDanger">
|
||||
select distinct(a.id) id, a.name, a.details, a.risk_id riskId, a.submit_date submitDate, a.reform_measures reformMeasures, a.reform_status reformStatus, a.exceed_time_limit_status exceedTimeLimitStatus, a.enterprise_id enterpriseId, a.person_id personId, a.remarks remarks, a.rectification_period rectificationPeriod,
|
||||
b.name as enterprise,
|
||||
p.name as person,
|
||||
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 risk as r on a.risk_id = r.id
|
||||
</sql>
|
||||
|
||||
<select id="selectHiddenDangerById" parameterType="Integer" resultType="HiddenDanger">
|
||||
<include refid="selectHiddenDanger"/>
|
||||
where a.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertHiddenDanger" parameterType="com.hbt.safety.supervision.pojo.HiddenDanger">
|
||||
|
@ -104,6 +115,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</delete>
|
||||
|
||||
<select id="selectHiddenDangers" resultType="com.hbt.safety.supervision.pojo.HiddenDanger">
|
||||
select reform_status reformStatus from hidden_danger where exceed_time_limit_status = 0
|
||||
select name, reform_status reformStatus from hidden_danger where exceed_time_limit_status = 0
|
||||
</select>
|
||||
|
||||
<select id="selectHiddenDangerSubmitDats" resultType="Integer">
|
||||
select WEEK(submit_date, 1) + 1 from hidden_danger where YEAR(submit_date) = #{year}
|
||||
</select>
|
||||
</mapper>
|
|
@ -7,19 +7,22 @@ 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="persionId" column="persion_id" />
|
||||
<result property="persion" column="persion" />
|
||||
<result property="name" column="name" />
|
||||
<result property="remarks" column="remarks" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectLawEnforcementInspectionVo">
|
||||
select id, inspection_date, persion_id, name, remarks from law_enforcement_inspection
|
||||
select distinct(a.id) id, a.inspection_date, a.inspection_date, a.persion persion, a.name name,
|
||||
b.hidden_danger_id hiddenDangerId,
|
||||
c.risk_id riskId
|
||||
from law_enforcement_inspection as a
|
||||
left join escalate_hidden_danger as b on a.id = b.enforcement_id
|
||||
left join escalate_risk as c on a.id = c.enforcement_id
|
||||
</sql>
|
||||
|
||||
<select id="selectLawEnforcementInspectionList" parameterType="com.hbt.safety.supervision.pojo.LawEnforcementInspection" resultMap="LawEnforcementInspectionResult">
|
||||
<select id="selectLawEnforcementInspectionList" parameterType="com.hbt.safety.supervision.pojo.LawEnforcementInspection" resultType="LawEnforcementInspection">
|
||||
<include refid="selectLawEnforcementInspectionVo"/>
|
||||
<where>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectLawEnforcementInspectionById" parameterType="Integer" resultMap="LawEnforcementInspectionResult">
|
||||
|
@ -32,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="persionId != null">persion_id,</if>
|
||||
<if test="persion != null">persion,</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="persionId != null">#{persionId},</if>
|
||||
<if test="persion != null">#{persion},</if>
|
||||
<if test="name != null">#{name},</if>
|
||||
<if test="remarks != null">#{remarks},</if>
|
||||
</trim>
|
||||
|
@ -49,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="persionId != null">persion_id = #{persionId},</if>
|
||||
<if test="persion != null">persion = #{persion},</if>
|
||||
<if test="name != null">name = #{name},</if>
|
||||
<if test="remarks != null">remarks = #{remarks},</if>
|
||||
</trim>
|
||||
|
|
|
@ -28,9 +28,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectRiskById" parameterType="Integer" resultMap="RiskResult">
|
||||
<include refid="selectRiskVo"/>
|
||||
where id = #{id}
|
||||
|
||||
<sql id="selectRisk">
|
||||
select distinct(a.id) id, a.name name, a.risk_probability riskProbability, a.risk_factor riskFactor, a.affect_consequences affectConsequences, a.level level, a.enterprise_id enterpriseId, a.responsible_person_id responsiblePersonId, a.risk_control_measures riskControlMeasures, a.last_review_date lastReviewDate, a.major_hazard_sources_id majorHazardSourcesId,
|
||||
b.name as enterprise,
|
||||
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
|
||||
</sql>
|
||||
<select id="selectRiskById" parameterType="Integer" resultType="Risk">
|
||||
<include refid="selectRisk"/>
|
||||
where a.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertRisk" parameterType="com.hbt.safety.supervision.pojo.Risk">
|
||||
|
@ -94,4 +103,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<select id="riskStatistics" resultType="java.util.Map">
|
||||
select level as level, count(id) as num from risk group by level
|
||||
</select>
|
||||
|
||||
<select id="selectRisks" resultType="com.hbt.safety.supervision.pojo.Risk">
|
||||
select name, level from risk
|
||||
</select>
|
||||
|
||||
<select id="selectRiskSubmitDats" resultType="Integer">
|
||||
select WEEK(submit_date, 1) + 1 from risk where YEAR(submit_date) = #{year}
|
||||
</select>
|
||||
</mapper>
|
Loading…
Reference in New Issue