Browse Source

Merge remote-tracking branch 'remotes/origin/dev_grid_user_work' into develop

master
jianjun 4 years ago
parent
commit
c1f7421ce5
  1. 8
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/PatrolRoutineWorkFormDTO.java
  2. 10
      epmet-user/epmet-user-server/src/main/java/com/epmet/entity/PatrolRoutineWorkEntity.java
  3. 6
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/PatrolRoutineWorkServiceImpl.java
  4. 3
      epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.21__user_routine_work_2.sql

8
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/PatrolRoutineWorkFormDTO.java

@ -50,9 +50,13 @@ public class PatrolRoutineWorkFormDTO implements Serializable {
private String address;
/**
* 基础信息ID相关信息暂时没有
* 当事件类型为特殊人群服务与管理时必填 重点人员是否在当地
*/
private String baseInfoId;
private String isKeyPeopleLocate;
/**
* 重点人员现状
*/
private String keyPeopleStatus;
/**
* 经度
*/

10
epmet-user/epmet-user-server/src/main/java/com/epmet/entity/PatrolRoutineWorkEntity.java

@ -75,6 +75,16 @@ public class PatrolRoutineWorkEntity extends BaseEpmetEntity {
*/
private String workContent;
/**
* 当事件类型为特殊人群服务与管理时必填 重点人员是否在当地
*/
private String isKeyPeopleLocate;
/**
* 重点人员现状
*/
private String keyPeopleStatus;
/**
* 经度
*/

6
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/PatrolRoutineWorkServiceImpl.java

@ -39,6 +39,7 @@ import com.epmet.feign.GovOrgOpenFeignClient;
import com.epmet.service.PatrolRoutineWorkService;
import com.epmet.service.PatrolRoutineWorkTypeService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -76,6 +77,11 @@ public class PatrolRoutineWorkServiceImpl extends BaseServiceImpl<PatrolRoutineW
@Transactional(rollbackFor = Exception.class)
@Override
public void add(PatrolRoutineWorkFormDTO formDTO) {
if (formDTO.getWorkTypeList().toString().contains("02")
&& (StringUtils.isBlank(formDTO.getIsKeyPeopleLocate()) || StringUtils.isBlank(formDTO.getKeyPeopleStatus()))){
log.warn("add patrolRoutineWork fail,param is error,param:{}", JSON.toJSONString(formDTO));
throw new EpmetException(EpmetErrorCode.ORG_ADD_FAILED.getCode());
}
PatrolRoutineWorkEntity entity = ConvertUtils.sourceToTarget(formDTO, PatrolRoutineWorkEntity.class);
CustomerGridFormDTO gridFormDTO = new CustomerGridFormDTO();

3
epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.21__user_routine_work_2.sql

@ -0,0 +1,3 @@
ALTER TABLE `epmet_user`.`patrol_routine_work`
ADD COLUMN `IS_KEY_PEOPLE_LOCATE` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '重点人员是否在当地-当事件类型为【特殊人群服务与管理】时必填' AFTER `WORK_CONTENT`,
ADD COLUMN `KEY_PEOPLE_STATUS` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '重点人员现状' AFTER `IS_KEYPEOPLE_LOCATE`;
Loading…
Cancel
Save