Merge remote-tracking branch 'origin/upgrade' into upgrade
This commit is contained in:
commit
e28f74d893
@ -91,7 +91,7 @@ public class AreaTreeAppController extends AbstractController {
|
||||
* @return
|
||||
*/
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("tree")
|
||||
@PostMapping("tree")
|
||||
public List<AreaZtreeDTO> tree(String id) {
|
||||
String parentId = id;
|
||||
if (StringUtils.isEmpty(id)) {
|
||||
@ -137,4 +137,12 @@ public class AreaTreeAppController extends AbstractController {
|
||||
}
|
||||
}
|
||||
|
||||
public void getParentBaoTou(ArrayList names, String pId) {
|
||||
DataAreaDTO areaDTO = iPopulationInfoService.getAreaById(pId);
|
||||
if(areaDTO != null && !areaDTO.getAreaLevel().equals("1") && !areaDTO.getAreaLevel().equals("0") ) {
|
||||
names.add(0, areaDTO.getAreaName());
|
||||
getParentBaoTou(names, areaDTO.getAreaParentId());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -5,6 +5,9 @@ import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.Period;
|
||||
|
||||
@ApiModel
|
||||
public class PopulationInfoBaseDTO {
|
||||
|
||||
@ -58,6 +61,16 @@ public class PopulationInfoBaseDTO {
|
||||
private String phone;
|
||||
@ApiModelProperty(name = "age", value = "年龄")
|
||||
private Integer age;
|
||||
@ApiModelProperty(name = "创建人", value = "创建人")
|
||||
private String creator;
|
||||
|
||||
public String getCreator() {
|
||||
return creator;
|
||||
}
|
||||
|
||||
public void setCreator(String creator) {
|
||||
this.creator = creator;
|
||||
}
|
||||
|
||||
public String getHealthStatus() {
|
||||
return healthStatus;
|
||||
@ -90,7 +103,9 @@ public class PopulationInfoBaseDTO {
|
||||
}
|
||||
|
||||
public Integer getAge() {
|
||||
return IdCardVerifyUtil.getIdCardAge(idcard);
|
||||
LocalDate birthDate = LocalDate.parse(this.birthday);
|
||||
Period period = Period.between(birthDate, LocalDate.now());
|
||||
return period.getYears();
|
||||
}
|
||||
|
||||
public void setAge(Integer age) {
|
||||
|
@ -168,6 +168,16 @@ public class PopulationInfoDTO {
|
||||
@ApiModelProperty(name = "age", value = "年龄")
|
||||
@CheckEmptyAnnotation(name = "年龄")
|
||||
private Integer age;
|
||||
@ApiModelProperty(name = "创建人", value = "创建人")
|
||||
private String creator;
|
||||
|
||||
public String getCreator() {
|
||||
return creator;
|
||||
}
|
||||
|
||||
public void setCreator(String creator) {
|
||||
this.creator = creator;
|
||||
}
|
||||
|
||||
public String getDepartmentType() {
|
||||
return departmentType == null ? "" : departmentType;
|
||||
|
@ -8,7 +8,6 @@ import com.cm.common.pojo.ListPage;
|
||||
import com.cm.common.result.SuccessResultList;
|
||||
import com.cm.common.token.app.AppTokenManager;
|
||||
import com.cm.common.token.app.entity.AppTokenUser;
|
||||
import com.cm.common.utils.DateUtil;
|
||||
import com.cm.common.utils.HashMapUtil;
|
||||
import com.cm.common.utils.UUIDUtil;
|
||||
import com.cm.population.dao.areatree.IAreatreeDao;
|
||||
@ -40,7 +39,6 @@ import com.github.pagehelper.PageInfo;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
@ -80,13 +78,12 @@ public class PopulationInfoServiceImpl extends AbstractService implements IPopul
|
||||
List<AreaZtreeDTO> list = iAreatreeDao.getAreaList(params);
|
||||
for (AreaZtreeDTO dto : list) {
|
||||
Integer count = iAreatreeDao.countByParentId(dto.getId());
|
||||
if (count > 0) {
|
||||
if(count > 0) {
|
||||
dto.setIsParent(true);
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
@Autowired
|
||||
private ICorrectService iCorrectService;
|
||||
@Autowired
|
||||
@ -101,7 +98,6 @@ public class PopulationInfoServiceImpl extends AbstractService implements IPopul
|
||||
private IReleaseService iReleaseService;
|
||||
@Autowired
|
||||
private ISecurityService iSecurityService;
|
||||
|
||||
@Override
|
||||
public PopulationInfoBaseDTO getBase(String populationInfoId) {
|
||||
Map<String, Object> query = new HashMap<>();
|
||||
@ -149,15 +145,17 @@ public class PopulationInfoServiceImpl extends AbstractService implements IPopul
|
||||
if (dto != null) {
|
||||
throw new SaveException("该证件号码已存在");
|
||||
}
|
||||
if (!IdCardVerifyUtil.isIDCard(populationInfoVO.getIdcard().trim())) {
|
||||
throw new SaveException("该证件号码错误");
|
||||
if (populationInfoVO.getIdcardType().equals("身份证")) {
|
||||
if(!IdCardVerifyUtil.isIDCard(populationInfoVO.getIdcard().trim())) {
|
||||
throw new SaveException("该证件号码错误");
|
||||
}
|
||||
}
|
||||
String areaCode = populationInfoVO.getDomicileAreaCode();
|
||||
if (areaCode.startsWith("150271")) { //包头稀土高新技术产业开发区
|
||||
if(areaCode.startsWith("150271")) { //包头稀土高新技术产业开发区
|
||||
populationInfoVO.setDomicileAddressType("3");
|
||||
} else if (areaCode.startsWith("1502")) { //包头市
|
||||
}else if(areaCode.startsWith("1502")) { //包头市
|
||||
populationInfoVO.setDomicileAddressType("2");
|
||||
} else { //非包头市
|
||||
}else { //非包头市
|
||||
populationInfoVO.setDomicileAddressType("1");
|
||||
}
|
||||
Map<String, Object> params = HashMapUtil.objectToMap(populationInfoVO);
|
||||
@ -176,9 +174,9 @@ public class PopulationInfoServiceImpl extends AbstractService implements IPopul
|
||||
public void remove(String token, List<String> ids) {
|
||||
Map<String, Object> params = getHashMap(2);
|
||||
params.put("populationInfoIds", ids);
|
||||
if (StringUtils.isEmpty(token)) {
|
||||
if(StringUtils.isEmpty(token)) {
|
||||
setUpdateInfo(params);
|
||||
} else {
|
||||
}else{
|
||||
setUpdateInfo(token, params);
|
||||
}
|
||||
populationInfoDao.remove(params);
|
||||
@ -188,9 +186,9 @@ public class PopulationInfoServiceImpl extends AbstractService implements IPopul
|
||||
public void delete(String token, List<String> ids) {
|
||||
Map<String, Object> params = getHashMap(2);
|
||||
params.put("populationInfoIds", ids);
|
||||
if (StringUtils.isEmpty(token)) {
|
||||
if(StringUtils.isEmpty(token)) {
|
||||
setUpdateInfo(params);
|
||||
} else {
|
||||
}else{
|
||||
setUpdateInfo(token, params);
|
||||
}
|
||||
populationInfoDao.delete(params);
|
||||
@ -208,21 +206,23 @@ public class PopulationInfoServiceImpl extends AbstractService implements IPopul
|
||||
if (dto != null && !dto.getPopulationInfoId().equals(populationInfoId)) {
|
||||
throw new SaveException("该证件号码已存在");
|
||||
}
|
||||
if (!IdCardVerifyUtil.isIDCard(populationInfoVO.getIdcard().trim())) {
|
||||
throw new SaveException("该证件号码错误");
|
||||
if (populationInfoVO.getIdcardType().equals("身份证")) {
|
||||
if(!IdCardVerifyUtil.isIDCard(populationInfoVO.getIdcard().trim())) {
|
||||
throw new SaveException("该证件号码错误");
|
||||
}
|
||||
}
|
||||
String areaCode = populationInfoVO.getDomicileAreaCode();
|
||||
if (areaCode.startsWith("150271")) { //包头稀土高新技术产业开发区
|
||||
if(areaCode.startsWith("150271")) { //包头稀土高新技术产业开发区
|
||||
populationInfoVO.setDomicileAddressType("3");
|
||||
} else if (areaCode.startsWith("1502")) { //包头市
|
||||
}else if(areaCode.startsWith("1502")) { //包头市
|
||||
populationInfoVO.setDomicileAddressType("2");
|
||||
} else { //非包头市
|
||||
}else { //非包头市
|
||||
populationInfoVO.setDomicileAddressType("1");
|
||||
}
|
||||
params.put("populationInfoId", populationInfoId);
|
||||
if (StringUtils.isEmpty(token)) {
|
||||
if(StringUtils.isEmpty(token)) {
|
||||
setUpdateInfo(params);
|
||||
} else {
|
||||
}else{
|
||||
setUpdateInfo(token, params);
|
||||
}
|
||||
populationInfoDao.update(params);
|
||||
@ -273,14 +273,7 @@ public class PopulationInfoServiceImpl extends AbstractService implements IPopul
|
||||
|
||||
@Override
|
||||
public List<PopulationInfoDTO> list(Map<String, Object> params) {
|
||||
List<PopulationInfoDTO> populationInfoDTOS = populationInfoDao.list(params);
|
||||
populationInfoDTOS.forEach(populationInfoDTO -> {
|
||||
if (StringUtils.isBlank(populationInfoDTO.getBirthday())) {
|
||||
return;
|
||||
}
|
||||
populationInfoDTO.setAge(DateUtil.getAgeByBirthday(populationInfoDTO.getBirthday()));
|
||||
});
|
||||
return populationInfoDTOS;
|
||||
return populationInfoDao.list(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -831,7 +831,8 @@
|
||||
t1.partyb_idcard,
|
||||
t1.partyb_name,
|
||||
t1.partyb_phone,
|
||||
t1.dispute_id
|
||||
t1.dispute_id,
|
||||
t1.creator
|
||||
FROM
|
||||
population_dispute t1
|
||||
LEFT JOIN
|
||||
|
@ -79,23 +79,23 @@
|
||||
gmt_modified,
|
||||
is_delete
|
||||
) VALUES(
|
||||
#{drugId},
|
||||
#{populationInfoId},
|
||||
#{startTime},
|
||||
#{control},
|
||||
#{controlPhone},
|
||||
#{help},
|
||||
#{helpPhone},
|
||||
#{charge},
|
||||
#{reason},
|
||||
#{reasonOther},
|
||||
#{consequence},
|
||||
#{creator},
|
||||
#{gmtCreate},
|
||||
#{modifier},
|
||||
#{gmtModified},
|
||||
#{isDelete}
|
||||
)
|
||||
#{drugId},
|
||||
#{populationInfoId},
|
||||
#{startTime},
|
||||
#{control},
|
||||
#{controlPhone},
|
||||
#{help},
|
||||
#{helpPhone},
|
||||
#{charge},
|
||||
#{reason},
|
||||
#{reasonOther},
|
||||
#{consequence},
|
||||
#{creator},
|
||||
#{gmtCreate},
|
||||
#{modifier},
|
||||
#{gmtModified},
|
||||
#{isDelete}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<!-- 删除信访管理-吸毒人员 -->
|
||||
|
@ -311,7 +311,8 @@
|
||||
t2.dictionary_name AS coordinate_name,
|
||||
t1.talk,
|
||||
t3.dictionary_name AS talk_name,
|
||||
t1.petition_id
|
||||
t1.petition_id,
|
||||
t1.creator
|
||||
FROM
|
||||
population_petition t1
|
||||
LEFT JOIN
|
||||
|
@ -18,6 +18,7 @@
|
||||
<result column="is_military" property="isMilitary"/>
|
||||
<result column="is_succour" property="isSuccour"/>
|
||||
<result column="is_party" property="isParty"/>
|
||||
<result column="creator" property="creator"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="populationInfoDTO" type="com.cm.population.pojo.dtos.populationinfo.PopulationInfoDTO">
|
||||
@ -95,6 +96,7 @@
|
||||
<result column="party_organization" property="partyOrganization"/>
|
||||
<result column="party_time" property="partyTime"/>
|
||||
<result column="othertext" property="othertext"/>
|
||||
<result column="creator" property="creator"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="populationInfoBO" type="com.cm.population.pojo.bos.populationinfo.PopulationInfoBO">
|
||||
@ -663,7 +665,8 @@
|
||||
t1.is_disability,
|
||||
t1.is_military,
|
||||
t1.is_succour,
|
||||
t1.is_party
|
||||
t1.is_party,
|
||||
t1.creator
|
||||
FROM
|
||||
population_population_info t1
|
||||
WHERE
|
||||
@ -1004,7 +1007,8 @@
|
||||
t1.is_party,
|
||||
t1.party_organization,
|
||||
t1.party_time,
|
||||
t1.othertext
|
||||
t1.othertext,
|
||||
t1.creator
|
||||
FROM
|
||||
population_population_info t1
|
||||
WHERE
|
||||
|
@ -71,21 +71,21 @@
|
||||
gmt_modified,
|
||||
is_delete
|
||||
) VALUES(
|
||||
#{releaseId},
|
||||
#{populationInfoId},
|
||||
#{charge},
|
||||
#{prisonTerm},
|
||||
#{type},
|
||||
#{organization},
|
||||
#{superviseTime},
|
||||
#{isRelease},
|
||||
#{releaseTime},
|
||||
#{creator},
|
||||
#{gmtCreate},
|
||||
#{modifier},
|
||||
#{gmtModified},
|
||||
#{isDelete}
|
||||
)
|
||||
#{releaseId},
|
||||
#{populationInfoId},
|
||||
#{charge},
|
||||
#{prisonTerm},
|
||||
#{type},
|
||||
#{organization},
|
||||
#{superviseTime},
|
||||
#{isRelease},
|
||||
#{releaseTime},
|
||||
#{creator},
|
||||
#{gmtCreate},
|
||||
#{modifier},
|
||||
#{gmtModified},
|
||||
#{isDelete}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<!-- 删除特殊人口-刑满释放 -->
|
||||
@ -229,25 +229,25 @@
|
||||
<!-- 特殊人口-刑满释放列表 -->
|
||||
<select id="list" parameterType="map" resultMap="releaseDTO">
|
||||
SELECT
|
||||
t1.release_id,
|
||||
t1.population_info_id,
|
||||
t1.charge,
|
||||
t1.prison_term,
|
||||
t1.type,
|
||||
t1.organization,
|
||||
t1.supervise_time,
|
||||
t1.is_release,
|
||||
t1.release_time,
|
||||
t1.creator,
|
||||
t1.gmt_create,
|
||||
t1.modifier,
|
||||
t1.gmt_modified,
|
||||
t1.is_delete,
|
||||
1
|
||||
t1.release_id,
|
||||
t1.population_info_id,
|
||||
t1.charge,
|
||||
t1.prison_term,
|
||||
t1.type,
|
||||
t1.organization,
|
||||
t1.supervise_time,
|
||||
t1.is_release,
|
||||
t1.release_time,
|
||||
t1.creator,
|
||||
t1.gmt_create,
|
||||
t1.modifier,
|
||||
t1.gmt_modified,
|
||||
t1.is_delete,
|
||||
1
|
||||
FROM
|
||||
population_release t1
|
||||
population_release t1
|
||||
WHERE
|
||||
t1.is_delete = 0
|
||||
t1.is_delete = 0
|
||||
<if test="charge != null and charge != ''">
|
||||
AND t1.charge = #{charge}
|
||||
</if>
|
||||
|
@ -299,34 +299,35 @@
|
||||
<!-- 信访管理-社会治安列表 -->
|
||||
<select id="list" parameterType="map" resultMap="securityDTO">
|
||||
SELECT
|
||||
t1.security_id,
|
||||
t1.population_info_id,
|
||||
t1.charge,
|
||||
t1.time,
|
||||
t1.security_address,
|
||||
t1.security_area_code,
|
||||
t1.security_area_name,
|
||||
t1.lat,
|
||||
t1.lng,
|
||||
t1.map_address,
|
||||
t1.degree,
|
||||
t1.creator,
|
||||
t1.gmt_create,
|
||||
t1.modifier,
|
||||
t1.gmt_modified,
|
||||
t1.is_delete,
|
||||
t1.acceptance_population_info_id,
|
||||
t1.acceptance_name,
|
||||
t1.acceptance_idcard,
|
||||
t1.acceptance_phone,
|
||||
t1.handle_population_info_id,
|
||||
t1.handle_name,
|
||||
t1.handle_idcard,
|
||||
t1.handle_phone
|
||||
t1.security_id,
|
||||
t1.population_info_id,
|
||||
t1.charge,
|
||||
t1.time,
|
||||
t1.security_address,
|
||||
t1.security_area_code,
|
||||
t1.security_area_name,
|
||||
t1.lat,
|
||||
t1.lng,
|
||||
t1.map_address,
|
||||
t1.degree,
|
||||
t1.creator,
|
||||
t1.gmt_create,
|
||||
t1.modifier,
|
||||
t1.gmt_modified,
|
||||
t1.is_delete,
|
||||
t1.acceptance_population_info_id,
|
||||
t1.acceptance_name,
|
||||
t1.acceptance_idcard,
|
||||
t1.acceptance_phone,
|
||||
t1.handle_population_info_id,
|
||||
t1.handle_name,
|
||||
t1.handle_idcard,
|
||||
t1.handle_phone,
|
||||
t1.creator
|
||||
FROM
|
||||
population_security t1
|
||||
population_security t1
|
||||
WHERE
|
||||
t1.is_delete = 0
|
||||
t1.is_delete = 0
|
||||
<if test="degree != null and degree != ''">
|
||||
AND t1.degree = #{degree}
|
||||
</if>
|
||||
|
@ -166,7 +166,7 @@
|
||||
callback : {
|
||||
onClick : function (e, treeId, treeNode) {
|
||||
var count = treeNode.title.split('/').length -1;
|
||||
if (count > 1) {
|
||||
if (count > 0) {
|
||||
$('#' + name + "AreaName").val(treeNode.title);
|
||||
$('#' + name + "AreaCode").val(treeNode.areaCode);
|
||||
hideMenu();
|
||||
|
@ -162,7 +162,7 @@
|
||||
callback : {
|
||||
onClick : function (e, treeId, treeNode) {
|
||||
var count = treeNode.title.split('/').length -1;
|
||||
if (count > 1) {
|
||||
if (count > 0) {
|
||||
$('#' + name + "AreaName").val(treeNode.title);
|
||||
$('#' + name + "AreaCode").val(treeNode.areaCode);
|
||||
hideMenu();
|
||||
|
@ -750,7 +750,7 @@
|
||||
callback : {
|
||||
onClick : function (e, treeId, treeNode) {
|
||||
var count = treeNode.title.split('/').length -1;
|
||||
if (count > 1) {
|
||||
if (count > 0) {
|
||||
$('#' + name + "AreaName").val(treeNode.title);
|
||||
$('#' + name + "AreaCode").val(treeNode.areaCode);
|
||||
hideMenu();
|
||||
|
@ -754,7 +754,7 @@
|
||||
callback : {
|
||||
onClick : function (e, treeId, treeNode) {
|
||||
var count = treeNode.title.split('/').length -1;
|
||||
if (count > 1) {
|
||||
if (count > 0) {
|
||||
$('#' + name + "AreaName").val(treeNode.title);
|
||||
$('#' + name + "AreaCode").val(treeNode.areaCode);
|
||||
hideMenu();
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -243,7 +243,7 @@
|
||||
callback : {
|
||||
onClick : function (e, treeId, treeNode) {
|
||||
var count = treeNode.title.split('/').length -1;
|
||||
if (count > 1) {
|
||||
if (count > 0) {
|
||||
$('#' + name + "AreaName").val(treeNode.title);
|
||||
$('#' + name + "AreaCode").val(treeNode.areaCode);
|
||||
hideMenu();
|
||||
|
@ -245,7 +245,7 @@
|
||||
callback : {
|
||||
onClick : function (e, treeId, treeNode) {
|
||||
var count = treeNode.title.split('/').length -1;
|
||||
if (count > 1) {
|
||||
if (count > 0) {
|
||||
$('#' + name + "AreaName").val(treeNode.title);
|
||||
$('#' + name + "AreaCode").val(treeNode.areaCode);
|
||||
hideMenu();
|
||||
|
Loading…
Reference in New Issue
Block a user