Browse Source

组织部门网格新增编辑详情列表入参返参调整

master
sunyuchao 4 years ago
parent
commit
9f1f762bee
  1. 12
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AddAgencyV2FormDTO.java
  2. 13
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AddDepartmentFormDTO.java
  3. 16
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AddGridFormDTO.java
  4. 13
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/EditAgencyFormDTO.java
  5. 13
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/EditDepartmentFormDTO.java
  6. 16
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/EditGridFormDTO.java
  7. 8
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AgencyListResultDTO.java
  8. 12
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AgencysResultDTO.java
  9. 13
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/DepartmentDetailResultDTO.java
  10. 10
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/DepartmentListResultDTO.java
  11. 9
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GridBaseInfoResultDTO.java
  12. 17
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GridDetailResultDTO.java
  13. 6
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/AgencyServiceImpl.java
  14. 8
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java
  15. 4
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/DepartmentServiceImpl.java
  16. 4
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml
  17. 4
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerDepartmentDao.xml
  18. 14
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerGridDao.xml

12
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AddAgencyV2FormDTO.java

@ -87,4 +87,16 @@ public class AddAgencyV2FormDTO implements Serializable {
//区域编码名称
@NotBlank(message = "", groups = AreaCodeGroup.class)
private String areaName;
/**
* 组织编码[手动输入的]
*/
private String code;
/**
* 负责人
*/
private String contacts;
/**
* 联系电话
*/
private String mobile;
}

13
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AddDepartmentFormDTO.java

@ -54,5 +54,18 @@ public class AddDepartmentFormDTO implements Serializable {
@Length(max=250,message = "部门职责不能超过250个字")
private String departmentDuty;
/**
* 组织编码
*/
private String code;
/**
* 负责人
*/
private String contacts;
/**
* 联系电话
*/
private String mobile;
}

16
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AddGridFormDTO.java

@ -34,5 +34,21 @@ public class AddGridFormDTO implements Serializable {
* 管辖区域
*/
private String manageDistrict;
/**
* 网格编码[手动输入的]
*/
private String code;
/**
* 网格类型字典表sys_dict_data,key:grid_type
*/
private String gridType;
/**
* 负责人
*/
private String contacts;
/**
* 联系电话
*/
private String mobile;
}

13
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/EditAgencyFormDTO.java

@ -59,4 +59,17 @@ public class EditAgencyFormDTO implements Serializable {
@NotBlank(message = "tokenDto获取userId为空", groups = AddUserInternalGroup.class)
private String userId;
/**
* 组织编码[手动输入的]
*/
private String code;
/**
* 负责人
*/
private String contacts;
/**
* 联系电话
*/
private String mobile;
}

13
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/EditDepartmentFormDTO.java

@ -56,4 +56,17 @@ public class EditDepartmentFormDTO implements Serializable {
@Length(max=250,message = "部门职责不能超过250个字")
private String departmentDuty;
/**
* 组织编码[手动输入的]
*/
private String code;
/**
* 负责人
*/
private String contacts;
/**
* 联系电话
*/
private String mobile;
}

16
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/EditGridFormDTO.java

@ -42,5 +42,21 @@ public class EditGridFormDTO implements Serializable {
//客户Id
private String customerId;
/**
* 网格编码[手动输入的]
*/
private String code;
/**
* 网格类型字典表sys_dict_data,key:grid_type
*/
private String gridType;
/**
* 负责人
*/
private String contacts;
/**
* 联系电话
*/
private String mobile;
}

8
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AgencyListResultDTO.java

@ -46,6 +46,14 @@ public class AgencyListResultDTO implements Serializable {
* 总人数
*/
private Integer totalUser;
/**
* 负责人
*/
private String contacts;
/**
* 联系电话
*/
private String mobile;
}

12
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AgencysResultDTO.java

@ -106,4 +106,16 @@ public class AgencysResultDTO implements Serializable {
* 当前agencyId所属的客户id
*/
private String customerId;
/**
* 组织编码[手动输入的]
*/
private String code;
/**
* 负责人
*/
private String contacts;
/**
* 联系电话
*/
private String mobile;
}

13
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/DepartmentDetailResultDTO.java

@ -60,4 +60,17 @@ public class DepartmentDetailResultDTO implements Serializable {
private String areaCode;
/**
* 组织编码[手动输入的]
*/
private String code = "";
/**
* 负责人
*/
private String contacts = "";
/**
* 联系电话
*/
private String mobile = "";
}

10
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/DepartmentListResultDTO.java

@ -45,5 +45,13 @@ public class DepartmentListResultDTO implements Serializable {
/**
* 部门下总人数
*/
private Integer totalUser;
private Integer totalUser = 0;
/**
* 负责人
*/
private String contacts = "";
/**
* 联系电话
*/
private String mobile = "";
}

9
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GridBaseInfoResultDTO.java

@ -29,4 +29,13 @@ public class GridBaseInfoResultDTO implements Serializable {
* 网格人数
* */
private Integer totalUser;
/**
* 负责人
*/
private String contacts = "";
/**
* 联系电话
*/
private String mobile = "";
}

17
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GridDetailResultDTO.java

@ -65,4 +65,21 @@ public class GridDetailResultDTO implements Serializable {
*/
private List<StaffGridListDTO> staffGridList;
/**
* 网格编码
*/
private String code = "";
/**
* 网格类型
*/
private String gridType = "";
/**
* 负责人
*/
private String contacts = "";
/**
* 联系电话
*/
private String mobile = "";
}

