list;
@Data
public class SocietyOrgList{
@@ -51,9 +53,11 @@ public class GetListSocietyOrgResultDTO implements Serializable {
//负责人电话
private String mobile;
//起始服务时间
- private String serviceStartTime;
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+ private Date serviceStartTime;
//终止服务时间
- private String serviceEndTime;
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+ private Date serviceEndTime;
//绑定管理员[组织下Id录入的工作人员]
private String adminStaffId;
//绑定管理员[组织下录入的工作人员]姓名
diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/SocietyOrgListResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/SocietyOrgListResultDTO.java
new file mode 100644
index 0000000000..30b23d3ed6
--- /dev/null
+++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/SocietyOrgListResultDTO.java
@@ -0,0 +1,61 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.dto.result;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @Author sun
+ * @Description 社会组织列表查询
+ **/
+@Data
+public class SocietyOrgListResultDTO implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ //所属组织Id
+ private String agencyId;
+ //社会组织Id
+ private String societyId;
+ //社会组织名称
+ private String societyName;
+ //服务事项
+ private String serviceMatters;
+ //负责人姓名
+ private String personInCharge;
+ //负责人电话
+ private String mobile;
+ //起始服务时间
+ //@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+ //private Date serviceStartTime;
+ private String serviceStartTime;
+ //终止服务时间
+ private String serviceEndTime;
+ //绑定管理员[组织下Id录入的工作人员]
+ private String adminStaffId;
+ //绑定管理员[组织下录入的工作人员]姓名
+ private String adminStaffName = "";
+ //地址
+ private String address;
+ //经度
+ private String longitude;
+ //维度
+ private String dimension;
+
+}
diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcSocietyOrgController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcSocietyOrgController.java
index e34a042862..0b97210715 100644
--- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcSocietyOrgController.java
+++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcSocietyOrgController.java
@@ -57,7 +57,7 @@ public class IcSocietyOrgController {
@PostMapping("add")
public Result add(@LoginUser TokenDto tokenDto, @RequestBody AddSocietyOrgFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, AddSocietyOrgFormDTO.Add.class);
- formDTO.setCustomerId(tokenDto.getToken());
+ formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setStaffId(tokenDto.getUserId());
societyOrgService.add(formDTO);
return new Result();
diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcSocietyOrgDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcSocietyOrgDao.java
index 0772af28de..2a435d7d9f 100644
--- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcSocietyOrgDao.java
+++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcSocietyOrgDao.java
@@ -20,6 +20,7 @@ package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.form.GetListSocietyOrgFormDTO;
import com.epmet.dto.result.GetListSocietyOrgResultDTO;
+import com.epmet.dto.result.SocietyOrgListResultDTO;
import com.epmet.dto.result.demand.OptionDTO;
import com.epmet.entity.IcSocietyOrgEntity;
import org.apache.ibatis.annotations.Mapper;
@@ -40,7 +41,7 @@ public interface IcSocietyOrgDao extends BaseDao {
* @Author sun
* @Description 社会组织列表查询
**/
- List getList(GetListSocietyOrgFormDTO formDTO);
+ List getList(GetListSocietyOrgFormDTO formDTO);
/**
* 需求指派,选择社会组织,调用此接口
diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcSocietyOrgEntity.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcSocietyOrgEntity.java
index e1abf636fe..3c564349cb 100644
--- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcSocietyOrgEntity.java
+++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcSocietyOrgEntity.java
@@ -33,7 +33,7 @@ import java.util.Date;
*/
@Data
@EqualsAndHashCode(callSuper=false)
-@TableName("society_org")
+@TableName("ic_society_org")
public class IcSocietyOrgEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcSocietyOrgServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcSocietyOrgServiceImpl.java
index 1acdcba831..2376a88150 100644
--- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcSocietyOrgServiceImpl.java
+++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcSocietyOrgServiceImpl.java
@@ -32,6 +32,7 @@ import com.epmet.dto.form.GetListSocietyOrgFormDTO;
import com.epmet.dto.form.UserIdsFormDTO;
import com.epmet.dto.form.demand.ServiceQueryFormDTO;
import com.epmet.dto.result.GetListSocietyOrgResultDTO;
+import com.epmet.dto.result.SocietyOrgListResultDTO;
import com.epmet.dto.result.StaffSinGridResultDTO;
import com.epmet.dto.result.demand.OptionDTO;
import com.epmet.entity.IcSocietyOrgEntity;
@@ -92,6 +93,7 @@ public class IcSocietyOrgServiceImpl extends BaseServiceImpl%s", formDTO.getSocietyId()));
}
entity = ConvertUtils.sourceToTarget(formDTO, IcSocietyOrgEntity.class);
+ entity.setId(formDTO.getSocietyId());
baseDao.updateById(entity);
}
@@ -114,7 +116,7 @@ public class IcSocietyOrgServiceImpl extends BaseServiceImpl result =
+ PageInfo result =
PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.getList(formDTO));
if (CollectionUtils.isEmpty(result.getList())) {
return resultDTO;
@@ -122,7 +124,7 @@ public class IcSocietyOrgServiceImpl extends BaseServiceImpl staffIdList = result.getList().stream().map(GetListSocietyOrgResultDTO.SocietyOrgList::getAdminStaffId).collect(Collectors.toList());
+ List staffIdList = result.getList().stream().map(SocietyOrgListResultDTO::getAdminStaffId).collect(Collectors.toList());
staffIdList = staffIdList.stream().distinct().collect(Collectors.toList());
dto.setUserIds(staffIdList);
Result> listResult = epmetUserOpenFeignClient.getStaffInfoList(dto);
@@ -143,19 +145,19 @@ public class IcSocietyOrgServiceImpl extends BaseServiceImpl queryServiceList(ServiceQueryFormDTO formDTO) {
- List resultList=new ArrayList<>();
+ List resultList = new ArrayList<>();
CustomerStaffInfoCacheResult staffInfoCacheResult = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId());
if (null == staffInfoCacheResult || StringUtils.isBlank(staffInfoCacheResult.getAgencyId())) {
throw new RenException("工作人员所属组织信息查询异常");
}
- List agencyIds=new ArrayList<>();
+ List agencyIds = new ArrayList<>();
if (StringUtils.isNotBlank(staffInfoCacheResult.getAgencyPIds()) && !NumConstant.ZERO_STR.equals(staffInfoCacheResult.getAgencyPIds())) {
- if(staffInfoCacheResult.getAgencyPIds().contains(StrConstant.COLON)){
+ if (staffInfoCacheResult.getAgencyPIds().contains(StrConstant.COLON)) {
agencyIds.addAll(Arrays.asList(staffInfoCacheResult.getAgencyPIds().split(StrConstant.COLON)));
}
}
agencyIds.add(staffInfoCacheResult.getAgencyId());
- resultList=baseDao.selectListByAgencyId(agencyIds,formDTO.getServiceName(),formDTO.getCustomerId(),formDTO.getQueryPurpose());
+ resultList = baseDao.selectListByAgencyId(agencyIds, formDTO.getServiceName(), formDTO.getCustomerId(), formDTO.getQueryPurpose());
return resultList;
}
diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcSocietyOrgDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcSocietyOrgDao.xml
index 51e42c8402..4c91e2e3e7 100644
--- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcSocietyOrgDao.xml
+++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcSocietyOrgDao.xml
@@ -3,7 +3,7 @@
-