Browse Source

新字段

feature/evaluate
zxc 3 years ago
parent
commit
faa1a9ed50
  1. 10
      epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partyOrg/IcPartyOrgDTO.java
  2. 33
      epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partyOrg/form/EditPrincipalFormDTO.java
  3. 10
      epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partyOrg/result/IcPartyOrgTreeDTO.java
  4. 14
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/controller/IcPartyOrgController.java
  5. 9
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/dao/IcPartyOrgDao.java
  6. 10
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/entity/IcPartyOrgEntity.java
  7. 10
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/service/IcPartyOrgService.java
  8. 13
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/service/impl/IcPartyOrgServiceImpl.java
  9. 2
      epmet-module/resi-partymember/resi-partymember-server/src/main/resources/db/migration/V0.0.10__add_principal.sql
  10. 26
      epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partyOrg/IcPartyOrgDao.xml

10
epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partyOrg/IcPartyOrgDTO.java

@ -84,6 +84,16 @@ public class IcPartyOrgDTO implements Serializable {
*/
private String address;
/**
* 负责人
*/
private String principal;
/**
* 联系电话
*/
private String principalMobile;
/**
* 党组织介绍
*/

33
epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partyOrg/form/EditPrincipalFormDTO.java

@ -0,0 +1,33 @@
package com.epmet.resi.partymember.dto.partyOrg.form;
import com.epmet.commons.tools.validator.group.AddGroup;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2022/9/7 15:02
* @DESC
*/
@Data
public class EditPrincipalFormDTO implements Serializable {
private static final long serialVersionUID = -1006713792388125512L;
/**
* 负责人
*/
@NotBlank(message = "principal不能为空",groups = AddGroup.class)
private String principal;
@NotBlank(message = "partyOrgId不能为空",groups = AddGroup.class)
private String partyOrgId;
/**
* 联系电话
*/
@NotBlank(message = "principalMobile不能为空",groups = AddGroup.class)
private String principalMobile;
}

10
epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partyOrg/result/IcPartyOrgTreeDTO.java

@ -53,6 +53,16 @@ public class IcPartyOrgTreeDTO implements Serializable {
*/
private String partyOrgName;
/**
* 负责人
*/
private String principal;
/**
* 联系电话
*/
private String principalMobile;
private List<IcPartyOrgTreeDTO> children = new ArrayList<>();

14
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/controller/IcPartyOrgController.java

@ -14,6 +14,7 @@ import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.modules.partyOrg.excel.IcPartyOrgExcel;
import com.epmet.modules.partyOrg.service.IcPartyOrgService;
import com.epmet.resi.partymember.dto.partyOrg.IcPartyOrgDTO;
import com.epmet.resi.partymember.dto.partyOrg.form.EditPrincipalFormDTO;
import com.epmet.resi.partymember.dto.partyOrg.form.GetParentOrgFormDTO;
import com.epmet.resi.partymember.dto.partyOrg.form.PartyOrgListFormDTO;
import com.epmet.resi.partymember.dto.partyOrg.form.PartyOrgTreeListDTO;
@ -189,4 +190,17 @@ public class IcPartyOrgController {
return new Result<List<PartyOrgListResultDTO>>().ok(icPartyOrgService.partOrgList(formDTO.getGridId()));
}
/**
* Desc: 党组织修改负责人
* @param formDTO
* @author zxc
* @date 2022/9/7 15:04
*/
@PostMapping("editPrincipal")
public Result editPrincipal(@RequestBody EditPrincipalFormDTO formDTO){
ValidatorUtils.validateEntity(formDTO, AddGroup.class);
icPartyOrgService.editPrincipal(formDTO);
return new Result();
}
}

9
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/dao/IcPartyOrgDao.java

@ -3,6 +3,7 @@ package com.epmet.modules.partyOrg.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.modules.partyOrg.entity.IcPartyOrgEntity;
import com.epmet.resi.partymember.dto.partyOrg.IcPartyOrgDTO;
import com.epmet.resi.partymember.dto.partyOrg.form.EditPrincipalFormDTO;
import com.epmet.resi.partymember.dto.partyOrg.form.PartyOrgTreeListDTO;
import com.epmet.resi.partymember.dto.partyOrg.result.ActAndScheduleListResultDTO;
import com.epmet.resi.partymember.dto.partyOrg.result.BranchlistTreeSubDTO;
@ -117,4 +118,12 @@ public interface IcPartyOrgDao extends BaseDao<IcPartyOrgEntity> {
List<IcPartyOrgDTO> getSelfAndSub(@Param("joinOrgId") String joinOrgId);
List<PartyOrgListResultDTO> partOrgList(@Param("agencyId") String agencyId);
/**
* Desc: 党组织修改负责人
* @param formDTO
* @author zxc
* @date 2022/9/7 15:04
*/
void editPrincipal(EditPrincipalFormDTO formDTO);
}

10
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/entity/IcPartyOrgEntity.java

@ -73,6 +73,16 @@ public class IcPartyOrgEntity extends BaseEpmetEntity {
*/
private String address;
/**
* 负责人
*/
private String principal;
/**
* 联系电话
*/
private String principalMobile;
/**
* 党组织介绍
*/

10
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/service/IcPartyOrgService.java

@ -6,6 +6,7 @@ import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.modules.partyOrg.entity.IcPartyOrgEntity;
import com.epmet.resi.partymember.dto.partyOrg.IcPartyOrgDTO;
import com.epmet.resi.partymember.dto.partyOrg.form.EditPrincipalFormDTO;
import com.epmet.resi.partymember.dto.partyOrg.form.GetParentOrgFormDTO;
import com.epmet.resi.partymember.dto.partyOrg.form.PartyOrgTreeListDTO;
import com.epmet.resi.partymember.dto.partyOrg.result.*;
@ -148,4 +149,13 @@ public interface IcPartyOrgService extends BaseService<IcPartyOrgEntity> {
void adjustOrgPath(List<String> customerIds);
List<PartyOrgListResultDTO> partOrgList(String gridId);
/**
* Desc: 党组织修改负责人
* @param formDTO
* @author zxc
* @date 2022/9/7 15:04
*/
void editPrincipal(EditPrincipalFormDTO formDTO);
}

13
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/service/impl/IcPartyOrgServiceImpl.java

@ -29,6 +29,7 @@ import com.epmet.modules.partymember.dao.IcPartyMemberDao;
import com.epmet.modules.partymember.entity.IcPartyMemberEntity;
import com.epmet.resi.group.feign.ResiGroupOpenFeignClient;
import com.epmet.resi.partymember.dto.partyOrg.IcPartyOrgDTO;
import com.epmet.resi.partymember.dto.partyOrg.form.EditPrincipalFormDTO;
import com.epmet.resi.partymember.dto.partyOrg.form.GetParentOrgFormDTO;
import com.epmet.resi.partymember.dto.partyOrg.form.PartyOrgTreeListDTO;
import com.epmet.resi.partymember.dto.partyOrg.result.*;
@ -490,4 +491,16 @@ public class IcPartyOrgServiceImpl extends BaseServiceImpl<IcPartyOrgDao, IcPart
return baseDao.partOrgList(gridInfo.getPid());
}
/**
* Desc: 党组织修改负责人
* @param formDTO
* @author zxc
* @date 2022/9/7 15:04
*/
@Transactional(rollbackFor = Exception.class)
@Override
public void editPrincipal(EditPrincipalFormDTO formDTO) {
baseDao.editPrincipal(formDTO);
}
}

