公共区域

This commit is contained in:
wenc000 2020-04-27 23:31:20 +08:00
parent 5ba0b8e237
commit cf9204d328
18 changed files with 1016 additions and 61 deletions

View File

@ -102,6 +102,22 @@ public class PublicAreaReportController extends AbstractController {
return publicAreaReportService.listPagePublicAreaReport(page);
}
@ApiOperation(value = "公共区域上报分页列表(我的)", notes = "公共区域上报分页列表(我的)接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "page", value = "当前页码", paramType = "form", dataType = "Integer", defaultValue = "1"),
@ApiImplicitParam(name = "rows", value = "显示数量", paramType = "form", dataType = "Integer", defaultValue = "20"),
@ApiImplicitParam(name = "keywords", value = "关键字", paramType = "form", dataType = "String"),
@ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "form", dataType = "String"),
@ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "form", dataType = "String")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("listpagepublicareareportofmine")
public SuccessResultList<List<PublicAreaReportDTO>> listPagePublicAreaReportOfMine(ListPage page) throws SearchException {
Map<String, Object> params = requestParams();
page.setParams(params);
return publicAreaReportService.listPagePublicAreaReportOfMine(page);
}
@ApiOperation(value = "当前用户id信息", notes = "当前用户id信息接口")
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("getcurrentuseridinfo")

View File

@ -103,6 +103,22 @@ public class PublicLeaderHandleController extends AbstractController {
return publicLeaderHandleService.listPagePublicLeaderHandle(page);
}
@ApiOperation(value = "公共领导处理分页列表(我的)", notes = "公共领导处理分页列表(我的)接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "page", value = "当前页码", paramType = "form", dataType = "Integer", defaultValue = "1"),
@ApiImplicitParam(name = "rows", value = "显示数量", paramType = "form", dataType = "Integer", defaultValue = "20"),
@ApiImplicitParam(name = "keywords", value = "关键字", paramType = "form", dataType = "String"),
@ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "form", dataType = "String"),
@ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "form", dataType = "String")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("listpagepublicleaderhandleofmine")
public SuccessResultList<List<PublicLeaderHandleDTO>> listPagePublicLeaderHandleOfMine(ListPage page) throws SearchException {
Map<String, Object> params = requestParams();
page.setParams(params);
return publicLeaderHandleService.listPagePublicLeaderHandleOfMine(page);
}
@ApiOperation(value = "公共领导处理统计", notes = "公共领导处理统计接口")
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("countpublicleaderhandle")

View File

@ -91,6 +91,23 @@ public class PublicAreaReportAppController extends AbstractController {
return publicAreaReportService.listPublicAreaReport(params);
}
@ApiOperation(value = "公共区域上报分页列表(我的)", notes = "公共区域上报分页列表(我的)接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "token", value = "token", paramType = "header"),
@ApiImplicitParam(name = "page", value = "当前页码", paramType = "form", dataType = "Integer", defaultValue = "1"),
@ApiImplicitParam(name = "rows", value = "显示数量", paramType = "form", dataType = "Integer", defaultValue = "20"),
@ApiImplicitParam(name = "keywords", value = "关键字", paramType = "form", dataType = "String"),
@ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "form", dataType = "String"),
@ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "form", dataType = "String")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("listpagepublicareareportofmine")
public SuccessResultList<List<PublicAreaReportDTO>> listPagePublicAreaReportOfMine(@RequestHeader("token") String token, ListPage page) throws SearchException {
Map<String, Object> params = requestParams();
page.setParams(params);
return publicAreaReportService.listPagePublicAreaReportOfMine(token, page);
}
@ApiOperation(value = "公共区域上报分页列表", notes = "公共区域上报分页列表接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "token", value = "token", paramType = "header"),

View File

@ -109,6 +109,23 @@ public class PublicLeaderHandleAppController extends AbstractController {
return publicLeaderHandleService.listPagePublicLeaderHandle(page);
}
@ApiOperation(value = "公共领导处理分页列表(我的)", notes = "公共领导处理分页列表(我的)接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "token", value = "token", paramType = "header"),
@ApiImplicitParam(name = "page", value = "当前页码", paramType = "form", dataType = "Integer", defaultValue = "1"),
@ApiImplicitParam(name = "rows", value = "显示数量", paramType = "form", dataType = "Integer", defaultValue = "20"),
@ApiImplicitParam(name = "keywords", value = "关键字", paramType = "form", dataType = "String"),
@ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "form", dataType = "String"),
@ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "form", dataType = "String")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("listpagepublicleaderhandleofmine")
public SuccessResultList<List<PublicLeaderHandleDTO>> listPagePublicLeaderHandleOfMine(@RequestHeader("token") String token, ListPage page) throws SearchException {
Map<String, Object> params = requestParams();
page.setParams(params);
return publicLeaderHandleService.listPagePublicLeaderHandleOfMine(token, page);
}
@ApiOperation(value = "公共领导处理统计", notes = "公共领导处理统计接口")
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("countpublicleaderhandle")

View File