6
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/AgencyServiceImpl.java

@ -151,6 +151,9 @@ public class AgencyServiceImpl implements AgencyService {
//当前客户下,同级组织中,组织名称不允许重复
customerAgencyService.checkAgencyName(formDTO.getAgencyName(),originalEntity.getCustomerId(),originalEntity.getId(),originalEntity.getPid());
originalEntity.setOrganizationName(formDTO.getAgencyName());
originalEntity.setCode(formDTO.getCode());
originalEntity.setContacts(formDTO.getContacts());
originalEntity.setMobile(formDTO.getMobile());
//1:更新当前组织信息
if (customerAgencyDao.updateById(originalEntity) < NumConstant.ONE) {
log.error(CustomerAgencyConstant.UPDATE_EXCEPTION);
@ -254,6 +257,9 @@ public class AgencyServiceImpl implements AgencyService {
agencysResultDTO = ConvertUtils.sourceToTarget(entity, AgencysResultDTO.class);
agencysResultDTO.setAgencyId(entity.getId());
agencysResultDTO.setAgencyName(entity.getOrganizationName());
agencysResultDTO.setCode(entity.getCode());
agencysResultDTO.setContacts(entity.getContacts());
agencysResultDTO.setMobile(entity.getMobile());
//2021.5.26 sun 添加当前组织对应客户的根组织级别返参 start
if (null != entity) {
if (null == entity.getPids() || "".equals(entity.getPids())) {

8
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java

@ -258,6 +258,10 @@ public class CustomerGridServiceImpl extends BaseServiceImpl<CustomerGridDao, Cu
customerGridEntity.setAreaCode(customerAgencyDTO.getAreaCode());
customerGridEntity.setCustomerId(customerAgencyDTO.getCustomerId());
customerGridEntity.setPid(addGridFormDTO.getAgencyId());
customerGridEntity.setCode(addGridFormDTO.getCode());
customerGridEntity.setGridType(addGridFormDTO.getGridType());
customerGridEntity.setContacts(addGridFormDTO.getContacts());
customerGridEntity.setMobile(addGridFormDTO.getMobile());
//新增area_code,部门的area_code=所属组织的area_code
customerGridEntity.setAreaCode(null != customerAgencyDTO && StringUtils.isNotBlank(customerAgencyDTO.getAreaCode()) ? customerAgencyDTO.getAreaCode() : StrConstant.EPMETY_STR);
@ -296,6 +300,10 @@ public class CustomerGridServiceImpl extends BaseServiceImpl<CustomerGridDao, Cu
customerGridDTO.setGridName(editGridFormDTO.getGridName());
customerGridDTO.setUpdatedBy(tokenDto.getUserId());
customerGridDTO.setId(editGridFormDTO.getGridId());
customerGridDTO.setCode(editGridFormDTO.getCode());
customerGridDTO.setGridType(editGridFormDTO.getGridType());
customerGridDTO.setContacts(editGridFormDTO.getContacts());
customerGridDTO.setMobile(editGridFormDTO.getMobile());
baseDao.editGrid(customerGridDTO);
return new Result();

4
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/DepartmentServiceImpl.java

@ -114,10 +114,8 @@ public class DepartmentServiceImpl implements DepartmentService {
@Transactional(rollbackFor = Exception.class)
public Result editDepartment(EditDepartmentFormDTO formDTO) {
Result result = new Result();
CustomerDepartmentEntity entity = new CustomerDepartmentEntity();
CustomerDepartmentEntity entity = ConvertUtils.sourceToTarget(formDTO, CustomerDepartmentEntity.class);
entity.setId(formDTO.getDepartmentId());
entity.setDepartmentName(formDTO.getDepartmentName());
entity.setDepartmentDuty(formDTO.getDepartmentDuty());
if (customerDepartmentDao.updateById(entity) < NumConstant.ONE) {
log.error(CustomerDepartmentConstant.UPDATE_EXCEPTION);
throw new RenException(CustomerDepartmentConstant.UPDATE_EXCEPTION);

4
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml

@ -123,7 +123,9 @@
SELECT
id AS 'agencyId',
organization_name AS 'agencyName',
total_user AS 'totalUser'
total_user AS 'totalUser',
contacts 'contacts',
mobile 'mobile'
FROM customer_agency
WHERE del_flag = '0'
AND pid = #{pId}

4
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerDepartmentDao.xml

@ -23,7 +23,9 @@
SELECT
id AS 'departmentId',
department_name AS 'departmentName',
total_user AS 'totalUser'
total_user AS 'totalUser',
contacts AS 'contacts',
mobile AS 'mobile'
FROM customer_department
WHERE del_flag = '0'
AND agency_id = #{agencyId}

14
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerGridDao.xml

@ -189,7 +189,11 @@
manage_district AS manageDistrict,
total_user AS totalUser,
pid AS agencyId,
pids AS pids
pids AS pids,
`code` AS 'code',
grid_type AS 'gridType',
contacts AS 'contacts',
mobile AS 'mobile'
FROM
customer_grid
WHERE
@ -277,9 +281,11 @@
<!-- 得到当前机构的网格列表 -->
<select id="selectGridListByAgencyId" resultType="com.epmet.dto.result.GridBaseInfoResultDTO">
SELECT
ID AS gridId,
IFNULL(GRID_NAME,"") AS gridName,
TOTAL_USER
id AS gridId,
IFNULL(grid_name,"") AS gridName,
total_user,
contacts,
mobile
FROM
CUSTOMER_GRID
<where>

Loading…
Cancel
Save