2
epmet-module/resi-partymember/resi-partymember-server/src/main/resources/db/migration/V0.0.10__add_principal.sql

@ -0,0 +1,2 @@
ALTER TABLE ic_party_org ADD COLUMN PRINCIPAL VARCHAR(30) not null DEFAULT '' COMMENT '负责人' AFTER ADDRESS;
ALTER TABLE ic_party_org ADD COLUMN PRINCIPAL_MOBILE VARCHAR(30) not null DEFAULT '' COMMENT '联系方式' AFTER PRINCIPAL;

26
epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partyOrg/IcPartyOrgDao.xml

@ -24,6 +24,16 @@
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
<!-- 党组织修改负责人 -->
<update id="editPrincipal">
update ic_party_org
set PRINCIPAL_MOBILE = #{principalMobile},
PRINCIPAL = #{principal},
UPDATED_TIME = NOW()
where id = #{partyOrgId}
</update>
<select id="getTreelist" resultType="com.epmet.resi.partymember.dto.partyOrg.result.IcPartyOrgTreeDTO">
select ID,
CUSTOMER_ID,
@ -32,7 +42,9 @@
AGENCY_ID,
AGENCY_PIDS,
PARTY_ORG_TYPE,
PARTY_ORG_NAME
PARTY_ORG_NAME,
PRINCIPAL_MOBILE,
PRINCIPAL
from ic_party_org
where DEL_FLAG=0
and CUSTOMER_ID=#{customerId}
@ -87,7 +99,9 @@
AGENCY_ID,
AGENCY_PIDS,
PARTY_ORG_TYPE,
PARTY_ORG_NAME as label
PARTY_ORG_NAME as label,
PRINCIPAL_MOBILE,
PRINCIPAL
from ic_party_org
where DEL_FLAG=0
and CUSTOMER_ID=#{customerId}
@ -105,7 +119,9 @@
AGENCY_ID,
AGENCY_PIDS,
PARTY_ORG_TYPE,
PARTY_ORG_NAME
PARTY_ORG_NAME,
PRINCIPAL_MOBILE,
PRINCIPAL
from ic_party_org
where DEL_FLAG=0
and CUSTOMER_ID=#{customerId}
@ -124,7 +140,9 @@
AGENCY_ID,
AGENCY_PIDS,
PARTY_ORG_TYPE,
PARTY_ORG_NAME
PARTY_ORG_NAME,
PRINCIPAL_MOBILE,
PRINCIPAL
from ic_party_org
where DEL_FLAG = 0
and CUSTOMER_ID=#{customerId}

Loading…
Cancel
Save