@ -27,6 +27,18 @@ public class PublicLeaderHandleDTO {
private String handleUserId;
@ApiModelProperty(name = "handleUserName", value = "处理人")
private String handleUserName;
@ApiModelProperty(name = "checkAddress", value = "检查地址")
private String checkAddress;
@ApiModelProperty(name = "checkDate", value = "检查时间")
private String checkDate;
@ApiModelProperty(name = "checkContent", value = "检查内容")
private String checkContent;
@ApiModelProperty(name = "checkPhotos", value = "检查图片")
private String checkPhotos;
@ApiModelProperty(name = "checkType", value = "检查类型")
private Integer checkType;
@ApiModelProperty(name = "checkUserName", value = "检查人")
private String checkUserName;
public String getPublicLeaderHandleId() {
return publicLeaderHandleId == null ? "" : publicLeaderHandleId;
@ -84,23 +96,83 @@ public class PublicLeaderHandleDTO {
this.handleUserName = handleUserName;
}
public String getCheckAddress() {
return checkAddress == null ? "" : checkAddress.trim();
}
public void setCheckAddress(String checkAddress) {
this.checkAddress = checkAddress;
}
public String getCheckDate() {
return checkDate == null ? "" : checkDate.trim();
}
public void setCheckDate(String checkDate) {
this.checkDate = checkDate;
}
public String getCheckContent() {
return checkContent == null ? "" : checkContent.trim();
}
public void setCheckContent(String checkContent) {
this.checkContent = checkContent;
}
public String getCheckPhotos() {
return checkPhotos == null ? "" : checkPhotos.trim();
}
public void setCheckPhotos(String checkPhotos) {
this.checkPhotos = checkPhotos;
}
public Integer getCheckType() {
return checkType;
}
public void setCheckType(Integer checkType) {
this.checkType = checkType;
}
public String getCheckUserName() {
return checkUserName == null ? "" : checkUserName.trim();
}
public void setCheckUserName(String checkUserName) {
this.checkUserName = checkUserName;
}
@Override
public String toString() {
final StringBuilder sb = new StringBuilder("{");
sb.append("\"publicLeaderHandleId\":\"")
.append(publicLeaderHandleId).append('\"');
sb.append(",\"publicAreaReportId\":\"")
.append(publicAreaReportId).append('\"');
sb.append("\"publicLeaderHandleId\":")
.append("\"").append(publicLeaderHandleId).append("\"");
sb.append(",\"publicAreaReportId\":")
.append("\"").append(publicAreaReportId).append("\"");
sb.append(",\"handleStatus\":")
.append(handleStatus);
sb.append(",\"handleSummary\":\"")
.append(handleSummary).append('\"');
sb.append(",\"handlePhotos\":\"")
.append(handlePhotos).append('\"');
sb.append(",\"handleUserId\":\"")
.append(handleUserId).append('\"');
sb.append(",\"handleUserName\":\"")
.append(handleUserName).append('\"');
sb.append(",\"handleSummary\":")
.append("\"").append(handleSummary).append("\"");
sb.append(",\"handlePhotos\":")
.append("\"").append(handlePhotos).append("\"");
sb.append(",\"handleUserId\":")
.append("\"").append(handleUserId).append("\"");
sb.append(",\"handleUserName\":")
.append("\"").append(handleUserName).append("\"");
sb.append(",\"checkAddress\":")
.append("\"").append(checkAddress).append("\"");
sb.append(",\"checkDate\":")
.append("\"").append(checkDate).append("\"");
sb.append(",\"checkContent\":")
.append("\"").append(checkContent).append("\"");
sb.append(",\"checkPhotos\":")
.append("\"").append(checkPhotos).append("\"");
sb.append(",\"checkType\":")
.append(checkType);
sb.append(",\"checkUserName\":")
.append("\"").append(checkUserName).append("\"");
sb.append('}');
return sb.toString();
}

View File

@ -25,6 +25,26 @@ public class PublicLogDTO {
private String logUserName;
@ApiModelProperty(name = "gmtCreate", value = "创建时间")
private String gmtCreate;
@ApiModelProperty(name = "checkAddress", value = "检查地址")
private String checkAddress;
@ApiModelProperty(name = "checkDate", value = "检查时间")
private String checkDate;
@ApiModelProperty(name = "checkContent", value = "检查内容")
private String checkContent;
@ApiModelProperty(name = "checkPhotos", value = "检查图片")
private String checkPhotos;
@ApiModelProperty(name = "checkType", value = "检查类型")
private Integer checkType;
@ApiModelProperty(name = "handleStatus", value = "处理状态")
private Integer handleStatus;
@ApiModelProperty(name = "handleSummary", value = "处理说明")
private String handleSummary;
@ApiModelProperty(name = "handlePhotos", value = "处理图片")
private String handlePhotos;
@ApiModelProperty(name = "handleUserId", value = "处理人ID")
private String handleUserId;
@ApiModelProperty(name = "handleUserName", value = "处理人")
private String handleUserName;
public String getPublicLogId() {
return publicLogId == null ? "" : publicLogId;
@ -74,21 +94,121 @@ public class PublicLogDTO {
this.gmtCreate = gmtCreate;
}
public String getCheckAddress() {
return checkAddress == null ? "" : checkAddress.trim();
}
public void setCheckAddress(String checkAddress) {
this.checkAddress = checkAddress;
}
public String getCheckDate() {
return checkDate == null ? "" : checkDate.trim();
}
public void setCheckDate(String checkDate) {
this.checkDate = checkDate;
}
public String getCheckContent() {
return checkContent == null ? "" : checkContent.trim();
}
public void setCheckContent(String checkContent) {
this.checkContent = checkContent;
}
public String getCheckPhotos() {
return checkPhotos == null ? "" : checkPhotos.trim();
}
public void setCheckPhotos(String checkPhotos) {
this.checkPhotos = checkPhotos;
}
public Integer getCheckType() {
return checkType;
}
public void setCheckType(Integer checkType) {
this.checkType = checkType;
}
public Integer getHandleStatus() {
return handleStatus;
}
public void setHandleStatus(Integer handleStatus) {
this.handleStatus = handleStatus;
}
public String getHandleSummary() {
return handleSummary == null ? "" : handleSummary.trim();
}
public void setHandleSummary(String handleSummary) {
this.handleSummary = handleSummary;
}
public String getHandlePhotos() {
return handlePhotos == null ? "" : handlePhotos.trim();
}
public void setHandlePhotos(String handlePhotos) {
this.handlePhotos = handlePhotos;
}
public String getHandleUserId() {
return handleUserId == null ? "" : handleUserId.trim();
}
public void setHandleUserId(String handleUserId) {
this.handleUserId = handleUserId;
}
public String getHandleUserName() {
return handleUserName == null ? "" : handleUserName.trim();
}
public void setHandleUserName(String handleUserName) {
this.handleUserName = handleUserName;
}
@Override
public String toString() {
final StringBuilder sb = new StringBuilder("{");
sb.append("\"publicLogId\":\"")
.append(publicLogId).append('\"');
sb.append(",\"publicAreaReportId\":\"")
.append(publicAreaReportId).append('\"');
sb.append(",\"publicLeaderHandleId\":\"")
.append(publicLeaderHandleId).append('\"');
sb.append(",\"logSummary\":\"")
.append(logSummary).append('\"');
sb.append(",\"logUserName\":\"")
.append(logUserName).append('\"');
sb.append(",\"gmtCreate\":\"")
.append(gmtCreate).append('\"');
sb.append("\"publicLogId\":")
.append("\"").append(publicLogId).append("\"");
sb.append(",\"publicAreaReportId\":")
.append("\"").append(publicAreaReportId).append("\"");
sb.append(",\"publicLeaderHandleId\":")
.append("\"").append(publicLeaderHandleId).append("\"");
sb.append(",\"logSummary\":")
.append("\"").append(logSummary).append("\"");
sb.append(",\"logUserName\":")
.append("\"").append(logUserName).append("\"");
sb.append(",\"gmtCreate\":")
.append("\"").append(gmtCreate).append("\"");
sb.append(",\"checkAddress\":")
.append("\"").append(checkAddress).append("\"");
sb.append(",\"checkDate\":")
.append("\"").append(checkDate).append("\"");
sb.append(",\"checkContent\":")
.append("\"").append(checkContent).append("\"");
sb.append(",\"checkPhotos\":")
.append("\"").append(checkPhotos).append("\"");
sb.append(",\"checkType\":")
.append(checkType);
sb.append(",\"handleStatus\":")
.append(handleStatus);
sb.append(",\"handleSummary\":")
.append("\"").append(handleSummary).append("\"");
sb.append(",\"handlePhotos\":")
.append("\"").append(handlePhotos).append("\"");
sb.append(",\"handleUserId\":")
.append("\"").append(handleUserId).append("\"");
sb.append(",\"handleUserName\":")
.append("\"").append(handleUserName).append("\"");
sb.append('}');
return sb.toString();
}

View File

@ -108,4 +108,22 @@ public interface IPublicAreaReportService {
*/
SuccessResultList<List<PublicAreaReportDTO>> listPagePublicAreaReport(ListPage page) throws SearchException;
/**
* 公共区域上报分页列表我的
*
* @param page
* @return
* @throws SearchException
*/
SuccessResultList<List<PublicAreaReportDTO>> listPagePublicAreaReportOfMine(ListPage page) throws SearchException;
/**
* 公共区域上报分页列表APP我的
*
* @param token
* @param page
* @return
* @throws SearchException
*/
SuccessResultList<List<PublicAreaReportDTO>> listPagePublicAreaReportOfMine(String token, ListPage page) throws SearchException;
}

View File

@ -196,4 +196,18 @@ public class PublicAreaReportServiceImpl extends BaseService implements IPublicA
return new SuccessResultList<>(publicAreaReportDTOs, pageInfo.getPageNum(), pageInfo.getTotal());
}
@Override
public SuccessResultList<List<PublicAreaReportDTO>> listPagePublicAreaReportOfMine(ListPage page) throws SearchException {
return listPagePublicAreaReportOfMine(null, page);
}
@Override
public SuccessResultList<List<PublicAreaReportDTO>> listPagePublicAreaReportOfMine(String token, ListPage page) throws SearchException {
if (StringUtils.isBlank(token)) {
page.getParams().put("creator", securityComponent.getCurrentUser().getUserId());
} else {
page.getParams().put("creator", AppTokenManager.getInstance().getToken(token).getAppTokenUser().getId());
}
return listPagePublicAreaReport(page);
}
}

View File

@ -153,4 +153,22 @@ public interface IPublicLeaderHandleService {
*/
SuccessResultData<Integer> countPublicLeaderHandle(Map<String, Object> params) throws SearchException;
/**
* 公共领导处理分页列表我的
*
* @param page
* @return
* @throws SearchException
*/
SuccessResultList<List<PublicLeaderHandleDTO>> listPagePublicLeaderHandleOfMine(ListPage page) throws SearchException;
/**
* 公共领导处理分页列表APP我的
*
* @param token
* @param page
* @return
* @throws SearchException
*/
SuccessResultList<List<PublicLeaderHandleDTO>> listPagePublicLeaderHandleOfMine(String token, ListPage page) throws SearchException;
}

View File

@ -7,15 +7,20 @@ import com.cm.common.pojo.ListPage;
import com.cm.common.result.SuccessResult;
import com.cm.common.result.SuccessResultData;
import com.cm.common.result.SuccessResultList;
import com.cm.common.token.app.AppTokenManager;
import com.cm.common.utils.HashMapUtil;
import com.cm.common.utils.UUIDUtil;
import com.cm.inspection.dao.publicleaderhandle.IPublicLeaderHandleDao;
import com.cm.inspection.pojo.dtos.gridpersonnel.GridPersonnelDTO;
import com.cm.inspection.pojo.dtos.publicleaderhandle.PublicLeaderHandleDTO;
import com.cm.inspection.pojo.vos.publicleaderhandle.PublicLeaderHandleVO;
import com.cm.inspection.service.BaseService;
import com.cm.inspection.service.gridpersonnel.IGridPersonnelService;
import com.cm.inspection.service.publicleaderhandle.IPublicLeaderHandleService;
import com.cm.inspection.service.publiclog.IPublicLogService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -33,6 +38,10 @@ public class PublicLeaderHandleServiceImpl extends BaseService implements IPubli
@Autowired
private IPublicLeaderHandleDao publicLeaderHandleDao;
@Autowired
private IPublicLogService publicLogService;
@Autowired
private IGridPersonnelService gridPersonnelService;
@Override
public SuccessResult savePublicLeaderHandle(PublicLeaderHandleVO publicLeaderHandleVO) throws Exception {
@ -144,6 +153,7 @@ public class PublicLeaderHandleServiceImpl extends BaseService implements IPubli
* @param publicLeaderHandleVO
*/
private void updatePublicLeaderHandleInfo(String token, String publicLeaderHandleId, PublicLeaderHandleVO publicLeaderHandleVO) throws Exception {
String userName = getUserName(token);
Map<String, Object> params = HashMapUtil.beanToMap(publicLeaderHandleVO);
params.put("publicLeaderHandleId", publicLeaderHandleId);
if (token != null) {
@ -152,6 +162,57 @@ public class PublicLeaderHandleServiceImpl extends BaseService implements IPubli
setUpdateInfo(params);
}
publicLeaderHandleDao.updatePublicLeaderHandle(params);
// 处理日志
if (publicLeaderHandleVO.getHandleStatus() == 1) {
LOG.debug("处理成功");
publicLogService.savePublicLogSimple(token, publicLeaderHandleVO.getPublicAreaReportId(), publicLeaderHandleId, "处理成功", userName);
} else if (publicLeaderHandleVO.getHandleStatus() == 2) {
LOG.debug("处理失败,上报领导");
publicLogService.savePublicLogSimple(token, publicLeaderHandleVO.getPublicAreaReportId(), publicLeaderHandleId, "处理失败,上报上级处理", userName);
// 领导处理
GridPersonnelDTO gridPersonnelDTO = gridPersonnelService.getLeader(params.get("creator").toString(), 0);
if (gridPersonnelDTO == null) {
throw new SaveException("非处理人,上报失败");
}
String leaderUserId = gridPersonnelDTO.getLeaderUserId();
if (StringUtils.isBlank(leaderUserId)) {
LOG.debug("上级领导为空,自己继续处理");
leaderUserId = gridPersonnelDTO.getUserId();
}
String[] leaderUserIdArray = leaderUserId.split("\\|");
saveLeaderHandle(token, publicLeaderHandleVO.getPublicAreaReportId(), leaderUserIdArray[0], leaderUserIdArray[2]);
}
}
/**
* 保存上级领导处理结果
*
* @param token
* @param publicAreaReportId
* @param handleUserId
* @param handleUserName
* @throws Exception
*/
private void saveLeaderHandle(String token, String publicAreaReportId, String handleUserId, String handleUserName) throws Exception {
PublicLeaderHandleVO publicLeaderHandleVO = new PublicLeaderHandleVO();
publicLeaderHandleVO.setPublicAreaReportId(publicAreaReportId);
publicLeaderHandleVO.setHandleUserId(handleUserId);
publicLeaderHandleVO.setHandleUserName(handleUserName);
String publicLeaderHandleId = savePublicLeaderHandleByTokenReturnId(token, publicLeaderHandleVO);
publicLogService.savePublicLogSimple(token, publicLeaderHandleVO.getPublicAreaReportId(), publicLeaderHandleId, "等待处理", handleUserId);
}
/**
* 获取用户名
*
* @param token
* @return
*/
private String getUserName(String token) {
if (StringUtils.isBlank(token)) {
return securityComponent.getCurrentUser().getUserName();
}
return AppTokenManager.getInstance().getToken(token).getAppTokenUser().getId();
}
@Override
@ -185,4 +246,18 @@ public class PublicLeaderHandleServiceImpl extends BaseService implements IPubli
return new SuccessResultData<>(countNumberPublicLeaderHandle(params));
}
@Override
public SuccessResultList<List<PublicLeaderHandleDTO>> listPagePublicLeaderHandleOfMine(ListPage page) throws SearchException {
return listPagePublicLeaderHandleOfMine(null, page);
}
@Override
public SuccessResultList<List<PublicLeaderHandleDTO>> listPagePublicLeaderHandleOfMine(String token, ListPage page) throws SearchException {
if (StringUtils.isBlank(token)) {
page.getParams().put("userId", securityComponent.getCurrentUser().getUserId());
} else {
page.getParams().put("userId", AppTokenManager.getInstance().getToken(token).getAppTokenUser().getId());
}
return listPagePublicLeaderHandle(page);
}
}

View File

@ -154,6 +154,10 @@
#{publicAreaReportIds[${index}]}
</foreach>
</if>
<if test="creator != null and creator != ''">
AND
t1.creator = #{creator}
</if>
</select>
</mapper>

View File

@ -10,6 +10,12 @@
<result column="handle_photos" property="handlePhotos"/>
<result column="handle_user_id" property="handleUserId"/>
<result column="handle_user_name" property="handleUserName"/>
<result column="check_address" property="checkAddress"/>
<result column="check_date" property="checkDate"/>
<result column="check_content" property="checkContent"/>
<result column="check_photos" property="checkPhotos"/>
<result column="check_type" property="checkType"/>
<result column="check_user_name" property="checkUserName"/>
</resultMap>
<!-- 新增公共领导处理 -->
@ -105,9 +111,21 @@
t1.handle_status,
t1.handle_summary,
t1.handle_photos,
jt1.check_address,
jt1.check_date,
jt1.check_content,
jt1.check_photos,
jt1.check_type,
jt1.check_user_name,
t1.public_leader_handle_id
FROM
gen_public_leader_handle t1
INNER JOIN
gen_public_area_report jt1
ON
t1.public_area_report_id = jt1.public_area_report_id
AND
jt1.is_delete = 0
WHERE
t1.is_delete = 0
<if test="publicLeaderHandleId != null and publicLeaderHandleId != ''">
@ -125,14 +143,28 @@
t1.handle_photos,
t1.handle_user_id,
t1.handle_user_name,
jt1.check_address,
jt1.check_date,
jt1.check_content,
jt1.check_photos,
jt1.check_type,
jt1.check_user_name,
t1.public_leader_handle_id
FROM
gen_public_leader_handle t1
INNER JOIN
gen_public_area_report jt1
ON
t1.public_area_report_id = jt1.public_area_report_id
AND
jt1.is_delete = 0
WHERE
t1.is_delete = 0
<if test="keywords != null and keywords != ''">
AND (
t1.handle_user_name LIKE CONCAT('%', #{keywords}, '%')
t1.handle_summary LIKE CONCAT('%', #{keywords}, '%')
OR
jt1.check_content LIKE CONCAT('%', #{keywords}, '%')
)
</if>
<if test="startTime != null and startTime != ''">
@ -150,6 +182,10 @@
#{publicLeaderHandleIds[${index}]}
</foreach>
</if>
<if test="userId != null and userId != ''">
AND
t1.handle_user_id = #{userId}
</if>
</select>
<!-- 公共领导处理统计 -->

View File

@ -9,6 +9,16 @@
<result column="log_summary" property="logSummary"/>
<result column="log_user_name" property="logUserName"/>
<result column="gmt_create" property="gmtCreate"/>
<result column="check_address" property="checkAddress"/>
<result column="check_date" property="checkDate"/>
<result column="check_content" property="checkContent"/>
<result column="check_photos" property="checkPhotos"/>
<result column="check_type" property="checkType"/>
<result column="handle_status" property="handleStatus"/>
<result column="handle_summary" property="handleSummary"/>
<result column="handle_photos" property="handlePhotos"/>
<result column="handle_user_id" property="handleUserId"/>
<result column="handle_user_name" property="handleUserName"/>
</resultMap>
<!-- 新增公共日志 -->
@ -112,10 +122,32 @@
t1.public_leader_handle_id,
t1.log_summary,
t1.log_user_name,
LEFT(gmt_create, 19) gmt_create,
t1.public_log_id
LEFT(t1.gmt_create, 19) gmt_create,
t1.public_log_id,
jt1.check_address,
jt1.check_date,
jt1.check_content,
jt1.check_photos,
jt1.check_type,
jt2.handle_status,
jt2.handle_summary,
jt2.handle_photos,
jt2.handle_user_id,
jt2.handle_user_name
FROM
gen_public_log t1
LEFT JOIN
gen_public_area_report jt1
ON
t1.public_area_report_id = jt1.public_area_report_id
AND
jt1.is_delete = 0
LEFT JOIN
gen_public_leader_handle jt2
ON
t1.public_leader_handle_id = jt2.public_leader_handle_id
AND
jt2.is_delete = 0
WHERE
t1.is_delete = 0
<if test="keywords != null and keywords != ''">

View File

@ -154,6 +154,11 @@
return rowData;
}
},
{field: 'log', width: 120, title: '日志', align:'center',
templet: function(row) {
return '<button type="button" class="layui-btn layui-btn-warm layui-btn-sm" lay-event="logEvent">查看日志</button>'
}
},
]],
page: true,
parseData: function(data) {
@ -280,6 +285,19 @@
}
}
});
table.on('tool(dataTable)', function(obj) {
var data = obj.data;
var layEvent = obj.event;
if(layEvent === 'logEvent') {
top.dialog.open({
url: top.restAjax.path('route/publiclog/get-publiclog.html?publicAreaReportId={publicAreaReportId}', [data.publicAreaReportId]),
title: '日志',
width: '500px',
height: '400px',
onClose: function() {}
});
}
});
});
</script>
</body>

