From 55b22c9c6541211da73cecb10c1c72ad130d0474 Mon Sep 17 00:00:00 2001 From: wanggeng888 <450292408@qq.com> Date: Tue, 22 Jun 2021 17:21:24 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../apis/check/Check2Controller.java | 135 ++++ .../cm/inspection/dao/check/ICheck2Dao.java | 9 +- .../inspection/pojo/dtos/check/Check2DTO.java | 104 ++++ .../check/CheckSimpleWithEnterpriseDTO.java | 185 +----- .../pojo/dtos/check/CheckV2DTO.java | 427 ------------- .../service/check/ICheck2Service.java | 79 +++ .../service/check/impl/Check2ServiceImpl.java | 63 +- .../mybatis/mapper/check/check2-mapper.xml | 110 ++-- .../static/route/check/list-check2.html | 578 ++++++++++++++++++ 9 files changed, 1019 insertions(+), 671 deletions(-) create mode 100644 src/main/java/com/cm/inspection/controller/apis/check/Check2Controller.java create mode 100644 src/main/java/com/cm/inspection/pojo/dtos/check/Check2DTO.java delete mode 100644 src/main/java/com/cm/inspection/pojo/dtos/check/CheckV2DTO.java create mode 100644 src/main/resources/static/route/check/list-check2.html diff --git a/src/main/java/com/cm/inspection/controller/apis/check/Check2Controller.java b/src/main/java/com/cm/inspection/controller/apis/check/Check2Controller.java new file mode 100644 index 0000000..7b17d73 --- /dev/null +++ b/src/main/java/com/cm/inspection/controller/apis/check/Check2Controller.java @@ -0,0 +1,135 @@ +package com.cm.inspection.controller.apis.check; + +import com.cm.common.base.AbstractController; +import com.cm.common.component.SecurityComponent; +import com.cm.common.constants.ISystemConstant; +import com.cm.common.exception.RemoveException; +import com.cm.common.exception.SearchException; +import com.cm.common.pojo.ListPage; +import com.cm.common.result.ErrorResult; +import com.cm.common.result.SuccessResult; +import com.cm.common.result.SuccessResultList; +import com.cm.inspection.pojo.dtos.check.Check2DTO; +import com.cm.inspection.pojo.dtos.checkitem.CheckItemDTO; +import com.cm.inspection.pojo.dtos.hiddendangerreport.HiddenDangerReportDTO; +import com.cm.inspection.service.check.ICheck2Service; +import io.swagger.annotations.*; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * @ClassName: CheckController + * @Description: 检查表 + * @Author: WenG + * @Date: 2020-03-25 22:59 + * @Version: 1.0 + **/ +@Api(tags = ISystemConstant.API_TAGS_SYSTEM_PREFIX + "检查表接口") +@RestController +@RequestMapping(ISystemConstant.API_PREFIX + "/check2") +public class Check2Controller extends AbstractController { + + @Autowired + private ICheck2Service check2Service; + @Autowired + private SecurityComponent securityComponent; + + @ApiOperation(value = "删除检查表(id列表)", notes = "删除检查表(id列表)接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "ids", value = "ID列表,用下划线分隔", paramType = "path", example = "1_2_3") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @DeleteMapping("remove/{ids}") + public SuccessResult removeCheck(@PathVariable("ids") String ids) throws RemoveException { + check2Service.remove(Arrays.asList(ids.split("\\_"))); + return new SuccessResult(); + } + + @ApiOperation(value = "检查表详情(通过ID)", notes = "检查表详情(通过ID)接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "checkId", value = "检查表ID", paramType = "path") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("get/{checkId}") + public Check2DTO getCheckById(@PathVariable("checkId") String checkId) throws SearchException { + return check2Service.get(checkId); + } + + @ApiOperation(value = "检查表列表", notes = "检查表列表接口") + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("list") + public List listCheck() throws SearchException { + Map params = requestParams(); + return check2Service.list(params); + } + + @ApiOperation(value = "检查表分页列表", notes = "检查表分页列表接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "page", value = "当前页码", paramType = "query", dataType = "Integer", defaultValue = "1"), + @ApiImplicitParam(name = "rows", value = "显示数量", paramType = "query", dataType = "Integer", defaultValue = "20"), + @ApiImplicitParam(name = "keywords", value = "关键字", paramType = "query", dataType = "String"), + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("listpage") + public SuccessResultList> listPage(ListPage page) throws SearchException { + Map params = requestParams(); + page.setParams(params); + return check2Service.listPage(page); + } + + @ApiOperation(value = "检查表分页列表", notes = "检查表分页列表接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "page", value = "当前页码", paramType = "query", dataType = "Integer", defaultValue = "1"), + @ApiImplicitParam(name = "rows", value = "显示数量", paramType = "query", dataType = "Integer", defaultValue = "20"), + @ApiImplicitParam(name = "keywords", value = "关键字", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "checkMonth", value = "检查月份,yyyy-MM", paramType = "query", dataType = "String") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("listpage-check-of-mine") + public SuccessResultList> listPageCheckOfMine(ListPage page) throws SearchException { + Map params = requestParams(); + page.setParams(params); + return check2Service.listPageCheckOfMine(page); + } + + @ApiOperation(value = "我的复查项列表", notes = "我的复查项列表接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "page", value = "当前页码", paramType = "query", dataType = "Integer", defaultValue = "1"), + @ApiImplicitParam(name = "rows", value = "显示数量", paramType = "query", dataType = "Integer", defaultValue = "20"), + @ApiImplicitParam(name = "keywords", value = "关键字", paramType = "query", dataType = "String"), + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("listpage-recheck-of-mine") + public SuccessResultList> listPageReCheckOfMine(ListPage page) { + Map params = requestParams(); + page.setParams(params); + return check2Service.listPageReCheckOfMine(page); + } + + @ApiOperation(value = "未通过的检查项列表(通过检查ID)", notes = "未通过的检查项列表(通过检查ID)接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "checkId", value = "检查ID", paramType = "path"), + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("list-check-item-unpass/{checkId}") + public List listCheckItemUnPass(@PathVariable("checkId") String checkId) { + return check2Service.listCheckItemUnPass(checkId); + } + + @ApiOperation(value = "检查、复查项列表(通过检查ID)", notes = "检查、复查项列表(通过检查ID)接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "checkId", value = "检查ID", paramType = "path"), + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("list-check-item/{checkId}") + public List listCheckItem(@PathVariable("checkId") String checkId) { + return check2Service.listCheckItem(checkId); + } + +} \ No newline at end of file diff --git a/src/main/java/com/cm/inspection/dao/check/ICheck2Dao.java b/src/main/java/com/cm/inspection/dao/check/ICheck2Dao.java index c9b4b94..0cb138b 100644 --- a/src/main/java/com/cm/inspection/dao/check/ICheck2Dao.java +++ b/src/main/java/com/cm/inspection/dao/check/ICheck2Dao.java @@ -4,6 +4,7 @@ import com.cm.common.exception.RemoveException; import com.cm.common.exception.SaveException; import com.cm.common.exception.SearchException; import com.cm.common.exception.UpdateException; +import com.cm.inspection.pojo.dtos.check.Check2DTO; import com.cm.inspection.pojo.dtos.check.CheckDTO; import com.cm.inspection.pojo.dtos.check.CheckSimpleWithEnterpriseDTO; import org.springframework.stereotype.Repository; @@ -27,7 +28,7 @@ public interface ICheck2Dao { * @param params * @throws SaveException */ - void saveCheck(Map params) throws SaveException; + void save(Map params) throws SaveException; /** * 删除检查表 @@ -52,7 +53,7 @@ public interface ICheck2Dao { * @return * @throws SearchException */ - CheckDTO getCheck(Map params) throws SearchException; + Check2DTO get(Map params) throws SearchException; /** * 检查表列表 @@ -61,7 +62,7 @@ public interface ICheck2Dao { * @return * @throws SearchException */ - List listCheck(Map params) throws SearchException; + List list(Map params) throws SearchException; /** * 统计检查 @@ -79,7 +80,7 @@ public interface ICheck2Dao { * @return * @throws SearchException */ - List listCheckSimple(Map params) throws SearchException; + List listCheckSimple(Map params) throws SearchException; /** * 统计企业的检查数 diff --git a/src/main/java/com/cm/inspection/pojo/dtos/check/Check2DTO.java b/src/main/java/com/cm/inspection/pojo/dtos/check/Check2DTO.java new file mode 100644 index 0000000..b9d3968 --- /dev/null +++ b/src/main/java/com/cm/inspection/pojo/dtos/check/Check2DTO.java @@ -0,0 +1,104 @@ +package com.cm.inspection.pojo.dtos.check; + +import com.cm.inspection.pojo.dtos.checkitem.CheckItemDTO; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @ClassName: CheckDTO + * @Description: 检查表 + * @Author: WenG + * @Date: 2020-03-25 22:59 + * @Version: 1.0 + **/ +@Data +@ApiModel +public class Check2DTO implements Serializable { + + private static final long serialVersionUID = 8091406036283293185L; + @ApiModelProperty(name = "checkId", value = "主键") + private String checkId; + @ApiModelProperty(name = "enterpriseId", value = "企业ID") + private String enterpriseId; + @ApiModelProperty(name = "enterpriseName", value = "企业名称") + private String enterpriseName; + @ApiModelProperty(name = "enterpriseType", value = "企业类型") + private String enterpriseType; + @ApiModelProperty(name = "enterpriseTypeName", value = "企业类型名称") + private String enterpriseTypeName; + @ApiModelProperty(name = "enterpriseArea1", value = "企业1级地区") + private String enterpriseArea1; + @ApiModelProperty(name = "enterpriseArea1Name", value = "企业1级地区名称") + private String enterpriseArea1Name; + @ApiModelProperty(name = "enterpriseArea2", value = "企业2级区域") + private String enterpriseArea2; + @ApiModelProperty(name = "enterpriseArea2Name", value = "企业2级地区名称") + private String enterpriseArea2Name; + @ApiModelProperty(name = "enterpriseArea3", value = "企业3级区域") + private String enterpriseArea3; + @ApiModelProperty(name = "enterpriseArea3Name", value = "企业3级地区名称") + private String enterpriseArea3Name; + @ApiModelProperty(name = "enterpriseArea4", value = "企业4级区域") + private String enterpriseArea4; + @ApiModelProperty(name = "enterpriseArea4Name", value = "企业4级地区名称") + private String enterpriseArea4Name; + @ApiModelProperty(name = "enterpriseArea5", value = "企业5级区域") + private String enterpriseArea5; + @ApiModelProperty(name = "enterpriseArea5Name", value = "企业5级地区名称") + private String enterpriseArea5Name; + @ApiModelProperty(name = "enterpriseAddress", value = "企业详细地址") + private String enterpriseAddress; + @ApiModelProperty(name = "enterpriseIndustry", value = "企业管理行业") + private String enterpriseIndustry; + @ApiModelProperty(name = "enterpriseIndustryName", value = "企业管理行业字典名称") + private String enterpriseIndustryName; + @ApiModelProperty(name = "enterpriseEngagedCount", value = "企业从业人数") + private String enterpriseEngagedCount; + @ApiModelProperty(name = "enterpriseRiskOperation", value = "企业风险作业") + private String enterpriseRiskOperation; + @ApiModelProperty(name = "enterpriseRiskOperationName", value = "风险作业字典名称") + private String enterpriseRiskOperationName; + @ApiModelProperty(name = "enterpriseMaster", value = "企业负责人") + private String enterpriseMaster; + @ApiModelProperty(name = "enterprisePhone", value = "企业联系电话") + private String enterprisePhone; + @ApiModelProperty(name = "enterpriseLng", value = "企业经度") + private String enterpriseLng; + @ApiModelProperty(name = "enterpriseLat", value = "企业纬度") + private String enterpriseLat; + @ApiModelProperty(name = "enterpriseFactoryGate", value = "经营外贸") + private String enterpriseFactoryGate; + @ApiModelProperty(name = "enterpriseWorkplace", value = "作业场所") + private String enterpriseWorkplace; + @ApiModelProperty(name = "checkType", value = "检查类型") + private Integer checkType; + @ApiModelProperty(name = "taskCheckId", value = "任务检查ID") + private String taskCheckId; + @ApiModelProperty(name = "isCoordination", value = "是否配合") + private Integer isCoordination; + @ApiModelProperty(name = "isComplete", value = "是否完成") + private Integer isComplete; + @ApiModelProperty(name = "rectificationType", value = "整改类型") + private Integer rectificationType; + @ApiModelProperty(name = "immediatelyChangeType", value = "立即改类型") + private Integer immediatelyChangeType; + @ApiModelProperty(name = "rectificationDays", value = "整改天数") + private Integer rectificationDays; + @ApiModelProperty(name = "summary", value = "说明") + private String summary; + @ApiModelProperty(name = "checkLng", value = "检查经度") + private String checkLng; + @ApiModelProperty(name = "checkLat", value = "检查纬度") + private String checkLat; + @ApiModelProperty(name = "gmtCreate", value = "时间") + private String gmtCreate; + @ApiModelProperty(name = "creator", value = "创建人") + private String creator; + @ApiModelProperty(name = "checkItems", value = "检查列表") + private List checkItems; + +} diff --git a/src/main/java/com/cm/inspection/pojo/dtos/check/CheckSimpleWithEnterpriseDTO.java b/src/main/java/com/cm/inspection/pojo/dtos/check/CheckSimpleWithEnterpriseDTO.java index 977a398..314bf13 100644 --- a/src/main/java/com/cm/inspection/pojo/dtos/check/CheckSimpleWithEnterpriseDTO.java +++ b/src/main/java/com/cm/inspection/pojo/dtos/check/CheckSimpleWithEnterpriseDTO.java @@ -2,6 +2,7 @@ package com.cm.inspection.pojo.dtos.check; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import lombok.Data; import java.io.Serializable; @@ -15,6 +16,7 @@ import java.io.Serializable; * @Date: 2020/8/29 17:28 * @Version: 1.0 **/ +@Data @ApiModel public class CheckSimpleWithEnterpriseDTO implements Serializable { @@ -66,187 +68,4 @@ public class CheckSimpleWithEnterpriseDTO implements Serializable { @ApiModelProperty(name = "isComplete", value = "是否完成") private Integer isComplete; - public String getCheckId() { - return checkId == null ? "" : checkId.trim(); - } - - public void setCheckId(String checkId) { - this.checkId = checkId; - } - - public String getEnterpriseId() { - return enterpriseId == null ? "" : enterpriseId.trim(); - } - - public void setEnterpriseId(String enterpriseId) { - this.enterpriseId = enterpriseId; - } - - public String getEnterpriseName() { - return enterpriseName == null ? "" : enterpriseName.trim(); - } - - public void setEnterpriseName(String enterpriseName) { - this.enterpriseName = enterpriseName; - } - - public String getEnterpriseArea1() { - return enterpriseArea1 == null ? "" : enterpriseArea1.trim(); - } - - public void setEnterpriseArea1(String enterpriseArea1) { - this.enterpriseArea1 = enterpriseArea1; - } - - public String getEnterpriseArea2() { - return enterpriseArea2 == null ? "" : enterpriseArea2.trim(); - } - - public void setEnterpriseArea2(String enterpriseArea2) { - this.enterpriseArea2 = enterpriseArea2; - } - - public String getEnterpriseArea3() { - return enterpriseArea3 == null ? "" : enterpriseArea3.trim(); - } - - public void setEnterpriseArea3(String enterpriseArea3) { - this.enterpriseArea3 = enterpriseArea3; - } - - public String getEnterpriseArea4() { - return enterpriseArea4 == null ? "" : enterpriseArea4.trim(); - } - - public void setEnterpriseArea4(String enterpriseArea4) { - this.enterpriseArea4 = enterpriseArea4; - } - - public String getEnterpriseArea5() { - return enterpriseArea5 == null ? "" : enterpriseArea5.trim(); - } - - public void setEnterpriseArea5(String enterpriseArea5) { - this.enterpriseArea5 = enterpriseArea5; - } - - public String getEnterpriseIndustryType() { - return enterpriseIndustryType == null ? "" : enterpriseIndustryType.trim(); - } - - public void setEnterpriseIndustryType(String enterpriseIndustryType) { - this.enterpriseIndustryType = enterpriseIndustryType; - } - - public String getEnterpriseIndustry() { - return enterpriseIndustry == null ? "" : enterpriseIndustry.trim(); - } - - public void setEnterpriseIndustry(String enterpriseIndustry) { - this.enterpriseIndustry = enterpriseIndustry; - } - - public String getEnterpriseRiskOperation() { - return enterpriseRiskOperation == null ? "" : enterpriseRiskOperation.trim(); - } - - public void setEnterpriseRiskOperation(String enterpriseRiskOperation) { - this.enterpriseRiskOperation = enterpriseRiskOperation; - } - - public String getEnterpriseMaster() { - return enterpriseMaster == null ? "" : enterpriseMaster.trim(); - } - - public void setEnterpriseMaster(String enterpriseMaster) { - this.enterpriseMaster = enterpriseMaster; - } - - public String getEnterprisePhone() { - return enterprisePhone == null ? "" : enterprisePhone.trim(); - } - - public void setEnterprisePhone(String enterprisePhone) { - this.enterprisePhone = enterprisePhone; - } - - public String getEnterpriseLng() { - return enterpriseLng == null ? "" : enterpriseLng.trim(); - } - - public void setEnterpriseLng(String enterpriseLng) { - this.enterpriseLng = enterpriseLng; - } - - public String getEnterpriseLat() { - return enterpriseLat == null ? "" : enterpriseLat.trim(); - } - - public void setEnterpriseLat(String enterpriseLat) { - this.enterpriseLat = enterpriseLat; - } - - public String getEnterpriseFactoryGate() { - return enterpriseFactoryGate == null ? "" : enterpriseFactoryGate.trim(); - } - - public void setEnterpriseFactoryGate(String enterpriseFactoryGate) { - this.enterpriseFactoryGate = enterpriseFactoryGate; - } - - public String getEnterpriseWorkplace() { - return enterpriseWorkplace == null ? "" : enterpriseWorkplace.trim(); - } - - public void setEnterpriseWorkplace(String enterpriseWorkplace) { - this.enterpriseWorkplace = enterpriseWorkplace; - } - - public String getCheckType() { - return checkType == null ? "" : checkType.trim(); - } - - public void setCheckType(String checkType) { - this.checkType = checkType; - } - - public String getCheckLng() { - return checkLng == null ? "" : checkLng.trim(); - } - - public void setCheckLng(String checkLng) { - this.checkLng = checkLng; - } - - public String getCheckLat() { - return checkLat == null ? "" : checkLat.trim(); - } - - public void setCheckLat(String checkLat) { - this.checkLat = checkLat; - } - - public String getCreator() { - return creator == null ? "" : creator.trim(); - } - - public void setCreator(String creator) { - this.creator = creator; - } - - public String getGmtCreate() { - return gmtCreate == null ? "" : gmtCreate.trim(); - } - - public void setGmtCreate(String gmtCreate) { - this.gmtCreate = gmtCreate; - } - - public Integer getIsComplete() { - return isComplete; - } - - public void setIsComplete(Integer isComplete) { - this.isComplete = isComplete; - } } diff --git a/src/main/java/com/cm/inspection/pojo/dtos/check/CheckV2DTO.java b/src/main/java/com/cm/inspection/pojo/dtos/check/CheckV2DTO.java deleted file mode 100644 index 89fea21..0000000 --- a/src/main/java/com/cm/inspection/pojo/dtos/check/CheckV2DTO.java +++ /dev/null @@ -1,427 +0,0 @@ -package com.cm.inspection.pojo.dtos.check; - -import com.cm.inspection.pojo.dtos.checkitem.CheckItemDTO; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; - -import java.io.Serializable; -import java.util.ArrayList; -import java.util.List; - -/** - * @ClassName: CheckDTO - * @Description: 检查表 - * @Author: WenG - * @Date: 2020-03-25 22:59 - * @Version: 1.0 - **/ -@ApiModel -public class CheckV2DTO implements Serializable { - - private static final long serialVersionUID = 1066469161696590595L; - @ApiModelProperty(name = "checkId", value = "主键") - private String checkId; - @ApiModelProperty(name = "enterpriseId", value = "企业ID") - private String enterpriseId; - @ApiModelProperty(name = "nameJoinByEnterpriseId", value = "企业ID的名称") - private String nameJoinByEnterpriseId; - @ApiModelProperty(name = "typeJoinByEnterpriseId", value = "企业ID的类型") - private String typeJoinByEnterpriseId; - @ApiModelProperty(name = "typeDictionaryName", value = "类型字典名称") - private String typeDictionaryName; - @ApiModelProperty(name = "area1JoinByEnterpriseId", value = "企业ID的1级地区") - private String area1JoinByEnterpriseId; - @ApiModelProperty(name = "area1DictionaryName", value = "企业1级地区名称") - private String area1DictionaryName; - @ApiModelProperty(name = "area2JoinByEnterpriseId", value = "企业ID的2级区域") - private String area2JoinByEnterpriseId; - @ApiModelProperty(name = "area2DictionaryName", value = "企业2级地区名称") - private String area2DictionaryName; - @ApiModelProperty(name = "area3JoinByEnterpriseId", value = "企业ID的3级区域") - private String area3JoinByEnterpriseId; - @ApiModelProperty(name = "area3DictionaryName", value = "企业3级地区名称") - private String area3DictionaryName; - @ApiModelProperty(name = "area4JoinByEnterpriseId", value = "企业ID的4级区域") - private String area4JoinByEnterpriseId; - @ApiModelProperty(name = "area4DictionaryName", value = "企业4级地区名称") - private String area4DictionaryName; - @ApiModelProperty(name = "area5JoinByEnterpriseId", value = "企业ID的5级区域") - private String area5JoinByEnterpriseId; - @ApiModelProperty(name = "area5DictionaryName", value = "企业5级地区名称") - private String area5DictionaryName; - @ApiModelProperty(name = "addressJoinByEnterpriseId", value = "企业ID的详细地址") - private String addressJoinByEnterpriseId; - @ApiModelProperty(name = "industryJoinByEnterpriseId", value = "企业ID的管理行业") - private String industryJoinByEnterpriseId; - @ApiModelProperty(name = "industryDictionaryName", value = "管理行业字典名称") - private String industryDictionaryName; - @ApiModelProperty(name = "engagedCountJoinByEnterpriseId", value = "企业ID的从业人数") - private String engagedCountJoinByEnterpriseId; - @ApiModelProperty(name = "riskOperationJoinByEnterpriseId", value = "企业ID的风险作业") - private String riskOperationJoinByEnterpriseId; - @ApiModelProperty(name = "riskOperationDictionaryName", value = "风险作业字典名称") - private String riskOperationDictionaryName; - @ApiModelProperty(name = "masterJoinByEnterpriseId", value = "企业ID的负责人") - private String masterJoinByEnterpriseId; - @ApiModelProperty(name = "phoneJoinByEnterpriseId", value = "企业ID的联系电话") - private String phoneJoinByEnterpriseId; - @ApiModelProperty(name = "enterpriseLngByEnterpriseId", value = "企业经度") - private String enterpriseLngByEnterpriseId; - @ApiModelProperty(name = "enterpriseLatByEnterpriseId", value = "企业纬度") - private String enterpriseLatByEnterpriseId; - @ApiModelProperty(name = "factoryGateByEnterpriseId", value = "经营外贸") - private String factoryGateByEnterpriseId; - @ApiModelProperty(name = "workplaceByEnterpriseId", value = "作业场所") - private String workplaceByEnterpriseId; - @ApiModelProperty(name = "checkType", value = "检查类型") - private Integer checkType; - @ApiModelProperty(name = "taskCheckId", value = "任务检查ID") - private String taskCheckId; - @ApiModelProperty(name = "isCoordination", value = "是否配合") - private Integer isCoordination; - @ApiModelProperty(name = "isComplete", value = "是否完成") - private Integer isComplete; - @ApiModelProperty(name = "rectificationType", value = "整改类型") - private Integer rectificationType; - @ApiModelProperty(name = "immediatelyChangeType", value = "立即改类型") - private Integer immediatelyChangeType; - @ApiModelProperty(name = "rectificationDays", value = "整改天数") - private Integer rectificationDays; - @ApiModelProperty(name = "summary", value = "说明") - private String summary; - @ApiModelProperty(name = "checkLng", value = "检查经度") - private String checkLng; - @ApiModelProperty(name = "checkLat", value = "检查纬度") - private String checkLat; - @ApiModelProperty(name = "gmtCreate", value = "时间") - private String gmtCreate; - @ApiModelProperty(name = "creator", value = "创建人") - private String creator; - @ApiModelProperty(name = "checkItems", value = "检查列表") - private List checkItems; - - public String getCheckId() { - return checkId == null ? "" : checkId; - } - - public void setCheckId(String checkId) { - this.checkId = checkId; - } - - public String getEnterpriseId() { - return enterpriseId == null ? "" : enterpriseId; - } - - public void setEnterpriseId(String enterpriseId) { - this.enterpriseId = enterpriseId; - } - - public String getNameJoinByEnterpriseId() { - return nameJoinByEnterpriseId == null ? "" : nameJoinByEnterpriseId; - } - - public void setNameJoinByEnterpriseId(String nameJoinByEnterpriseId) { - this.nameJoinByEnterpriseId = nameJoinByEnterpriseId; - } - - public String getTypeJoinByEnterpriseId() { - return typeJoinByEnterpriseId == null ? "" : typeJoinByEnterpriseId; - } - - public void setTypeJoinByEnterpriseId(String typeJoinByEnterpriseId) { - this.typeJoinByEnterpriseId = typeJoinByEnterpriseId; - } - - public String getTypeDictionaryName() { - return typeDictionaryName == null ? "" : typeDictionaryName; - } - - public void setTypeDictionaryName(String typeDictionaryName) { - this.typeDictionaryName = typeDictionaryName; - } - - public String getArea1JoinByEnterpriseId() { - return area1JoinByEnterpriseId == null ? "" : area1JoinByEnterpriseId; - } - - public void setArea1JoinByEnterpriseId(String area1JoinByEnterpriseId) { - this.area1JoinByEnterpriseId = area1JoinByEnterpriseId; - } - - public String getArea1DictionaryName() { - return area1DictionaryName == null ? "" : area1DictionaryName; - } - - public void setArea1DictionaryName(String area1DictionaryName) { - this.area1DictionaryName = area1DictionaryName; - } - - public String getArea2JoinByEnterpriseId() { - return area2JoinByEnterpriseId == null ? "" : area2JoinByEnterpriseId; - } - - public void setArea2JoinByEnterpriseId(String area2JoinByEnterpriseId) { - this.area2JoinByEnterpriseId = area2JoinByEnterpriseId; - } - - public String getArea2DictionaryName() { - return area2DictionaryName == null ? "" : area2DictionaryName; - } - - public void setArea2DictionaryName(String area2DictionaryName) { - this.area2DictionaryName = area2DictionaryName; - } - - public String getArea3JoinByEnterpriseId() { - return area3JoinByEnterpriseId == null ? "" : area3JoinByEnterpriseId; - } - - public void setArea3JoinByEnterpriseId(String area3JoinByEnterpriseId) { - this.area3JoinByEnterpriseId = area3JoinByEnterpriseId; - } - - public String getArea3DictionaryName() { - return area3DictionaryName == null ? "" : area3DictionaryName; - } - - public void setArea3DictionaryName(String area3DictionaryName) { - this.area3DictionaryName = area3DictionaryName; - } - - public String getArea4JoinByEnterpriseId() { - return area4JoinByEnterpriseId == null ? "" : area4JoinByEnterpriseId; - } - - public void setArea4JoinByEnterpriseId(String area4JoinByEnterpriseId) { - this.area4JoinByEnterpriseId = area4JoinByEnterpriseId; - } - - public String getArea4DictionaryName() { - return area4DictionaryName == null ? "" : area4DictionaryName; - } - - public void setArea4DictionaryName(String area4DictionaryName) { - this.area4DictionaryName = area4DictionaryName; - } - - public String getArea5JoinByEnterpriseId() { - return area5JoinByEnterpriseId == null ? "" : area5JoinByEnterpriseId; - } - - public void setArea5JoinByEnterpriseId(String area5JoinByEnterpriseId) { - this.area5JoinByEnterpriseId = area5JoinByEnterpriseId; - } - - public String getArea5DictionaryName() { - return area5DictionaryName == null ? "" : area5DictionaryName; - } - - public void setArea5DictionaryName(String area5DictionaryName) { - this.area5DictionaryName = area5DictionaryName; - } - - public String getAddressJoinByEnterpriseId() { - return addressJoinByEnterpriseId == null ? "" : addressJoinByEnterpriseId; - } - - public void setAddressJoinByEnterpriseId(String addressJoinByEnterpriseId) { - this.addressJoinByEnterpriseId = addressJoinByEnterpriseId; - } - - public String getIndustryJoinByEnterpriseId() { - return industryJoinByEnterpriseId == null ? "" : industryJoinByEnterpriseId; - } - - public void setIndustryJoinByEnterpriseId(String industryJoinByEnterpriseId) { - this.industryJoinByEnterpriseId = industryJoinByEnterpriseId; - } - - public String getIndustryDictionaryName() { - return industryDictionaryName == null ? "" : industryDictionaryName; - } - - public void setIndustryDictionaryName(String industryDictionaryName) { - this.industryDictionaryName = industryDictionaryName; - } - - public String getEngagedCountJoinByEnterpriseId() { - return engagedCountJoinByEnterpriseId == null ? "" : engagedCountJoinByEnterpriseId; - } - - public void setEngagedCountJoinByEnterpriseId(String engagedCountJoinByEnterpriseId) { - this.engagedCountJoinByEnterpriseId = engagedCountJoinByEnterpriseId; - } - - public String getRiskOperationJoinByEnterpriseId() { - return riskOperationJoinByEnterpriseId == null ? "" : riskOperationJoinByEnterpriseId; - } - - public void setRiskOperationJoinByEnterpriseId(String riskOperationJoinByEnterpriseId) { - this.riskOperationJoinByEnterpriseId = riskOperationJoinByEnterpriseId; - } - - public String getRiskOperationDictionaryName() { - return riskOperationDictionaryName == null ? "" : riskOperationDictionaryName; - } - - public void setRiskOperationDictionaryName(String riskOperationDictionaryName) { - this.riskOperationDictionaryName = riskOperationDictionaryName; - } - - public String getMasterJoinByEnterpriseId() { - return masterJoinByEnterpriseId == null ? "" : masterJoinByEnterpriseId; - } - - public void setMasterJoinByEnterpriseId(String masterJoinByEnterpriseId) { - this.masterJoinByEnterpriseId = masterJoinByEnterpriseId; - } - - public String getPhoneJoinByEnterpriseId() { - return phoneJoinByEnterpriseId == null ? "" : phoneJoinByEnterpriseId; - } - - public void setPhoneJoinByEnterpriseId(String phoneJoinByEnterpriseId) { - this.phoneJoinByEnterpriseId = phoneJoinByEnterpriseId; - } - - - public String getEnterpriseLngByEnterpriseId() { - return enterpriseLngByEnterpriseId == null ? "" : enterpriseLngByEnterpriseId; - } - - public void setEnterpriseLngByEnterpriseId(String enterpriseLngByEnterpriseId) { - this.enterpriseLngByEnterpriseId = enterpriseLngByEnterpriseId; - } - - public String getEnterpriseLatByEnterpriseId() { - return enterpriseLatByEnterpriseId == null ? "" : enterpriseLatByEnterpriseId; - } - - public void setEnterpriseLatByEnterpriseId(String enterpriseLatByEnterpriseId) { - this.enterpriseLatByEnterpriseId = enterpriseLatByEnterpriseId; - } - - public String getFactoryGateByEnterpriseId() { - return factoryGateByEnterpriseId == null ? "" : factoryGateByEnterpriseId; - } - - public void setFactoryGateByEnterpriseId(String factoryGateByEnterpriseId) { - this.factoryGateByEnterpriseId = factoryGateByEnterpriseId; - } - - public String getWorkplaceByEnterpriseId() { - return workplaceByEnterpriseId == null ? "" : workplaceByEnterpriseId; - } - - public void setWorkplaceByEnterpriseId(String workplaceByEnterpriseId) { - this.workplaceByEnterpriseId = workplaceByEnterpriseId; - } - - public Integer getCheckType() { - return checkType; - } - - public void setCheckType(Integer checkType) { - this.checkType = checkType; - } - - public String getTaskCheckId() { - return taskCheckId == null ? "" : taskCheckId.trim(); - } - - public void setTaskCheckId(String taskCheckId) { - this.taskCheckId = taskCheckId; - } - - public Integer getIsCoordination() { - return isCoordination; - } - - public void setIsCoordination(Integer isCoordination) { - this.isCoordination = isCoordination; - } - - public Integer getIsComplete() { - return isComplete; - } - - public void setIsComplete(Integer isComplete) { - this.isComplete = isComplete; - } - - public Integer getRectificationType() { - return rectificationType; - } - - public void setRectificationType(Integer rectificationType) { - this.rectificationType = rectificationType; - } - - public Integer getImmediatelyChangeType() { - return immediatelyChangeType; - } - - public void setImmediatelyChangeType(Integer immediatelyChangeType) { - this.immediatelyChangeType = immediatelyChangeType; - } - - public Integer getRectificationDays() { - return rectificationDays; - } - - public void setRectificationDays(Integer rectificationDays) { - this.rectificationDays = rectificationDays; - } - - public String getSummary() { - return summary == null ? "" : summary; - } - - public void setSummary(String summary) { - this.summary = summary; - } - - public String getCheckLng() { - return checkLng == null ? "" : checkLng; - } - - public void setCheckLng(String checkLng) { - this.checkLng = checkLng; - } - - public String getCheckLat() { - return checkLat == null ? "" : checkLat; - } - - public void setCheckLat(String checkLat) { - this.checkLat = checkLat; - } - - public String getGmtCreate() { - return gmtCreate == null ? "" : gmtCreate; - } - - public void setGmtCreate(String gmtCreate) { - this.gmtCreate = gmtCreate; - } - - public String getCreator() { - return creator == null ? "" : creator.trim(); - } - - public void setCreator(String creator) { - this.creator = creator; - } - - public List getCheckItems() { - if (checkItems == null) { - return new ArrayList<>(); - } - return checkItems; - } - - public void setCheckItems(List checkItems) { - this.checkItems = checkItems; - } - -} diff --git a/src/main/java/com/cm/inspection/service/check/ICheck2Service.java b/src/main/java/com/cm/inspection/service/check/ICheck2Service.java index d9ebe94..e2ce8a3 100644 --- a/src/main/java/com/cm/inspection/service/check/ICheck2Service.java +++ b/src/main/java/com/cm/inspection/service/check/ICheck2Service.java @@ -1,7 +1,15 @@ package com.cm.inspection.service.check; +import com.cm.common.pojo.ListPage; +import com.cm.common.result.SuccessResultList; +import com.cm.inspection.pojo.dtos.check.Check2DTO; +import com.cm.inspection.pojo.dtos.checkitem.CheckItemDTO; +import com.cm.inspection.pojo.dtos.hiddendangerreport.HiddenDangerReportDTO; import com.cm.inspection.pojo.vos.check.Check2VO; +import java.util.List; +import java.util.Map; + /** * @ClassName: ICheckService * @Description: 检查表 @@ -19,6 +27,7 @@ public interface ICheck2Service { * * @param token * @param check2VO + * @throws Exception */ void save(String token, Check2VO check2VO) throws Exception; @@ -32,5 +41,75 @@ public interface ICheck2Service { */ void saveRe(String token, String checkId, Check2VO check2VO) throws Exception; + /** + * 删除 + * + * @param ids + * @return + */ + void remove(List ids); + /** + * 详情 + * + * @param params + * @return + */ + Check2DTO get(Map params); + + /** + * 详情 + * + * @param checkId + * @return + */ + Check2DTO get(String checkId); + + /** + * 列表 + * + * @param params + * @return + */ + List list(Map params); + + /** + * 分页列表 + * + * @param page + * @return + */ + SuccessResultList> listPage(ListPage page); + + /** + * 我的检查列表 + * + * @param page + * @return + */ + SuccessResultList> listPageCheckOfMine(ListPage page); + + /** + * 我的复查列表 + * + * @param page + * @return + */ + SuccessResultList> listPageReCheckOfMine(ListPage page); + + /** + * 未通过的检查项列表 + * + * @param checkId + * @return + */ + List listCheckItemUnPass(String checkId); + + /** + * 检查项列表 + * + * @param checkId + * @return + */ + List listCheckItem(String checkId); } diff --git a/src/main/java/com/cm/inspection/service/check/impl/Check2ServiceImpl.java b/src/main/java/com/cm/inspection/service/check/impl/Check2ServiceImpl.java index 98453e2..92a385b 100644 --- a/src/main/java/com/cm/inspection/service/check/impl/Check2ServiceImpl.java +++ b/src/main/java/com/cm/inspection/service/check/impl/Check2ServiceImpl.java @@ -1,6 +1,8 @@ package com.cm.inspection.service.check.impl; import com.cm.common.exception.SearchException; +import com.cm.common.pojo.ListPage; +import com.cm.common.result.SuccessResultList; import com.cm.common.utils.HashMapUtil; import com.cm.common.utils.UUIDUtil; import com.cm.inspection.dao.check.ICheck2Dao; @@ -8,8 +10,11 @@ import com.cm.inspection.enums.CheckProcessParamsEnum; import com.cm.inspection.enums.CheckTypeEnum; import com.cm.inspection.enums.GridPersonnelTypeEnum; import com.cm.inspection.enums.HiddenDangerReportTypeEnum; +import com.cm.inspection.pojo.dtos.check.Check2DTO; +import com.cm.inspection.pojo.dtos.checkitem.CheckItemDTO; import com.cm.inspection.pojo.dtos.checkitemoption.CheckItemOptionDTO; import com.cm.inspection.pojo.dtos.enterprise.EnterpriseDTO; +import com.cm.inspection.pojo.dtos.hiddendangerreport.HiddenDangerReportDTO; import com.cm.inspection.pojo.dtos.industrycheckitem.IndustryCheckItemDTO; import com.cm.inspection.pojo.vos.check.Check2VO; import com.cm.inspection.pojo.vos.hiddendangerreport.HiddenDangerReportVO; @@ -23,6 +28,8 @@ import com.cm.inspection.service.hiddendangerreport.IHiddenDangerReportService; import com.cm.inspection.service.industrycheckitem.IIndustryCheckItemService; import com.cm.inspection.service.process.IProcessService; import com.cm.inspection.service.taskcheck.ITaskCheckService; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; import org.activiti.engine.task.Task; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -71,7 +78,7 @@ public class Check2ServiceImpl extends BaseService implements ICheck2Service { params.put("checkId", checkId); setSaveInfo(token, params); LOG.debug("保存检查记录"); - check2Dao.saveCheck(params); + check2Dao.save(params); String grid = params.get("creator").toString(); startCheckProcess(token, checkId, grid, check2VO); } @@ -89,12 +96,64 @@ public class Check2ServiceImpl extends BaseService implements ICheck2Service { throw new SearchException("上级领导不存在,请联系管理员"); } LOG.debug("保存复查记录"); - check2Dao.saveCheck(params); + check2Dao.save(params); LOG.debug("标记之前的检查为完成状态"); updateCheckIsCompleteInfo(token, checkId, 1); reCheckProcess(token, reCheckId, checkId, grid, leaderId, check2VO); } + @Override + public void remove(List ids) { + Map params = getHashMap(2); + params.put("ids", ids); + check2Dao.removeCheck(params); + } + + @Override + public Check2DTO get(Map params) { + return check2Dao.get(params); + } + + @Override + public Check2DTO get(String checkId) { + Map params = getHashMap(2); + params.put("checkId", checkId); + return get(params); + } + + @Override + public List list(Map params) { + return check2Dao.list(params); + } + + @Override + public SuccessResultList> listPage(ListPage page) { + PageHelper.startPage(page.getPage(), page.getRows()); + List check2DTOs = list(page.getParams()); + PageInfo pageInfo = new PageInfo<>(check2DTOs); + return new SuccessResultList<>(check2DTOs, pageInfo.getPageNum(), pageInfo.getTotal()); + } + + @Override + public SuccessResultList> listPageCheckOfMine(ListPage page) { + return null; + } + + @Override + public SuccessResultList> listPageReCheckOfMine(ListPage page) { + return null; + } + + @Override + public List listCheckItemUnPass(String checkId) { + return null; + } + + @Override + public List listCheckItem(String checkId) { + return null; + } + /** * 开启检查流程 * diff --git a/src/main/resources/mybatis/mapper/check/check2-mapper.xml b/src/main/resources/mybatis/mapper/check/check2-mapper.xml index 25aa1ca..ac5e0d5 100644 --- a/src/main/resources/mybatis/mapper/check/check2-mapper.xml +++ b/src/main/resources/mybatis/mapper/check/check2-mapper.xml @@ -4,34 +4,34 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + @@ -72,7 +72,7 @@ - + INSERT INTO gen_check( check_id, enterprise_id, @@ -172,7 +172,7 @@ - SELECT t1.enterprise_id, jt1.name name_join_by_enterprise_id, @@ -207,34 +207,34 @@ - SELECT t1.enterprise_id, - jt1.name name_join_by_enterprise_id, - jt1.type type_join_by_enterprise_id, - dt1.dictionary_name type_dictionary_name, - jt1.area1 area1_join_by_enterprise_id, - jt1.area1_dictionary_name area1_dictionary_name, - jt1.area2 area2_join_by_enterprise_id, - jt1.area2_dictionary_name area2_dictionary_name, - jt1.area3 area3_join_by_enterprise_id, - jt1.area3_dictionary_name area3_dictionary_name, - jt1.area4 area4_join_by_enterprise_id, - jt1.area4_dictionary_name area4_dictionary_name, - jt1.area5 area5_join_by_enterprise_id, - jt1.area5_dictionary_name area5_dictionary_name, - jt1.address address_join_by_enterprise_id, - jt1.industry industry_join_by_enterprise_id, - dt2.dictionary_name industry_dictionary_name, - jt1.engaged_count engaged_count_join_by_enterprise_id, - jt1.risk_operation risk_operation_join_by_enterprise_id, - dt3.dictionary_name risk_operation_dictionary_name, - jt1.master master_join_by_enterprise_id, - jt1.phone phone_join_by_enterprise_id, - jt1.enterprise_lng enterprise_lng_by_enterprise_id, - jt1.enterprise_lat enterprise_lat_by_enterprise_id, - jt1.factory_gate factory_gate_by_enterprise_id, - jt1.workplace workplace_by_enterprise_id, + jt1.name enterprise_name, + jt1.type enterprise_type, + dt1.dictionary_name enterprise_type_name, + jt1.area1 enterprise_area1, + jt1.area1_dictionary_name enterprise_area1_name, + jt1.area2 enterprise_area2, + jt1.area2_dictionary_name enterprise_area2_name, + jt1.area3 enterprise_area3, + jt1.area3_dictionary_name enterprise_area3_name, + jt1.area4 enterprise_area4, + jt1.area4_dictionary_name enterprise_area4_name, + jt1.area5 enterprise_area5, + jt1.area5_dictionary_name enterprise_area5_name, + jt1.address enterprise_address, + jt1.industry enterprise_industry, + dt2.dictionary_name enterprise_industry_name, + jt1.engaged_count enterprise_engaged_count, + jt1.risk_operation enterprise_risk_operation, + dt3.dictionary_name enterprise_risk_operation_name, + jt1.master enterprise_master, + jt1.phone enterprise_phone, + jt1.enterprise_lng enterprise_lng, + jt1.enterprise_lat enterprise_lat, + jt1.factory_gate enterprise_factory_gate, + jt1.workplace enterprise_workplace, t1.check_type, t1.task_check_id, t1.is_coordination, @@ -431,7 +431,7 @@ - SELECT * FROM diff --git a/src/main/resources/static/route/check/list-check2.html b/src/main/resources/static/route/check/list-check2.html new file mode 100644 index 0000000..184d378 --- /dev/null +++ b/src/main/resources/static/route/check/list-check2.html @@ -0,0 +1,578 @@ + + + + + + + + + + + + + + + +
+
+
+
+
+
+
+ +
+
+ +
+ +
+ +
+
+ +
+
+ +
+
+
+
+ +
+ +
+ +
+ +
+ + +
+
+ + +
+
+
+
+
+ + + + + \ No newline at end of file