diff --git a/esua-epdc/epdc-auth/src/main/java/com/elink/esua/epdc/controller/AuthController.java b/esua-epdc/epdc-auth/src/main/java/com/elink/esua/epdc/controller/AuthController.java index 4a387f8b4..867d61942 100644 --- a/esua-epdc/epdc-auth/src/main/java/com/elink/esua/epdc/controller/AuthController.java +++ b/esua-epdc/epdc-auth/src/main/java/com/elink/esua/epdc/controller/AuthController.java @@ -8,6 +8,7 @@ package com.elink.esua.epdc.controller; +import cn.hutool.core.convert.Convert; import com.elink.esua.epdc.common.token.dto.*; import com.elink.esua.epdc.commons.tools.constant.Constant; import com.elink.esua.epdc.commons.tools.exception.ErrorCode; @@ -16,10 +17,7 @@ import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; import com.elink.esua.epdc.commons.tools.utils.Result; import com.elink.esua.epdc.commons.tools.validator.AssertUtils; import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils; -import com.elink.esua.epdc.dto.AuthorizationDTO; -import com.elink.esua.epdc.dto.LoginDTO; -import com.elink.esua.epdc.dto.SysUserAnalysisOpenIdFormDTO; -import com.elink.esua.epdc.dto.SysUserOpenIdFormDTO; +import com.elink.esua.epdc.dto.*; import com.elink.esua.epdc.service.AuthService; import com.elink.esua.epdc.service.CaptchaService; import com.elink.esua.epdc.service.ResourceService; @@ -87,6 +85,25 @@ public class AuthController { return new Result().ok(authorization); } + @PostMapping(value = "autologin") + @ApiOperation(value = "自动登录") + public Result autoLogin(@RequestBody AutoLoginDTO login) { + //效验数据 + ValidatorUtils.validateEntity(login); + + // 特定账号才可以免登录 + boolean flag = "screen".equals(login.getUsername()); + if (!flag) { + return new Result().error(ErrorCode.FORBIDDEN); + } + login.setPassword("123"); + LoginDTO loginDTO = ConvertUtils.sourceToTarget(login, LoginDTO.class); + //获取登录授权信息 + AuthorizationDTO authorization = authService.login(loginDTO); + + return new Result().ok(authorization); + } + /** * * 工作端-获取token diff --git a/esua-epdc/epdc-auth/src/main/java/com/elink/esua/epdc/dto/AutoLoginDTO.java b/esua-epdc/epdc-auth/src/main/java/com/elink/esua/epdc/dto/AutoLoginDTO.java new file mode 100644 index 000000000..0eefee790 --- /dev/null +++ b/esua-epdc/epdc-auth/src/main/java/com/elink/esua/epdc/dto/AutoLoginDTO.java @@ -0,0 +1,37 @@ +/** + * Copyright (c) 2018 人人开源 All rights reserved. + * + * https://www.renren.io + * + * 版权所有,侵权必究! + */ + +package com.elink.esua.epdc.dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * 登录信息 + * + * @author Mark sunlightcs@gmail.com + * @since 1.0.0 + */ +@Data +@ApiModel(value = "登录信息") +public class AutoLoginDTO implements Serializable { + private static final long serialVersionUID = 1L; + + @ApiModelProperty(value = "用户名", required = true) + @NotBlank(message="{sysuser.username.require}") + private String username; + + @ApiModelProperty(value = "密码") + @NotBlank(message="{sysuser.password.require}") + private String password; + +} diff --git a/esua-epdc/epdc-cloud-commons-shibei b/esua-epdc/epdc-cloud-commons-shibei index 89bb48135..ea7a11ae1 160000 --- a/esua-epdc/epdc-cloud-commons-shibei +++ b/esua-epdc/epdc-cloud-commons-shibei @@ -1 +1 @@ -Subproject commit 89bb48135eb0db7b1682b1e7d51b0bd5c8d02a0f +Subproject commit ea7a11ae181a0b6b82775a6b7e859b4dbb3e550b diff --git a/esua-epdc/epdc-cloud-gateway-shibei b/esua-epdc/epdc-cloud-gateway-shibei index 4a4caf14c..93f353e1a 160000 --- a/esua-epdc/epdc-cloud-gateway-shibei +++ b/esua-epdc/epdc-cloud-gateway-shibei @@ -1 +1 @@ -Subproject commit 4a4caf14c35de0d4678fd94d141da3661b549c1e +Subproject commit 93f353e1aed743c80b0c66938c0af142a806ef5b diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/item/result/ItemAppealPageResultDTO.java b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/item/result/ItemAppealPageResultDTO.java index ba1399bac..e82a794b7 100644 --- a/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/item/result/ItemAppealPageResultDTO.java +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/item/result/ItemAppealPageResultDTO.java @@ -125,4 +125,9 @@ public class ItemAppealPageResultDTO implements Serializable { */ private String remainTime; + /** + * 流程最新状态 + */ + private String processState; + } diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/impl/ItemServiceImpl.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/impl/ItemServiceImpl.java index e25a71e92..96f164a4a 100755 --- a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/impl/ItemServiceImpl.java +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/impl/ItemServiceImpl.java @@ -4436,7 +4436,7 @@ public class ItemServiceImpl extends BaseServiceImpl implem throw new RenException("获取部门信息失败,部门ID:" + deptId); } //当前处理层级应该是街道 - if ("street_party".equals(dept.getData().getTypeKey())) { + if (!"street_party".equals(dept.getData().getTypeKey())) { throw new RenException("当前处理层级不是街道级"); } ItemHandleProcessEntity handleProcessEntity = new ItemHandleProcessEntity(); @@ -4452,6 +4452,12 @@ public class ItemServiceImpl extends BaseServiceImpl implem handleProcessEntity.setState(ItemHandleCategoryEnum.HANDLE_I_HANDLE_CHECK_APPLY.getValue()); itemHandleProcessService.insert(handleProcessEntity); + // 删除已流转协助部门 + itemDeptService.modifyItemDepts(deptId, formDTO.getId()); + // 新增流转协助部门 + ItemHandleSubmitFormDTO dto = ConvertUtils.sourceToTarget(formDTO, ItemHandleSubmitFormDTO.class); + itemDeptService.saveItemDepts(dto.getHandlerDeptId(), dto, handleProcessEntity.getId()); + //上报市平台 pushToCityGridService.earlyInspection(ConvertUtils.sourceToTarget(handleProcessEntity, ItemHandleProcessDTO.class)); } else { @@ -4498,7 +4504,7 @@ public class ItemServiceImpl extends BaseServiceImpl implem throw new RenException("获取部门信息失败,部门ID:" + deptId); } //当前处理层级应该是区 - if ("district_party".equals(dept.getData().getTypeKey())) { + if (!"district_party".equals(dept.getData().getTypeKey())) { throw new RenException("当前处理层级不是区级"); } @@ -4660,7 +4666,6 @@ public class ItemServiceImpl extends BaseServiceImpl implem } } - @Transactional(rollbackFor = Exception.class) public ItemHandleProcessDTO closedItem(AcceptPlantformProcessDTO formDto) { String successFlag = YesOrNoEnum.NO.value(); @@ -4767,7 +4772,7 @@ public class ItemServiceImpl extends BaseServiceImpl implem return new Result().error("未查到相关项目,诉求ID:" + formDTO.getSqid()); } process.setItemId(item.getId()); - process.setState(ItemGridPlatformHandleStatusEnum.HANDLE_QSJB_DB.getValue()); + process.setState(ItemGridPlatformHandleStatusEnum.HANDLE_QSJB_BH.getValue()); process.setHandleAdvice(formDTO.getBhyy()); process.setOutHandleAdvice(formDTO.getBhyy()); process.setHandlerDept("青诉即办平台"); @@ -4790,7 +4795,7 @@ public class ItemServiceImpl extends BaseServiceImpl implem return new Result().error("未查到相关项目,诉求ID:" + formDTO.getSqid()); } process.setItemId(item.getId()); - process.setState(ItemGridPlatformHandleStatusEnum.HANDLE_QSJB_DB.getValue()); + process.setState(ItemGridPlatformHandleStatusEnum.HANDLE_QSJB_FK.getValue()); process.setHandleAdvice(formDTO.getCljg()); process.setOutHandleAdvice(formDTO.getCljg()); process.setHandlerDept("青诉即办平台"); diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/item/ItemDao.xml b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/item/ItemDao.xml index 91d14e8d8..957cbfb04 100755 --- a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/item/ItemDao.xml +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/item/ItemDao.xml @@ -571,13 +571,12 @@ from epdc_item_handle_process where b.ITEM_ID = ITEM_ID and DEL_FLAG = '0' - and STATE != 16 ) and b.HANDLER_DEPT != '网格化平台' ) process on process.ITEM_ID = item.ID WHERE item.DEL_FLAG = '0' - and (process.state is not null and process.state not in (11,14,15)) + and (process.state is not null and process.state not in (11,14,15,16)) and (item.IS_PEOPLE = '0' or (item.IS_PEOPLE = '1' and item.PEOPLE_FLAG = '0')) @@ -819,19 +818,11 @@ from epdc_item_handle_process where b.ITEM_ID = ITEM_ID and DEL_FLAG = '0' - and STATE != 16 ) - and b.HANDLER_DEPT != '网格化平台' ) process on process.ITEM_ID = item.ID WHERE item.DEL_FLAG = '0' - and (process.state is not null and process.state not in (11,14,15,1002)) + and (process.state is not null and process.state in (1004,1106)) and item.IS_PEOPLE = '1' - and ( - (item.PEOPLE_FLAG = '0' - AND item.evaluation_score = '0' - AND item.evaluation_time ( NOW() - interval 24 HOUR )) - or item.PEOPLE_FLAG in ('1','2') - ) and (process.state != 0 or process.state is null) @@ -931,7 +922,6 @@ from epdc_item_handle_process where b.ITEM_ID = ITEM_ID and DEL_FLAG = '0' - and STATE != 16 ) and b.HANDLER_DEPT != '网格化平台' ) process on process.ITEM_ID = item.ID @@ -1040,14 +1030,13 @@ from epdc_item_handle_process where b.ITEM_ID = ITEM_ID and DEL_FLAG = '0' - and STATE != 16 ) and b.HANDLER_DEPT != '网格化平台' ) process on process.ITEM_ID = item.ID WHERE item.DEL_FLAG = '0' and (item.IS_PEOPLE = '0' or (item.IS_PEOPLE = '1' and item.PEOPLE_FLAG = '0')) - and (process.state is not null and process.state not in (11,14,15)) + and (process.state is not null and process.state not in (11,14,15,16)) and (process.state != 0 or process.state is null) @@ -1158,7 +1147,6 @@ from epdc_item_handle_process where b.ITEM_ID = ITEM_ID and DEL_FLAG = '0' - and STATE != 16 ) and (b.HANDLER_DEPT != '网格化平台' or (b.HANDLER_DEPT = '网格化平台' and b.STATE in (1060,1065))) ) process on process.ITEM_ID = item.ID @@ -1262,7 +1250,6 @@ from epdc_item_handle_process where b.ITEM_ID = ITEM_ID and DEL_FLAG = '0' - and STATE != 16 ) and (b.HANDLER_DEPT != '网格化平台' or (b.HANDLER_DEPT = '网格化平台' and b.STATE in (1060,1065))) ) process on process.ITEM_ID = item.ID @@ -1344,7 +1331,6 @@ from epdc_item_handle_process where b.ITEM_ID = ITEM_ID and DEL_FLAG = '0' - and STATE != 16 ) and (b.HANDLER_DEPT != '网格化平台' or (b.HANDLER_DEPT = '网格化平台' and b.STATE in (1060,1065))) ) process on process.ITEM_ID = i.ID @@ -2158,6 +2144,7 @@ when '2' then '非常满意' else '' end as evaluationScoreName, + process.state AS processState, i.EVALUATION_CONTENT, i.EVALUATION_TIME FROM epdc_item i @@ -2171,7 +2158,6 @@ from epdc_item_handle_process where b.ITEM_ID = ITEM_ID and DEL_FLAG = '0' - and STATE != 16 ) and (b.HANDLER_DEPT != '网格化平台' or (b.HANDLER_DEPT = '网格化平台' and b.STATE in (1060,1065))) ) process on process.ITEM_ID = i.ID @@ -2267,7 +2253,6 @@ from epdc_item_handle_process where b.ITEM_ID = ITEM_ID and DEL_FLAG = '0' - and STATE != 16 ) and (b.HANDLER_DEPT != '网格化平台' or (b.HANDLER_DEPT = '网格化平台' and b.STATE in (1060,1065))) ) process on process.ITEM_ID = i.ID @@ -2450,7 +2435,6 @@ max(CREATED_TIME) from epdc_item_handle_process where DEL_FLAG = 0 - and STATE != 16 and b.ITEM_ID = ITEM_ID ) ) process on process.ITEM_ID = i.ID @@ -2484,7 +2468,6 @@ max(CREATED_TIME) from epdc_item_handle_process where DEL_FLAG='0' - and STATE != 16 and b.ITEM_ID = ITEM_ID ) ) process on process.ITEM_ID = i.ID