View File

@ -0,0 +1,299 @@
<!doctype html>
<html lang="en">
<head>
<base href="/inspection/">
<meta charset="utf-8">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
<link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
</head>
<body>
<div class="layui-fluid layui-anim layui-anim-fadein">
<div class="layui-row">
<div class="layui-col-md12">
<div class="layui-card">
<div class="layui-card-body">
<div class="test-table-reload-btn" style="margin-bottom: 10px;">
<div class="layui-inline">
<input type="text" id="keywords" class="layui-input search-item" placeholder="输入关键字">
</div>
<div class="layui-inline">
<input type="text" id="startTime" class="layui-input search-item" placeholder="开始时间" readonly>
</div>
<div class="layui-inline">
<input type="text" id="endTime" class="layui-input search-item" placeholder="结束时间" readonly>
</div>
<button type="button" id="search" class="layui-btn layui-btn-sm">
<i class="fa fa-lg fa-search"></i> 搜索
</button>
</div>
<table class="layui-hide" id="dataTable" lay-filter="dataTable"></table>
</div>
</div>
</div>
</div>
</div>
<script src="assets/layuiadmin/layui/layui.js"></script>
<script src="assets/js/vendor/viewer/viewer.min.js"></script>
<script>
layui.config({
base: 'assets/layuiadmin/'
}).extend({
index: 'lib/index'
}).use(['index', 'table', 'laydate', 'common'], function() {
var $ = layui.$;
var $win = $(window);
var table = layui.table;
var admin = layui.admin;
var laydate = layui.laydate;
var common = layui.common;
var resizeTimeout = null;
var tableUrl = 'api/publicleaderhandle/listpagepublicleaderhandleofmine';
// 初始化表格
function initTable() {
table.render({
elem: '#dataTable',
id: 'dataTable',
url: top.restAjax.path(tableUrl, []),
width: admin.screen() > 1 ? '100%' : '',
height: $win.height() - 90,
limit: 20,
limits: [20, 40, 60, 80, 100, 200],
toolbar: '#headerToolBar',
request: {
pageName: 'page',
limitName: 'rows'
},
cols: [[
{type:'checkbox', fixed: 'left'},
{field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'},
{field: 'publicAreaReportId', width: 150, title: '区域上报', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'handleStatus', width: 150, title: '处理状态', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null) {
return '-';
}
if(rowData == 0) {
return '待处理';
} else if(rowData == 1) {
return '处理成功';
} else if(rowData == 2) {
return '处理失败';
}
return '无';
}
},
{field: 'handleSummary', width: 200, title: '处理说明', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'handlePhotos', width: 150, title: '处理图片', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
var downloadFile = '';
var datas = rowData.split(',');
for(var i = 0, item = datas[i]; item = datas[i++];) {
if(downloadFile.length > 0) {
downloadFile += ' | ';
}
downloadFile += '<a href="route/file/downloadfile/false/'+ item +'" target="_blank">点击下载</a>'
}
return downloadFile;
}
},
{field: 'handleUserName', width: 150, title: '处理人', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'operation', width: 100, title: '操作', align:'center',
templet: function(row) {
if(row.handleStatus == 0) {
return '<button type="button" class="layui-btn layui-btn-normal layui-btn-sm" lay-event="handleEvent">处理</button>'
}
return '-';
}
},
{field: 'log', width: 120, title: '日志', align:'center',
templet: function(row) {
return '<button type="button" class="layui-btn layui-btn-warm layui-btn-sm" lay-event="logEvent">查看日志</button>'
}
},
]],
page: true,
parseData: function(data) {
return {
'code': 0,
'msg': '',
'count': data.total,
'data': data.rows
};
}
});
}
// 重载表格
function reloadTable(currentPage) {
table.reload('dataTable', {
url: top.restAjax.path(tableUrl, []),
where: {
keywords: $('#keywords').val(),
startTime: $('#startTime').val(),
endTime: $('#endTime').val()
},
page: {
curr: currentPage
},
height: $win.height() - 90,
});
}
// 初始化日期
function initDate() {
// 日期选择
laydate.render({
elem: '#startTime',
format: 'yyyy-MM-dd'
});
laydate.render({
elem: '#endTime',
format: 'yyyy-MM-dd'
});
}
// 删除
function removeData(ids) {
top.dialog.msg(top.dataMessage.delete, {
time: 0,
btn: [top.dataMessage.button.yes, top.dataMessage.button.no],
shade: 0.3,
yes: function (index) {
top.dialog.close(index);
var layIndex;
top.restAjax.delete(top.restAjax.path('api/publicleaderhandle/removepublicleaderhandle/{ids}', [ids]), {}, null, function (code, data) {
top.dialog.msg(top.dataMessage.deleteSuccess, {time: 1000});
reloadTable();
}, function (code, data) {
top.dialog.msg(data.msg);
}, function () {
layIndex = top.dialog.msg(top.dataMessage.deleting, {icon: 16, time: 0, shade: 0.3});
}, function () {
top.dialog.close(layIndex);
});
}
});
}
initTable();
initDate();
// 事件 - 页面变化
$win.on('resize', function() {
clearTimeout(resizeTimeout);
resizeTimeout = setTimeout(function() {
reloadTable();
}, 500);
});
// 事件 - 搜索
$(document).on('click', '#search', function() {
reloadTable(1);
});
// 事件 - 增删改
table.on('toolbar(dataTable)', function(obj) {
var layEvent = obj.event;
var checkStatus = table.checkStatus('dataTable');
var checkDatas = checkStatus.data;
if(layEvent === 'saveEvent') {
layer.open({
type: 2,
title: false,
closeBtn: 0,
area: ['100%', '100%'],
shadeClose: true,
anim: 2,
content: top.restAjax.path('route/publicleaderhandle/save-publicleaderhandle.html', []),
end: function() {
reloadTable();
}
});
} else if(layEvent === 'updateEvent') {
if(checkDatas.length === 0) {
top.dialog.msg(top.dataMessage.table.selectEdit);
} else if(checkDatas.length > 1) {
top.dialog.msg(top.dataMessage.table.selectOneEdit);
} else {
layer.open({
type: 2,
title: false,
closeBtn: 0,
area: ['100%', '100%'],
shadeClose: true,
anim: 2,
content: top.restAjax.path('route/publicleaderhandle/update-publicleaderhandle.html?publicLeaderHandleId={publicLeaderHandleId}', [checkDatas[0].publicLeaderHandleId]),
end: function() {
reloadTable();
}
});
}
} else if(layEvent === 'removeEvent') {
if(checkDatas.length === 0) {
top.dialog.msg(top.dataMessage.table.selectDelete);
} else {
var ids = '';
for(var i = 0, item; item = checkDatas[i++];) {
if(i > 1) {
ids += '_';
}
ids += item['publicLeaderHandleId'];
}
removeData(ids);
}
}
});
table.on('tool(dataTable)', function(obj) {
var data = obj.data;
var layEvent = obj.event;
if(layEvent === 'handleEvent') {
top.dialog.open({
url: top.restAjax.path('route/publicleaderhandle/update-publicleaderhandle.html?publicLeaderHandleId={publicLeaderHandleId}', [data.publicLeaderHandleId]),
title: '处理',
width: '600px',
height: '400px',
onClose: function() {
reloadTable();
}
});
} else if(layEvent === 'logEvent') {
top.dialog.open({
url: top.restAjax.path('route/publiclog/get-publiclog.html?publicAreaReportId={publicAreaReportId}', [data.publicAreaReportId]),
title: '处理',
width: '500px',
height: '400px',
onClose: function() {}
});
}
});
});
</script>
</body>
</html>

View File

@ -104,6 +104,8 @@
return '待处理';
} else if(rowData == 1) {
return '处理成功';
} else if(rowData == 2) {
return '处理失败';
}
return '无';
}
@ -143,6 +145,19 @@
return rowData;
}
},
{field: 'operation', width: 100, title: '操作', align:'center',
templet: function(row) {
if(row.handleStatus == 0) {
return '<button type="button" class="layui-btn layui-btn-normal layui-btn-sm" lay-event="handleEvent">处理</button>'
}
return '-';
}
},
{field: 'log', width: 120, title: '日志', align:'center',
templet: function(row) {
return '<button type="button" class="layui-btn layui-btn-warm layui-btn-sm" lay-event="logEvent">查看日志</button>'
}
},
]],
page: true,
parseData: function(data) {
@ -269,6 +284,29 @@
}
}
});
table.on('tool(dataTable)', function(obj) {
var data = obj.data;
var layEvent = obj.event;
if(layEvent === 'handleEvent') {
top.dialog.open({
url: top.restAjax.path('route/publicleaderhandle/update-publicleaderhandle.html?publicLeaderHandleId={publicLeaderHandleId}', [data.publicLeaderHandleId]),
title: '处理',
width: '600px',
height: '400px',
onClose: function() {
reloadTable();
}
});
} else if(layEvent === 'logEvent') {
top.dialog.open({
url: top.restAjax.path('route/publiclog/get-publiclog.html?publicAreaReportId={publicAreaReportId}', [data.publicAreaReportId]),
title: '处理',
width: '500px',
height: '400px',
onClose: function() {}
});
}
});
});
</script>
</body>

View File

@ -12,32 +12,67 @@
<link rel="stylesheet" type="text/css" href="assets/js/vendor/viewer/viewer.min.css">
</head>
<body>
<div class="layui-fluid layui-anim layui-anim-fadein">
<div class="layui-anim layui-anim-fadein">
<div class="layui-card">
<div class="layui-card-header">
<span class="layui-breadcrumb" lay-filter="breadcrumb" style="visibility: visible;">
<a class="close" href="javascript:void(0);">上级列表</a><span lay-separator="">/</span>
<a href="javascript:void(0);"><cite>编辑内容</cite></a>
</span>
</div>
<div class="layui-card-body" style="padding: 15px;">
<form class="layui-form layui-form-pane" lay-filter="dataForm">
<div class="layui-form-item">
<label class="layui-form-label">区域上报</label>
<div class="layui-input-block">
<input type="text" id="publicAreaReportId" name="publicAreaReportId" class="layui-input" value="" placeholder="请输入区域上报" >
<input type="hidden" id="publicAreaReportId" name="publicAreaReportId" disabled>
<div class="layui-row">
<div class="layui-col-xs6 layui-col-sm6 layui-col-md6">
<div class="layui-form-item">
<label class="layui-form-label">上报时间</label>
<div class="layui-input-block">
<input type="text" id="checkDate" name="checkDate" class="layui-input" disabled>
</div>
</div>
</div>
<div class="layui-col-xs6 layui-col-sm6 layui-col-md6">
<div class="layui-form-item">
<label class="layui-form-label">上报人</label>
<div class="layui-input-block">
<input type="text" id="checkUserName" name="checkUserName" class="layui-input" disabled>
</div>
</div>
</div>
</div>
<div class="layui-form-item">
<div class="layui-form-item layui-form-text">
<label class="layui-form-label">上报说明</label>
<div class="layui-input-block">
<textarea id="checkContent" name="checkContent" class="layui-textarea" disabled></textarea>
</div>
</div>
<div class="layui-form-item layui-form-text">
<label class="layui-form-label">上报图片</label>
<div class="layui-input-block">
<input type="hidden" id="checkPhotos" name="checkPhotos" disabled>
<div class="layui-btn-container" id="checkPhotosFileBox" style="border: 1px solid #e6e6e6;"></div>
<script id="checkPhotosFileDownload" type="text/html">
{{# var fileName = 'checkPhotos'; }}
{{# if(d[fileName].length > 0) { }}
{{# var files = d[fileName];}}
{{# for(var i = 0, item = files[i]; item = files[i++];) { }}
<div class="upload-image-box">
<span class="upload-image-span">
<img src="route/file/downloadfile/false/{{item.fileId}}" align="加载失败">
</span>
</div>
{{# } }}
{{# } }}
</script>
</div>
</div>
<blockquote class="layui-elem-quote">以下是处理结果</blockquote>
<div class="layui-form-item" pane>
<label class="layui-form-label">处理状态</label>
<div class="layui-input-block">
<input type="number" id="handleStatus" name="handleStatus" class="layui-input" value="0" placeholder="请输入处理状态" lay-verify="required">
<input type="radio" name="handleStatus" value="1" title="处理成功" checked>
<input type="radio" name="handleStatus" value="2" title="无法处理">
</div>
</div>
<div class="layui-form-item">
<div class="layui-form-item layui-form-text">
<label class="layui-form-label">处理说明</label>
<div class="layui-input-block">
<input type="text" id="handleSummary" name="handleSummary" class="layui-input" value="" placeholder="请输入处理说明" >
<textarea id="handleSummary" name="handleSummary" class="layui-textarea" placeholder="请输入处理说明"></textarea>
</div>
</div>
<div class="layui-form-item layui-form-text">
@ -73,8 +108,8 @@
<div class="layui-form-item layui-layout-admin">
<div class="layui-input-block">
<div class="layui-footer" style="left: 0;">
<button type="button" class="layui-btn" lay-submit lay-filter="submitForm">提交编辑</button>
<button type="button" class="layui-btn layui-btn-primary close">返回上级</button>
<button type="button" class="layui-btn" lay-submit lay-filter="submitForm">提交处理</button>
<button type="button" class="layui-btn layui-btn-primary close">关闭窗口</button>
</div>
</div>
</div>
@ -82,8 +117,6 @@
</div>
</div>
</div>
<script src="assets/js/vendor/wangEditor/wangEditor.min.js"></script>
<script src="assets/js/vendor/ckplayer/ckplayer/ckplayer.js"></script>
<script src="assets/js/vendor/viewer/viewer.min.js"></script>
<script src="assets/layuiadmin/layui/layui.js"></script>
<script>
@ -98,8 +131,6 @@
var laydate = layui.laydate;
var publicLeaderHandleId = top.restAjax.params(window.location.href).publicLeaderHandleId;
var wangEditor = window.wangEditor;
var wangEditorObj = {};
var viewerObj = {};
function closeBox() {
@ -141,19 +172,13 @@
});
}
// 初始化视频
function initVideo(fileName, data) {
for(var i = 0, item; item = data[i++];) {
var player = new ckplayer({
container: '#'+ fileName + i,
variable: 'player',
flashplayer: false,
video: {
file: 'route/file/downloadfile/true/'+ item.fileId,
type: 'video/mp4'
}
});
}
// 初始化检查图片
function initCheckPhotosUploadFile() {
var files = $('#checkPhotos').val();
initFileList('checkPhotos', files, function(fileName) {
var viewer = new Viewer(document.getElementById(fileName +'FileBox'), {navbar: false});
viewerObj[fileName] = viewer;
});
}
// 初始化处理图片图片上传
@ -219,6 +244,7 @@
}
form.val('dataForm', dataFormData);
form.render(null, 'dataForm');
initCheckPhotosUploadFile();
initHandlePhotosUploadFile();
}, function(code, data) {
top.dialog.msg(data.msg);

View File

@ -0,0 +1,119 @@
<!doctype html>
<html lang="en">
<head>
<base href="/inspection/">
<meta charset="utf-8">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
<link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
<style>
.table-left-header {text-align: center; background-color: #f2f2f2;}
</style>
</head>
<body>
<div class="layui-fluid layui-anim layui-anim-fadein" style="padding: 0px;">
<div class="layui-card">
<div class="layui-card-body" style="padding: 15px;">
<ul class="layui-timeline" id="timelineTemplateBox"></ul>
<script id="timelineTemplate" type="text/html">
{{# for(var i = 0, item; item = d[i++];) { }}
<li class="layui-timeline-item">
<i class="layui-icon layui-timeline-axis">&#xe63f;</i>
<div class="layui-timeline-content layui-text">
<h3 class="layui-timeline-title">{{item.gmtCreate}}</h3>
<p>
<table class="layui-table">
<colgroup>
<col width="120">
<col width="400">
<col>
</colgroup>
<thead>
</thead>
<tbody>
<tr>
<td class="table-left-header">说明</td>
<td>{{item.logSummary}}</td>
</tr>
<tr>
<td class="table-left-header">处理人</td>
<td>{{item.logUserName}}</td>
</tr>
{{# if(item.checkPhotos && item.checkPhotos != '') { }}
<tr>
<td class="table-left-header">检查图片</td>
<td>
{{# var fileArray = item.checkPhotos.split(','); }}
{{# for(var fileindex = 0, file; file = fileArray[fileindex++];) { }}
<div class="upload-image-box" style="padding: 0px;">
<span class="upload-image-span">
<img src="route/file/downloadfile/false/{{file}}" align="加载失败">
</span>
</div>
{{# } }}
</td>
</tr>
{{# } }}
{{# if(item.handlePhotos && item.handlePhotos != '') { }}
<tr>
<td class="table-left-header">处理图片</td>
<td>
{{# var fileArray = item.handlePhotos.split(','); }}
{{# for(var fileindex = 0, file; file = fileArray[fileindex++];) { }}
<div class="upload-image-box" style="padding: 0px;">
<span class="upload-image-span">
<img src="route/file/downloadfile/false/{{file}}" align="加载失败">
</span>
</div>
{{# } }}
</td>
</tr>
{{# } }}
</tbody>
</table>
</p>
</div>
</li>
{{# } }}
</script>
</div>
</div>
</div>
<script src="assets/layuiadmin/layui/layui.js"></script>
<script>
layui.config({
base: 'assets/layuiadmin/' //静态资源所在路径
}).extend({
index: 'lib/index' //主入口模块
}).use(['index', 'laytpl'], function(){
var $ = layui.$;
var form = layui.form;
var laytpl = layui.laytpl;
var publicAreaReportId = top.restAjax.params(window.location.href).publicAreaReportId;
function closeBox() {
parent.layer.close(parent.layer.getFrameIndex(window.name));
}
// 初始化内容
function initData() {
top.restAjax.get(top.restAjax.path('api/publiclog/listpubliclogbypublicareareportid/{publicAreaReportId}', [publicAreaReportId]), {}, null, function(code, data) {
laytpl(document.getElementById('timelineTemplate').innerHTML).render(data, function(html) {
document.getElementById('timelineTemplateBox').innerHTML = html;
});
}, function(code, data) {
top.dialog.msg(data.msg);
}, function() {
loadLayerIndex = top.dialog.msg(top.dataMessage.loading, {icon: 16, time: 0, shade: 0.3});
}, function() {
top.dialog.close(loadLayerIndex);
});
}
initData();
});
</script>
</body>
</html>