数据处理更新

develop
fengchunyu 11 months ago
parent 0c59c2e1ed
commit 509e3728d6

@ -14,16 +14,22 @@ zdrySwitch=false
cyrySwitch=false cyrySwitch=false
JjxxSwitch=false JjxxSwitch=false
NewNsydwSwitch=false NewNsydwSwitch=false
metaImpUserSwitch=true metaImpUserSwitch=false
NewNalarminfoSwitch=false NewNalarminfoSwitch=false
metaHandleAlarmSwitch=true metaHandleAlarmSwitch=false
metaActualUnitUserInfoSwitch=false metaActualUnitUserInfoSwitch=false
metaActualUserInfoSwitch=false metaActualUserInfoSwitch=false
actualTimecjxxSwitch=false actualTimecjxxSwitch=false
actualTimejjxxSwitch=false actualTimejjxxSwitch=false
RentalHouseSwitch=false RentalHouseSwitch=false
metaRealEstateInfoSwitch=false metaRealEstateInfoSwitch=false
sydzToEstateInfoSwitch=true sydzToEstateInfoSwitch=false
syryToActualInfoSwitch=true syryToActualInfoSwitch=false
metaImpUserPicSwitch=false
wsDownloadPicAreaStart=320924
wsDownloadPicPath=/home/dataaccess
wshttpurl=http://50.146.63.16:8080/syx_webservice/getCzrkImgage.xhtml?sfzh=
#射阳 实有人口将有房屋号的数据根据户籍表数据清洗,并更新户主关系
jwzUserInfoToActual=true

@ -97,6 +97,18 @@
<version>2.9.0</version> <version>2.9.0</version>
</dependency> </dependency>
<dependency>
<groupId>com.squareup.okhttp</groupId>
<artifactId>okhttp</artifactId>
<version>2.2.0</version>
</dependency>
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
<version>4.9.1</version>
</dependency>
</dependencies> </dependencies>
<build> <build>

@ -24,47 +24,63 @@ public class MetaActualUnitUserInfo implements Serializable {
/** /**
* id * id
*/ */
@TableField(value = "unit_id")
private String unitId; private String unitId;
/** /**
* *
*/ */
@TableField(value = "unit_name")
private String unitName; private String unitName;
/** /**
* *
*/ */
@TableField(value = "staff_pic")
private String staffPic; private String staffPic;
/** /**
* *
*/ */
@TableField(value = "staff_name")
private String staffName; private String staffName;
/** /**
* *
*/ */
@TableField(value = "identity_id")
private String identityId; private String identityId;
/** /**
* *
*/ */
@TableField(value = "contact_info")
private String contactInfo; private String contactInfo;
/** /**
* *
*/ */
@TableField(value = "sex")
private Integer sex; private Integer sex;
@TableField(exist = false)
private String sexCn;
/** /**
* *
*/ */
@TableField(value = "staff_type")
private Integer staffType; private Integer staffType;
@TableField(exist = false)
private String staffTypeCn;
/** /**
* *
*/ */
@TableField(value = "staff_state")
private Integer staffState; private Integer staffState;
@TableField(exist = false)
private String staffStateCn;
/** /**
* *
@ -101,6 +117,4 @@ public class MetaActualUnitUserInfo implements Serializable {
*/ */
private Integer isActive; private Integer isActive;
@TableField(exist = false)
private static final long serialVersionUID = 1L;
} }

@ -120,6 +120,8 @@ public class MetaActualUserInfo implements Serializable {
* *
*/ */
private String metaUpdateTime; private String metaUpdateTime;
//与户主关系
private int householderRelation;
} }

@ -1,44 +1,53 @@
package com.ssf.mysqloracletest.domain; package com.ssf.mysqloracletest.domain;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/** /**
* * (MetaHuntersInfo)Domain
* @TableName meta_hunters_info *
* @author makejava
* @since 2023-12-09 17:22:06
*/ */
@TableName(value ="meta_hunters_info")
@Data @Data
public class MetaHuntersInfo implements Serializable { @EqualsAndHashCode(callSuper = false)
@TableName(value = "meta_hunters_info")
public class MetaHuntersInfo {
/** /**
* *
*/ */
@TableId(type = IdType.AUTO) @TableId(value = "id", type = IdType.AUTO)
private Long id; private Long id;
/** /**
* *
*/ */
@TableField(condition = SqlCondition.LIKE_RIGHT)
private String hunterName; private String hunterName;
/** /**
* *
*/ */
private String sex; private Integer sex;
/** /**
* *
*/ */
@TableField(condition = SqlCondition.LIKE_RIGHT)
private String phone; private String phone;
/**
*/
private String userPic;
/** /**
* *
*/ */
@TableField(condition = SqlCondition.LIKE_RIGHT)
private String idCard; private String idCard;
/** /**
@ -49,11 +58,13 @@ public class MetaHuntersInfo implements Serializable {
/** /**
* *
*/ */
@TableField(condition = SqlCondition.LIKE_RIGHT)
private String houseHoldAddress; private String houseHoldAddress;
/** /**
* *
*/ */
@TableField(condition = SqlCondition.LIKE_RIGHT)
private String habitationAddress; private String habitationAddress;
/** /**

@ -1,6 +1,7 @@
package com.ssf.mysqloracletest.domain; package com.ssf.mysqloracletest.domain;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data; import lombok.Data;
@ -24,66 +25,81 @@ public class MetaImpUserInfo implements Serializable {
/** /**
* *
*/ */
@TableField(value = "user_pic")
private String userPic; private String userPic;
/** /**
* *
*/ */
@TableField(value = "user_name")
private String userName; private String userName;
/** /**
* *
*/ */
@TableField(value = "id_card")
private String idCard; private String idCard;
/** /**
* *
*/ */
@TableField(value = "sex")
private Integer sex; private Integer sex;
@TableField(exist = false)
private String sexCn;
/** /**
* *
*/ */
@TableField(value = "phone")
private String phone; private String phone;
/** /**
* *
*/ */
@TableField(value = "imp_user_type")
private String impUserType; private String impUserType;
/** /**
* *
*/ */
@TableField(value = "imp_user_sub_type")
private String impUserSubType; private String impUserSubType;
/** /**
* *
*/ */
@TableField(value = "house_hold_register")
private String houseHoldRegister; private String houseHoldRegister;
/** /**
* *
*/ */
@TableField(value = "house_hold_address")
private String houseHoldAddress; private String houseHoldAddress;
/** /**
* *
*/ */
@TableField(value = "habitation_register")
private String habitationRegister; private String habitationRegister;
/** /**
* *
*/ */
@TableField(value = "habitation_address")
private String habitationAddress; private String habitationAddress;
/** /**
* *
*/ */
@TableField(value = "register_unit_code")
private String registerUnitCode; private String registerUnitCode;
/** /**
* *
*/ */
@TableField(value = "register_unit_name")
private String registerUnitName; private String registerUnitName;
} }

@ -0,0 +1,133 @@
package com.ssf.mysqloracletest.domain;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
/**
* TODO
*
* @author dinosuar
* @version 1.0
* @date 2021/2/24 15:04
**/
@Data
@TableName(value = "village_jwz_user_info")
public class VillageJwzUserInfo {
/**
*
*/
@TableField(value = "id")
private Long id;
/**
*
*/
@TableField(value = "householder_relation")
private String householderRelation;
/**
*
*/
@TableField(value = "education")
private String education;
/**
*
*/
@TableField(value = "religious")
private String religious;
/**
*
*/
@TableField(value = "marriage")
private String marriage;
/**
*
*/
@TableField(value = "political_outlook")
private String politicalOutlook;
/**
*
*/
@TableField(value = "management_status")
private String managementStatus;
/**
*
*/
@TableField(value = "user_pic")
private String userPic;
/**
*
*/
@TableField(value = "user_name")
private String userName;
/**
*
*/
@TableField(value = "phone")
private String phone;
/**
*
*/
@TableField(value = "account_number")
private String accountNumber;
/**
*
*/
@TableField(value = "landline")
private String landline;
/**
*
*/
@TableField(value = "id_card")
private String idCard;
/**
* _
*/
@TableField(value = "houseHold_register")
private String houseHoldRegister;
/**
* _
*/
@TableField(value = "houseHold_address")
private String houseHoldAddress;
/**
*
*/
@TableField(value = "spouse_name")
private String spouseName;
/**
*
*/
@TableField(value = "spouse_id_card")
private String spouseIdCard;
/**
*
*/
@TableField(value = "father_name")
private String fatherName;
/**
*
*/
@TableField(value = "father_id_card")
private String fatherIdCard;
/**
*
*/
@TableField(value = "mother_name")
private String motherName;
/**
*
*/
@TableField(value = "mother_id_card")
private String motherIdCard;
/**
*
*/
@TableField(value = "police_district_code")
private String policeDistrictCode;
@TableField(value = "isactive")
private String isactive;
}

@ -3,6 +3,9 @@ package com.ssf.mysqloracletest.mapper;
import com.ssf.mysqloracletest.domain.MetaActualUnitUserInfo; import com.ssf.mysqloracletest.domain.MetaActualUnitUserInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import java.util.List;
/** /**
* @author 28758 * @author 28758
@ -13,6 +16,9 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper @Mapper
public interface MetaActualUnitUserInfoMapper extends BaseMapper<MetaActualUnitUserInfo> { public interface MetaActualUnitUserInfoMapper extends BaseMapper<MetaActualUnitUserInfo> {
@Select(" select * from meta_actual_unit_user_info where staff_pic is null ")
public List<MetaActualUnitUserInfo> getListByPic() ;
} }

@ -65,6 +65,8 @@ public interface MetaActualUserInfoMapper extends BaseMapper<MetaActualUserInfo>
*/ */
public int deleteMetaActualUserInfoByIds(Long[] ids); public int deleteMetaActualUserInfoByIds(Long[] ids);
public List<MetaActualUserInfo> selectListByHomeIdSuccess(MetaActualUserInfo metaActualUserInfo);
} }

@ -1,20 +1,22 @@
package com.ssf.mysqloracletest.mapper; package com.ssf.mysqloracletest.mapper;
import com.ssf.mysqloracletest.domain.MetaHuntersInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ssf.mysqloracletest.domain.MetaHuntersInfo;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import java.util.List;
/** /**
* @author 10503 * (MetaHuntersInfo)Mapper
* @description meta_hunters_info()Mapper *
* @createDate 2023-12-08 23:11:18 * @author makejava
* @Entity com.ssf.mysqloracletest.domain.MetaHuntersInfo * @since 2023-12-09 17:22:06
*/ */
@Mapper @Mapper
public interface MetaHuntersInfoMapper extends BaseMapper<MetaHuntersInfo> { public interface MetaHuntersInfoMapper extends BaseMapper<MetaHuntersInfo> {
}
@Select(" select * from meta_hunters_info where user_pic is null ")
public List<MetaHuntersInfo> getHuntersList() ;
}

@ -3,6 +3,9 @@ package com.ssf.mysqloracletest.mapper;
import com.ssf.mysqloracletest.domain.MetaImpUserInfo; import com.ssf.mysqloracletest.domain.MetaImpUserInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import java.util.List;
/** /**
* @author 28758 * @author 28758
@ -13,6 +16,9 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper @Mapper
public interface MetaImpUserInfoMapper extends BaseMapper<MetaImpUserInfo> { public interface MetaImpUserInfoMapper extends BaseMapper<MetaImpUserInfo> {
@Select(" select * from meta_imp_user_info where user_pic is null limit 200 ")
public List<MetaImpUserInfo> getListByPic() ;
} }

@ -0,0 +1,61 @@
package com.ssf.mysqloracletest.mapper;
import com.ssf.mysqloracletest.domain.VillageJwzUserInfo;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
import java.util.Map;
/**
*
*
* @author chglee
* @email 1992lcg@163.com
* @date 2017-10-03 16:17:48
*/
@Mapper
public interface VillageJwzUserInfoMapper {
/**
*
*/
public VillageJwzUserInfo selectVillageJwzUserInfoById(Long id);
public VillageJwzUserInfo selectVillageJwzUserInfoByIdcard(String id);
/**
*
*/
public List<VillageJwzUserInfo> selectVillageJwzUserInfoList(VillageJwzUserInfo bean);
/**
*
*/
public int insertVillageJwzUserInfo(VillageJwzUserInfo bean);
/**
*
*/
public int updateVillageJwzUserInfo(VillageJwzUserInfo bean);
public int updateVillageJwzUserInfoByIdcard(VillageJwzUserInfo bean);
/**
*
*/
public int deleteVillageJwzUserInfoById(Long id);
public int deleteVillageJwzUserInfoByUpdatetime(VillageJwzUserInfo bean);
/**
*
*
* @param ids
* @return
*/
public int deleteVillageJwzUserInfoByIds(Long[] ids);
public List<VillageJwzUserInfo> list(Map<String, Object> map);
}

@ -3,6 +3,8 @@ package com.ssf.mysqloracletest.service;
import com.ssf.mysqloracletest.domain.MetaActualUnitUserInfo; import com.ssf.mysqloracletest.domain.MetaActualUnitUserInfo;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
/** /**
* @author 28758 * @author 28758
* @description meta_actual_unit_user_info()Service * @description meta_actual_unit_user_info()Service
@ -10,4 +12,6 @@ import com.baomidou.mybatisplus.extension.service.IService;
*/ */
public interface MetaActualUnitUserInfoService extends IService<MetaActualUnitUserInfo> { public interface MetaActualUnitUserInfoService extends IService<MetaActualUnitUserInfo> {
public List<MetaActualUnitUserInfo> getListByPic();
} }

@ -63,4 +63,6 @@ public interface MetaActualUserInfoService extends IService<MetaActualUserInfo>
*/ */
public int deleteMetaActualUserInfoById(Long id); public int deleteMetaActualUserInfoById(Long id);
public List<MetaActualUserInfo> selectListByHomeIdSuccess(MetaActualUserInfo metaActualUserInfo);
} }

@ -1,13 +1,19 @@
package com.ssf.mysqloracletest.service; package com.ssf.mysqloracletest.service;
import com.ssf.mysqloracletest.domain.MetaHuntersInfo;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.ssf.mysqloracletest.domain.MetaHuntersInfo;
import java.util.List;
/** /**
* @author 10503 * (MetaHuntersInfo)Service
* @description meta_hunters_info()Service *
* @createDate 2023-12-08 23:11:18 * @author makejava
*/ * @since 2023-12-09 17:22:06
*/
public interface MetaHuntersInfoService extends IService<MetaHuntersInfo> { public interface MetaHuntersInfoService extends IService<MetaHuntersInfo> {
public List<MetaHuntersInfo> getHuntersList();
} }

@ -3,6 +3,8 @@ package com.ssf.mysqloracletest.service;
import com.ssf.mysqloracletest.domain.MetaImpUserInfo; import com.ssf.mysqloracletest.domain.MetaImpUserInfo;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
/** /**
* @author 28758 * @author 28758
* @description meta_imp_user_info()Service * @description meta_imp_user_info()Service
@ -10,4 +12,6 @@ import com.baomidou.mybatisplus.extension.service.IService;
*/ */
public interface MetaImpUserInfoService extends IService<MetaImpUserInfo> { public interface MetaImpUserInfoService extends IService<MetaImpUserInfo> {
public List<MetaImpUserInfo> getListByPic();
} }

@ -0,0 +1,53 @@
package com.ssf.mysqloracletest.service;
import com.ssf.mysqloracletest.domain.VillageJwzUserInfo;
import java.util.List;
/**
*
*
* @author chglee
* @email 1992lcg@163.com
* @date 2017-09-09 10:03:34
*/
public interface VillageJwzUserInfoService {
/**
*
*/
public VillageJwzUserInfo selectVillageJwzUserInfoById(Long id);
/**
*
*/
public List<VillageJwzUserInfo> selectVillageJwzUserInfoList(VillageJwzUserInfo VillageJwzUserInfo);
public VillageJwzUserInfo selectVillageJwzUserInfoByIdcard(String idcard);
/**
*
*/
public int insertVillageJwzUserInfo(VillageJwzUserInfo VillageJwzUserInfo);
/**
*
*/
public int updateVillageJwzUserInfo(VillageJwzUserInfo VillageJwzUserInfo);
public int updateVillageJwzUserInfoByIdcard(VillageJwzUserInfo bean);
/**
*
*/
public int deleteVillageJwzUserInfoByIds(Long[] ids);
/**
*
*/
public int deleteVillageJwzUserInfoById(Long id);
public int deleteVillageJwzUserInfoByUpdatetime(VillageJwzUserInfo bean);
}

@ -5,8 +5,11 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ssf.mysqloracletest.domain.MetaActualUnitUserInfo; import com.ssf.mysqloracletest.domain.MetaActualUnitUserInfo;
import com.ssf.mysqloracletest.service.MetaActualUnitUserInfoService; import com.ssf.mysqloracletest.service.MetaActualUnitUserInfoService;
import com.ssf.mysqloracletest.mapper.MetaActualUnitUserInfoMapper; import com.ssf.mysqloracletest.mapper.MetaActualUnitUserInfoMapper;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.List;
/** /**
* @author 28758 * @author 28758
* @description meta_actual_unit_user_info()Service * @description meta_actual_unit_user_info()Service
@ -14,9 +17,16 @@ import org.springframework.stereotype.Service;
*/ */
@Service @Service
@DS("mysql") @DS("mysql")
@RequiredArgsConstructor
public class MetaActualUnitUserInfoServiceImpl extends ServiceImpl<MetaActualUnitUserInfoMapper, MetaActualUnitUserInfo> public class MetaActualUnitUserInfoServiceImpl extends ServiceImpl<MetaActualUnitUserInfoMapper, MetaActualUnitUserInfo>
implements MetaActualUnitUserInfoService{ implements MetaActualUnitUserInfoService{
private final MetaActualUnitUserInfoMapper actualUnitUserInfoMapper;
@Override
public List<MetaActualUnitUserInfo> getListByPic() {
return actualUnitUserInfoMapper.getListByPic();
}
} }

@ -92,6 +92,12 @@ public class MetaActualUserInfoServiceImpl extends ServiceImpl<MetaActualUserInf
public int deleteMetaActualUserInfoById(Long id) { public int deleteMetaActualUserInfoById(Long id) {
return metaActualUserInfoMapper.deleteMetaActualUserInfoById(id); return metaActualUserInfoMapper.deleteMetaActualUserInfoById(id);
} }
@Override
public List<MetaActualUserInfo> selectListByHomeIdSuccess(MetaActualUserInfo metaActualUserInfo) {
return metaActualUserInfoMapper.selectListByHomeIdSuccess(metaActualUserInfo);
}
} }

@ -1,24 +1,31 @@
package com.ssf.mysqloracletest.service.impl; package com.ssf.mysqloracletest.service.impl;
import com.baomidou.dynamic.datasource.annotation.DS; import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ssf.mysqloracletest.domain.MetaHuntersInfo; import com.ssf.mysqloracletest.domain.MetaHuntersInfo;
import com.ssf.mysqloracletest.service.MetaHuntersInfoService;
import com.ssf.mysqloracletest.mapper.MetaHuntersInfoMapper; import com.ssf.mysqloracletest.mapper.MetaHuntersInfoMapper;
import com.ssf.mysqloracletest.service.MetaHuntersInfoService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.List;
/** /**
* @author 10503 * (MetaHuntersInfo)ServiceImpl
* @description meta_hunters_info()Service *
* @createDate 2023-12-08 23:11:18 * @author makejava
*/ * @since 2023-12-09 17:22:06
*/
@Service @Service
@RequiredArgsConstructor
@DS("mysql") @DS("mysql")
public class MetaHuntersInfoServiceImpl extends ServiceImpl<MetaHuntersInfoMapper, MetaHuntersInfo> public class MetaHuntersInfoServiceImpl extends ServiceImpl<MetaHuntersInfoMapper, MetaHuntersInfo> implements MetaHuntersInfoService {
implements MetaHuntersInfoService{
}
private final MetaHuntersInfoMapper huntersInfoMapper;
@Override
public List<MetaHuntersInfo> getHuntersList() {
return huntersInfoMapper.getHuntersList();
}
}

@ -5,8 +5,11 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ssf.mysqloracletest.domain.MetaImpUserInfo; import com.ssf.mysqloracletest.domain.MetaImpUserInfo;
import com.ssf.mysqloracletest.service.MetaImpUserInfoService; import com.ssf.mysqloracletest.service.MetaImpUserInfoService;
import com.ssf.mysqloracletest.mapper.MetaImpUserInfoMapper; import com.ssf.mysqloracletest.mapper.MetaImpUserInfoMapper;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.List;
/** /**
* @author 28758 * @author 28758
* @description meta_imp_user_info()Service * @description meta_imp_user_info()Service
@ -14,9 +17,16 @@ import org.springframework.stereotype.Service;
*/ */
@Service @Service
@DS("mysql") @DS("mysql")
@RequiredArgsConstructor
public class MetaImpUserInfoServiceImpl extends ServiceImpl<MetaImpUserInfoMapper, MetaImpUserInfo> public class MetaImpUserInfoServiceImpl extends ServiceImpl<MetaImpUserInfoMapper, MetaImpUserInfo>
implements MetaImpUserInfoService{ implements MetaImpUserInfoService{
private final MetaImpUserInfoMapper metaImpUserInfoMapper;
@Override
public List<MetaImpUserInfo> getListByPic() {
return metaImpUserInfoMapper.getListByPic();
}
} }

@ -145,7 +145,7 @@ public class VillageActualUserInfoServiceImpl implements VillageActualUserInfoSe
} }
private static String getFolderPath(String picpath) { public static String getFolderPath(String picpath) {
String floderPath; String floderPath;
Date date = new Date(); Date date = new Date();
SimpleDateFormat simpleDate = new SimpleDateFormat("yyyyMMdd"); SimpleDateFormat simpleDate = new SimpleDateFormat("yyyyMMdd");

@ -0,0 +1,122 @@
package com.ssf.mysqloracletest.service.impl;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.ssf.mysqloracletest.domain.VillageJwzUserInfo;
import com.ssf.mysqloracletest.mapper.VillageJwzUserInfoMapper;
import com.ssf.mysqloracletest.service.VillageJwzUserInfoService;
import com.ssf.mysqloracletest.utils.StringKit;
import lombok.RequiredArgsConstructor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* Service
*
* @author ruoyi
* @date 2023-04-17
*/
@Service
@RequiredArgsConstructor
@DS("mysql")
public class VillageJwzUserInfoServiceImpl implements VillageJwzUserInfoService {
private static final Logger logger = LoggerFactory.getLogger(VillageJwzUserInfoServiceImpl.class);
private final VillageJwzUserInfoMapper jwzUserInfoDao;
/**
*
*/
@Override
public VillageJwzUserInfo selectVillageJwzUserInfoById(Long id) {
VillageJwzUserInfo v = jwzUserInfoDao.selectVillageJwzUserInfoById(id);
return v;
}
/**
*
*/
@Override
public VillageJwzUserInfo selectVillageJwzUserInfoByIdcard(String idcard) {
VillageJwzUserInfo v = jwzUserInfoDao.selectVillageJwzUserInfoByIdcard(idcard);
return v;
}
/**
*
*/
@Override
public List<VillageJwzUserInfo> selectVillageJwzUserInfoList(VillageJwzUserInfo VillageJwzUserInfo) {
List<VillageJwzUserInfo> list = jwzUserInfoDao.selectVillageJwzUserInfoList(VillageJwzUserInfo);
return list;
}
/**
*
*/
@Override
public int insertVillageJwzUserInfo(VillageJwzUserInfo VillageJwzUserInfo) {
return jwzUserInfoDao.insertVillageJwzUserInfo(VillageJwzUserInfo);
}
public int saveOrUpdate(VillageJwzUserInfo villageJwzUserInfo) {
try {
String idcard = StringKit.toString(villageJwzUserInfo.getIdCard());
VillageJwzUserInfo bean = selectVillageJwzUserInfoByIdcard(idcard);
int res = 0;
if (bean == null) {
res = jwzUserInfoDao.insertVillageJwzUserInfo(villageJwzUserInfo);
} else {
VillageJwzUserInfo beanUp = new VillageJwzUserInfo();
BeanUtils.copyProperties(villageJwzUserInfo, beanUp);
updateVillageJwzUserInfoByIdcard(beanUp);
}
return res;
} catch (Exception e) {
logger.info(StringKit.getTrace(e));
return 0;
}
}
/**
*
*/
@Override
public int updateVillageJwzUserInfo(VillageJwzUserInfo VillageJwzUserInfo) {
return jwzUserInfoDao.updateVillageJwzUserInfo(VillageJwzUserInfo);
}
@Override
public synchronized int updateVillageJwzUserInfoByIdcard(VillageJwzUserInfo bean) {
return jwzUserInfoDao.updateVillageJwzUserInfoByIdcard(bean);
}
/**
*
*/
@Override
public int deleteVillageJwzUserInfoByIds(Long[] ids) {
return jwzUserInfoDao.deleteVillageJwzUserInfoByIds(ids);
}
/**
*
*/
@Override
public int deleteVillageJwzUserInfoById(Long id) {
return jwzUserInfoDao.deleteVillageJwzUserInfoById(id);
}
@Override
public int deleteVillageJwzUserInfoByUpdatetime(VillageJwzUserInfo bean) {
return jwzUserInfoDao.deleteVillageJwzUserInfoByUpdatetime(bean);
}
}

@ -0,0 +1,131 @@
package com.ssf.mysqloracletest.task;
import com.ssf.mysqloracletest.domain.MetaActualUserInfo;
import com.ssf.mysqloracletest.domain.VillageActualUserInfo;
import com.ssf.mysqloracletest.domain.VillageJwzUserInfo;
import com.ssf.mysqloracletest.service.MetaActualUserInfoService;
import com.ssf.mysqloracletest.service.VillageActualUserInfoService;
import com.ssf.mysqloracletest.service.VillageJwzUserInfoService;
import com.ssf.mysqloracletest.utils.ConfigParam;
import com.ssf.mysqloracletest.utils.IdcardUtil;
import com.ssf.mysqloracletest.utils.NumKit;
import com.ssf.mysqloracletest.utils.StringKit;
import com.ssf.mysqloracletest.utils.util.DictUtil;
import lombok.RequiredArgsConstructor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import java.util.List;
/**
*
*/
@Component
@RequiredArgsConstructor
public class JwzUserInfoToActualTask {
private static final Logger logger = LoggerFactory.getLogger(JwzUserInfoToActualTask.class);
private final MetaActualUserInfoService actualUserInfoService;
private final VillageJwzUserInfoService jwzUserInfoService;
private final VillageActualUserInfoService villageActualUserInfoService;
/**
*
*/
@Scheduled(initialDelay = 100, fixedDelay = 3000)
public void actualInfoRebaseHomeId() {
if (!"true".equals(StringKit.toString(ConfigParam.jwzUserInfoToActual))) {
return;
}
List<MetaActualUserInfo> userInfos = actualUserInfoService.selectListByHomeIdSuccess(new MetaActualUserInfo());
for (MetaActualUserInfo bean : userInfos) {
String idcard = StringKit.toString(bean.getIdCard());
//首先根据身份证在 户籍信息查到这个人
VillageJwzUserInfo jwzUserInfo = jwzUserInfoService.selectVillageJwzUserInfoByIdcard(idcard);
if (jwzUserInfo == null) {
bean.setHouseholderRelation(0);
actualUserInfoService.saveOrUpdate(bean);
continue;
}
//查到这个人之后 在根据这个人的户号查询跟他同一户的人然后循环
VillageJwzUserInfo userInfoPara = new VillageJwzUserInfo();
userInfoPara.setAccountNumber(jwzUserInfo.getAccountNumber());
List<VillageJwzUserInfo> jwzUserInfoDos = jwzUserInfoService.selectVillageJwzUserInfoList(userInfoPara);
//遍历查询到的户籍信息数据
for (VillageJwzUserInfo userInfoDo : jwzUserInfoDos) {
String jwzRelation = userInfoDo.getHouseholderRelation();
int convortRelation = DictUtil.convertRelationJwzUserInfo(jwzRelation);
MetaActualUserInfo saveBean = new MetaActualUserInfo();
// String filePath = VillageActualUserInfoServiceImpl.getFolderPath(ConfigParam.wsDownloadPicPath) + idcard + StringKit.toString(UUID.randomUUID()).replaceAll("-", "") + ".jpg";
// try {
// boolean b = WsOkHttpUtils.wsImageDownload(idcard, filePath);
// } catch (Exception e) {
// filePath = "";
// }
VillageActualUserInfo actUserInfoPara = new VillageActualUserInfo();
actUserInfoPara.setIdcard(StringKit.toString(idcard));
List<VillageActualUserInfo> actualUserInfos = villageActualUserInfoService.selectVillageActualUserInfoListLimit1(actUserInfoPara);
String userPic = "";
if (actualUserInfos != null && actualUserInfos.size() > 0) {
userPic = StringKit.toString(actualUserInfos.get(0).getUserPic());
}
saveBean.setUserPic(userPic);
saveBean.setHouseholderRelation(convortRelation);
//如果循环中的身份证 跟 开始查询的身份证一样 更新即可
if (idcard.equals(StringKit.toString(userInfoDo.getIdCard()))) {
saveBean.setId(bean.getId());
actualUserInfoService.saveOrUpdate(saveBean);
}
saveBean.setUserName(StringKit.toString(userInfoDo.getUserName()));
saveBean.setIdCard(StringKit.toString(userInfoDo.getIdCard()));
saveBean.setSex(NumKit.checkInt(IdcardUtil.getGenderFromIDCard(userInfoDo.getIdCard())));
saveBean.setPhone(StringKit.toString(userInfoDo.getPhone()));
saveBean.setLandline(StringKit.toString(userInfoDo.getLandline()));
//todo 类型全部改成人户不一致
saveBean.setActualUserType(124);
// saveBean.setHouseHoldRegister();
saveBean.setHouseHoldAddress(StringKit.toString(userInfoDo.getHouseHoldAddress()));
saveBean.setHabitationAddress(StringKit.toString(userInfoDo.getHouseHoldAddress()));
// saveBean.setPoliceStationCode();
// saveBean.setPoliceStationName();
saveBean.setPoliceDistrictCode(StringKit.toString(userInfoDo.getPoliceDistrictCode()));
// saveBean.setPoliceDistrictName();
saveBean.setManagementStatus("Y");
saveBean.setHomeId(StringKit.toString(bean.getHomeId()));
// saveBean.setHomeCode();
// saveBean.setAccountNumber();
saveBean.setMetaCreateTime(cn.hutool.core.date.DateUtil.format(cn.hutool.core.date.DateUtil.date(), "yyyyMMddHHmmss"));
saveBean.setMetaUpdateTime(cn.hutool.core.date.DateUtil.format(cn.hutool.core.date.DateUtil.date(), "yyyyMMddHHmmss"));
if ("".equals(userInfoDo.getIdCard())) {
continue;
}
//如果循环中的身份证 跟 开始查询的身份证一样 更新即可
if (idcard.equals(StringKit.toString(userInfoDo.getIdCard()))) {
saveBean.setId(bean.getId());
}
actualUserInfoService.saveOrUpdate(saveBean);
logger.info("更新或新增成功:" + saveBean.getIdCard());
}
}
}
}

@ -4,8 +4,10 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ssf.mysqloracletest.domain.MetaActualUnitUserInfo; import com.ssf.mysqloracletest.domain.MetaActualUnitUserInfo;
import com.ssf.mysqloracletest.domain.VSySydwCyryMysql; import com.ssf.mysqloracletest.domain.VSySydwCyryMysql;
import com.ssf.mysqloracletest.domain.VillageActualUserInfo;
import com.ssf.mysqloracletest.service.MetaActualUnitUserInfoService; import com.ssf.mysqloracletest.service.MetaActualUnitUserInfoService;
import com.ssf.mysqloracletest.service.VSySydwCyryMysqlService; import com.ssf.mysqloracletest.service.VSySydwCyryMysqlService;
import com.ssf.mysqloracletest.service.VillageActualUserInfoService;
import com.ssf.mysqloracletest.utils.ConfigParam; import com.ssf.mysqloracletest.utils.ConfigParam;
import com.ssf.mysqloracletest.utils.StringKit; import com.ssf.mysqloracletest.utils.StringKit;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
@ -30,7 +32,7 @@ public class MetaActualUnitUserInfoTask {
private final VSySydwCyryMysqlService vSySydwCyryMysqlService; private final VSySydwCyryMysqlService vSySydwCyryMysqlService;
private final MetaActualUnitUserInfoService metaActualUnitUserInfoService; private final MetaActualUnitUserInfoService metaActualUnitUserInfoService;
private final VillageActualUserInfoService actualUserInfoService;
@Scheduled(initialDelay = 100, fixedDelay = 3000) @Scheduled(initialDelay = 100, fixedDelay = 3000)
public void transcyry() { public void transcyry() {
@ -49,10 +51,8 @@ public class MetaActualUnitUserInfoTask {
for (VSySydwCyryMysql bean : resultList) { for (VSySydwCyryMysql bean : resultList) {
cleanCyry(bean);
cleanCyry(bean); latch.countDown();
latch.countDown();
} }
@ -97,7 +97,23 @@ public class MetaActualUnitUserInfoTask {
cyry.setStatus("2"); cyry.setStatus("2");
vSySydwCyryMysqlService.updateCyryById(cyry); vSySydwCyryMysqlService.updateCyryById(cyry);
} }
}
@Scheduled(initialDelay = 100, fixedDelay = 3000)
public void transCyryToPic() {
List<MetaActualUnitUserInfo> impUserInfos = metaActualUnitUserInfoService.getListByPic();
for (MetaActualUnitUserInfo userInfo : impUserInfos) {
VillageActualUserInfo userInfoPara = new VillageActualUserInfo();
userInfoPara.setIdcard(StringKit.toString(userInfo.getIdentityId()));
List<VillageActualUserInfo> actualUserInfos = actualUserInfoService.selectVillageActualUserInfoListLimit1(userInfoPara);
String userPic = "";
if (actualUserInfos != null && actualUserInfos.size() > 0) {
userPic = StringKit.toString(actualUserInfos.get(0).getUserPic());
}
userInfo.setStaffPic(userPic);
metaActualUnitUserInfoService.updateById(userInfo);
}
} }

@ -80,7 +80,7 @@ public class MetaImpUserInfoTask {
userInfo.setPhone(StringKit.toString(beanCp.getSJHM())); userInfo.setPhone(StringKit.toString(beanCp.getSJHM()));
String zdrlx = StringKit.toString(beanCp.getZDRYXL()); String zdrlx = StringKit.toString(beanCp.getZDRYXL());
if ("".equals(zdrlx)) { if (!"".equals(zdrlx)) {
userInfo.setImpUserType(zdrlx.substring(0, 4) + "000000"); userInfo.setImpUserType(zdrlx.substring(0, 4) + "000000");
userInfo.setImpUserSubType(beanCp.getZDRYXL()); userInfo.setImpUserSubType(beanCp.getZDRYXL());
} }
@ -105,4 +105,21 @@ public class MetaImpUserInfoTask {
} }
@Scheduled(initialDelay = 100, fixedDelay = 3000)
public void transCyryToPic() {
List<MetaImpUserInfo> impUserInfos = metaImpUserInfoService.getListByPic();
for (MetaImpUserInfo userInfo : impUserInfos) {
VillageActualUserInfo userInfoPara = new VillageActualUserInfo();
userInfoPara.setIdcard(StringKit.toString(userInfo.getIdCard()));
List<VillageActualUserInfo> actualUserInfos = actualUserInfoService.selectVillageActualUserInfoListLimit1(userInfoPara);
String userPic = "";
if (actualUserInfos != null && actualUserInfos.size() > 0) {
userPic = StringKit.toString(actualUserInfos.get(0).getUserPic());
}
userInfo.setUserPic(userPic);
metaImpUserInfoService.updateById(userInfo);
}
}
} }

@ -1,6 +1,8 @@
package com.ssf.mysqloracletest.task; package com.ssf.mysqloracletest.task;
import com.ssf.mysqloracletest.domain.*; import com.ssf.mysqloracletest.domain.MetaActualUserInfo;
import com.ssf.mysqloracletest.domain.VSySyrkMysql;
import com.ssf.mysqloracletest.domain.VillageActualUserInfo;
import com.ssf.mysqloracletest.service.MetaActualUserInfoService; import com.ssf.mysqloracletest.service.MetaActualUserInfoService;
import com.ssf.mysqloracletest.service.MetaRealEstateInfoService; import com.ssf.mysqloracletest.service.MetaRealEstateInfoService;
import com.ssf.mysqloracletest.service.VSySyrkMysqlService; import com.ssf.mysqloracletest.service.VSySyrkMysqlService;
@ -92,6 +94,8 @@ public class SyrkToActualInfoTask {
// } // }
String idcard = StringKit.toString(beanCp.getSFZH());
VillageActualUserInfo userInfoPara = new VillageActualUserInfo(); VillageActualUserInfo userInfoPara = new VillageActualUserInfo();
userInfoPara.setIdcard(StringKit.toString(beanCp.getSFZH())); userInfoPara.setIdcard(StringKit.toString(beanCp.getSFZH()));
List<VillageActualUserInfo> actualUserInfos = villageActualUserInfoService.selectVillageActualUserInfoListLimit1(userInfoPara); List<VillageActualUserInfo> actualUserInfos = villageActualUserInfoService.selectVillageActualUserInfoListLimit1(userInfoPara);
@ -100,10 +104,18 @@ public class SyrkToActualInfoTask {
userPic = StringKit.toString(actualUserInfos.get(0).getUserPic()); userPic = StringKit.toString(actualUserInfos.get(0).getUserPic());
} }
// String filePath = VillageActualUserInfoServiceImpl.getFolderPath(ConfigParam.wsDownloadPicPath) + idcard + StringKit.toString(UUID.randomUUID()).replaceAll("-", "") + ".jpg";
// try {
// boolean b = WsOkHttpUtils.wsImageDownload(idcard, filePath);
// } catch (Exception e) {
// filePath = "";
// }
MetaActualUserInfo realEstateInfo = new MetaActualUserInfo(); MetaActualUserInfo realEstateInfo = new MetaActualUserInfo();
realEstateInfo.setUserPic(userPic); realEstateInfo.setUserPic(userPic);
realEstateInfo.setUserName(beanCp.getXM()); realEstateInfo.setUserName(beanCp.getXM());
realEstateInfo.setIdCard(beanCp.getSFZH()); realEstateInfo.setIdCard(idcard);
realEstateInfo.setSex(NumKit.checkInt(beanCp.getXB())); realEstateInfo.setSex(NumKit.checkInt(beanCp.getXB()));
realEstateInfo.setPhone(beanCp.getLXDH()); realEstateInfo.setPhone(beanCp.getLXDH());
realEstateInfo.setLandline(beanCp.getSJHM()); realEstateInfo.setLandline(beanCp.getSJHM());

@ -0,0 +1,59 @@
package com.ssf.mysqloracletest.task;
import com.ssf.mysqloracletest.domain.MetaHuntersInfo;
import com.ssf.mysqloracletest.domain.VillageActualUserInfo;
import com.ssf.mysqloracletest.service.MetaHuntersInfoService;
import com.ssf.mysqloracletest.service.VillageActualUserInfoService;
import com.ssf.mysqloracletest.utils.StringKit;
import lombok.RequiredArgsConstructor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import java.util.List;
/**
*
*/
@Component
@RequiredArgsConstructor
public class hunterToPicTask {
private static final Logger logger = LoggerFactory.getLogger(hunterToPicTask.class);
private final VillageActualUserInfoService actualUserInfoService;
private final MetaHuntersInfoService huntersInfoService;
/**
*
*/
@Scheduled(initialDelay = 100, fixedDelay = 3000)
public void huntersToPic() {
List<MetaHuntersInfo> huntersInfos = huntersInfoService.getHuntersList();
for (MetaHuntersInfo huntersInfo : huntersInfos) {
String idcard = huntersInfo.getIdCard();
if ("".equals(StringKit.toString(idcard))) {
huntersInfo.setUserPic("");
} else {
VillageActualUserInfo userInfoPara = new VillageActualUserInfo();
userInfoPara.setIdcard(idcard);
List<VillageActualUserInfo> actualUserInfos = actualUserInfoService.selectVillageActualUserInfoListLimit1(userInfoPara);
String userPic = "";
if (actualUserInfos != null && actualUserInfos.size() > 0) {
userPic = StringKit.toString(actualUserInfos.get(0).getUserPic());
}
huntersInfo.setUserPic(userPic);
}
huntersInfoService.saveOrUpdate(huntersInfo);
logger.info("idcard图片更新成功" + idcard);
}
}
}

@ -52,4 +52,10 @@ public class ConfigParam {
public static String SlryOracleSwitch = StringKit.toString(PropertiesUtil.queryPropertiesByKey("SlryOracleSwitch")); public static String SlryOracleSwitch = StringKit.toString(PropertiesUtil.queryPropertiesByKey("SlryOracleSwitch"));
public static String jwzUserInfoToActual = StringKit.toString(PropertiesUtil.queryPropertiesByKey("jwzUserInfoToActual"));
public static String wshttpurl = PropertiesUtil.queryPropertiesByKey("wshttpurl");
public static String wsDownloadPicPath = PropertiesUtil.queryPropertiesByKey("wsDownloadPicPath");
public static String wsDownloadPicAreaStart = PropertiesUtil.queryPropertiesByKey("wsDownloadPicAreaStart");
} }

@ -0,0 +1,59 @@
package com.ssf.mysqloracletest.utils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.text.SimpleDateFormat;
import java.util.Date;
public class IdcardUtil {
private static Logger logger = LoggerFactory.getLogger(IdcardUtil.class);
// 从身份证号码中获取性别
public static String getGenderFromIDCard(String idCard) {
String gender = "";
try {
if (idCard.length() == 18) {
int genderCode = Integer.parseInt(idCard.substring(16, 17));
//1男 2女
gender = genderCode % 2 == 0 ? "2" : "1";
// gender = genderCode % 2 == 0 ? "女" : "男";
}
} catch (Exception e) {
logger.info(idCard + ":提取性别失败");
}
return gender;
}
// 从身份证号码中获取生日
public static String getBirthdayFromIDCard(String idCard) {
String birthday = "";
if (idCard.length() == 18) {
String year = idCard.substring(6, 10);
String month = idCard.substring(10, 12);
String day = idCard.substring(12, 14);
birthday = year + "-" + month + "-" + day;
}
return birthday;
}
/**
* date
*
* @param dateString
* @return
*/
public static Date convertStringToDate(String dateString) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
try {
return sdf.parse(dateString);
} catch (Exception e) {
e.printStackTrace();
return null;
}
}
}

@ -0,0 +1,74 @@
package com.ssf.mysqloracletest.utils;
import com.squareup.okhttp.OkHttpClient;
import com.squareup.okhttp.Request;
import com.squareup.okhttp.Response;
import com.squareup.okhttp.ResponseBody;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.OutputStream;
public class WsOkHttpUtils {
private static Logger logger = LoggerFactory.getLogger(WsOkHttpUtils.class);
public static boolean wsImageDownload(String idcard, String toPath) {
String url = ConfigParam.wshttpurl + idcard;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url(url)
.get()
.addHeader("User-Agent", "PostmanRuntime/7.15.2")
.addHeader("Accept", "*/*")
.addHeader("Cache-Control", "no-cache")
.addHeader("Postman-Token", "7c9d31e5-31af-462b-a139-1d8e708f3754,66cb412d-20dd-42e2-930f-ea1f746d890d")
.addHeader("Accept-Encoding", "gzip, deflate")
.addHeader("Referer", url)
.addHeader("Connection", "keep-alive")
.addHeader("cache-control", "no-cache")
.build();
try {
Response response = client.newCall(request).execute();
if (response.isSuccessful()) {
// 获取响应体
ResponseBody responseBody = response.body();
long length = responseBody.contentLength();
if (0 == length) {
logger.info("pic length is null");
return false;
}
// 获取输入流
InputStream inputStream = responseBody.byteStream();
// 指定本地保存路径
// String localFilePath = "path/to/save/image.jpg";
// 使用输出流将输入流写入本地文件
try (OutputStream outputStream = new FileOutputStream(toPath)) {
byte[] buffer = new byte[8192];
int bytesRead;
while ((bytesRead = inputStream.read(buffer)) != -1) {
outputStream.write(buffer, 0, bytesRead);
}
}
logger.info("Image saved successfully!");
return true;
} else {
logger.info("Request failed with code: " + response.code());
}
} catch (Exception e) {
e.printStackTrace();
}
return false;
}
}

@ -0,0 +1,551 @@
package com.ssf.mysqloracletest.utils.util;
import com.ssf.mysqloracletest.utils.StringKit;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class DictUtil {
private static Logger logger = LoggerFactory.getLogger(DictUtil.class);
/**
*
*
* @return
*/
public static int convertRelation(String value) {
value = StringKit.toString(value);
int result = 8;
//1 本人
if ("01".equals(value)) {
result = 0;
}
//2 户主
else if ("02".equals(value)) {
result = 0;
}
//3 小集体户户主
else if ("03".equals(value)) {
result = 0;
}
//10 配偶
else if ("10".equals(value)) {
result = 1;
}
//11 夫
else if ("11".equals(value)) {
result = 1;
}
//12 妻
else if ("12".equals(value)) {
result = 1;
}
//20 子
else if ("20".equals(value)) {
result = 2;
}
//21 独生子
else if ("21".equals(value)) {
result = 2;
}
//22 长子
else if ("22".equals(value)) {
result = 2;
}
//23 次子
else if ("23".equals(value)) {
result = 2;
}
//24 三子
else if ("24".equals(value)) {
result = 2;
}
//25 四子
else if ("25".equals(value)) {
result = 2;
}
//26 五子
else if ("26".equals(value)) {
result = 2;
}
//27 养子或继子
else if ("27".equals(value)) {
result = 2;
}
//28 女婿
else if ("28".equals(value)) {
result = 8;
}
//29 其它儿子
else if ("28".equals(value)) {
result = 2;
}
//30 女
else if ("30".equals(value)) {
result = 3;
}
//31 独生女
else if ("31".equals(value)) {
result = 3;
}
//32 长女
else if ("32".equals(value)) {
result = 3;
}
//33 二女
else if ("33".equals(value)) {
result = 3;
}
//34 三女
else if ("34".equals(value)) {
result = 3;
}
//35 四女
else if ("35".equals(value)) {
result = 3;
}
//36 五女
else if ("36".equals(value)) {
result = 3;
}
//37 养女
else if ("37".equals(value)) {
result = 3;
}
//38 儿媳
else if ("38".equals(value)) {
result = 8;
}
//39 其它女儿
else if ("39".equals(value)) {
result = 3;
}
//40 孙子,孙女或外孙子,外孙女
else if ("40".equals(value)) {
result = 4;
}
//41 孙子
else if ("41".equals(value)) {
result = 4;
}
//42 孙女
else if ("42".equals(value)) {
result = 4;
}
//43 外孙子
else if ("43".equals(value)) {
result = 4;
}
//44 外孙女
else if ("44".equals(value)) {
result = 4;
}
//45 孙媳妇或外孙媳妇
else if ("45".equals(value)) {
result = 8;
}
//46 孙女婿或外孙女婿
else if ("46".equals(value)) {
result = 8;
}
//47 曾孙子或曾外孙子
else if ("47".equals(value)) {
result = 8;
}
//48 曾孙女或曾外孙女
else if ("48".equals(value)) {
result = 8;
}
//49 其他孙子,孙女或外孙子
else if ("49".equals(value)) {
result = 8;
}
//50 父母
else if ("50".equals(value)) {
result = 5;
}
//51 父亲
else if ("51".equals(value)) {
result = 5;
}
//52 母亲
else if ("52".equals(value)) {
result = 5;
}
//53 公公
else if ("53".equals(value)) {
result = 8;
}
//54 婆婆
else if ("54".equals(value)) {
result = 8;
}
//55 岳父
else if ("55".equals(value)) {
result = 8;
}
//56 岳母
else if ("56".equals(value)) {
result = 8;
}
//57 继父或养父
else if ("57".equals(value)) {
result = 8;
}
//58 继母或养母
else if ("58".equals(value)) {
result = 8;
}
//59 其它父母关系
else if ("59".equals(value)) {
result = 8;
}
//60 祖父母或外祖父母
else if ("60".equals(value)) {
result = 6;
}
//61 祖父
else if ("61".equals(value)) {
result = 6;
}
//62 祖母
else if ("62".equals(value)) {
result = 6;
}
//63 外祖父
else if ("63".equals(value)) {
result = 6;
}
//64 外祖母
else if ("64".equals(value)) {
result = 6;
}
//65 配偶的祖父母或外祖父母
else if ("65".equals(value)) {
result = 8;
}
//66 曾祖父
else if ("66".equals(value)) {
result = 8;
}
//67 曾祖母
else if ("67".equals(value)) {
result = 8;
}
//68 配偶的曾祖父母
else if ("68".equals(value)) {
result = 8;
}
//69 其它祖父母或外祖父母关系
else if ("69".equals(value)) {
result = 8;
}
//70 兄弟姐妹
else if ("70".equals(value)) {
result = 7;
}
//71 兄
else if ("71".equals(value)) {
result = 7;
}
//72 嫂
else if ("72".equals(value)) {
result = 8;
}
//73 弟
else if ("73".equals(value)) {
result = 7;
}
//74 弟媳
else if ("74".equals(value)) {
result = 8;
}
//75 姐姐
else if ("75".equals(value)) {
result = 7;
}
//76 姐夫
else if ("76".equals(value)) {
result = 8;
}
//77 妹妹
else if ("77".equals(value)) {
result = 7;
}
//78 妹夫
else if ("78".equals(value)) {
result = 8;
}
//79 其它兄弟姐妹
else if ("79".equals(value)) {
result = 8;
} else {
//下面的关系都是其他
result = 8;
}
return result;
// 81 伯父
// 82 伯母
// 83 叔父
// 84 婶母
// 85 舅父
// 86 舅母
// 87 姨父
// 88 姨母
// 89 姑父
// 90 姑母
// 91 堂兄弟,堂姐妹
// 92 表兄弟,表姐妹
// 93 侄子
// 94 侄女
// 95 外甥
// 96 外甥女
// 97 其他亲属
// 98 保姆
// 99 非亲属
}
public static int convertRelationJwzUserInfo(String value) {
value = StringKit.toString(value);
int result = 99;
//1 本人
if ("01".equals(value)) {
result = 99;
}
//2 户主
else if ("02".equals(value)) {
result = 1;
}
//3 小集体户户主
else if ("03".equals(value)) {
result = 1;
}
//10 配偶
else if ("10".equals(value)) {
result = 2;
}
//11 夫
else if ("11".equals(value)) {
result = 2;
}
//12 妻
else if ("12".equals(value)) {
result = 2;
}
//20 子
else if ("20".equals(value)) {
result = 3;
}
//21 独生子
else if ("21".equals(value)) {
result = 3;
}
//22 长子
else if ("22".equals(value)) {
result = 3;
}
//23 次子
else if ("23".equals(value)) {
result = 3;
}
//24 三子
else if ("24".equals(value)) {
result = 3;
}
//25 四子
else if ("25".equals(value)) {
result = 3;
}
//26 五子
else if ("26".equals(value)) {
result = 3;
}
//27 养子或继子
else if ("27".equals(value)) {
result = 3;
}
//29 其它儿子
else if ("28".equals(value)) {
result = 3;
}
//30 女
else if ("30".equals(value)) {
result = 4;
}
//31 独生女
else if ("31".equals(value)) {
result = 4;
}
//32 长女
else if ("32".equals(value)) {
result = 4;
}
//33 二女
else if ("33".equals(value)) {
result = 4;
}
//34 三女
else if ("34".equals(value)) {
result = 4;
}
//35 四女
else if ("35".equals(value)) {
result = 4;
}
//36 五女
else if ("36".equals(value)) {
result = 4;
}
//37 养女
else if ("37".equals(value)) {
result = 4;
}
//39 其它女儿
else if ("39".equals(value)) {
result = 4;
}
//40 孙子,孙女或外孙子,外孙女
else if ("40".equals(value)) {
result = 5;
}
//41 孙子
else if ("41".equals(value)) {
result = 5;
}
//42 孙女
else if ("42".equals(value)) {
result = 5;
}
//43 外孙子
else if ("43".equals(value)) {
result = 5;
}
//44 外孙女
else if ("44".equals(value)) {
result = 5;
}
//47 曾孙子或曾外孙子
else if ("47".equals(value)) {
result = 5;
}
//48 曾孙女或曾外孙女
else if ("48".equals(value)) {
result = 5;
}
//49 其他孙子,孙女或外孙子
else if ("49".equals(value)) {
result = 5;
}
//50 父母
else if ("50".equals(value)) {
result = 6;
}
//51 父亲
else if ("51".equals(value)) {
result = 6;
}
//52 母亲
else if ("52".equals(value)) {
result = 6;
}
//57 继父或养父
else if ("57".equals(value)) {
result = 6;
}
//58 继母或养母
else if ("58".equals(value)) {
result = 6;
}
//59 其它父母关系
else if ("59".equals(value)) {
result = 6;
}
//60 祖父母或外祖父母
else if ("60".equals(value)) {
result = 7;
}
//61 祖父
else if ("61".equals(value)) {
result = 7;
}
//62 祖母
else if ("62".equals(value)) {
result = 7;
}
//63 外祖父
else if ("63".equals(value)) {
result = 7;
}
//64 外祖母
else if ("64".equals(value)) {
result = 7;
}
//65 配偶的祖父母或外祖父母
else if ("65".equals(value)) {
result = 7;
}
//66 曾祖父
else if ("66".equals(value)) {
result = 7;
}
//67 曾祖母
else if ("67".equals(value)) {
result = 7;
}
//68 配偶的曾祖父母
else if ("68".equals(value)) {
result = 7;
}
//69 其它祖父母或外祖父母关系
else if ("69".equals(value)) {
result = 7;
}
//70 兄弟姐妹
else if ("70".equals(value)) {
result = 8;
}
//71 兄
else if ("71".equals(value)) {
result = 8;
}
//73 弟
else if ("73".equals(value)) {
result = 8;
}
//75 姐姐
else if ("75".equals(value)) {
result = 8;
}
//76 姐夫
else if ("76".equals(value)) {
result = 8;
}
//77 妹妹
else if ("77".equals(value)) {
result = 8;
}
//78 妹夫
else if ("78".equals(value)) {
result = 8;
}
//79 其它兄弟姐妹
else if ("79".equals(value)) {
result = 8;
} else {
//下面的关系都是其他
result = 99;
}
return result;
}
}

@ -156,4 +156,9 @@
where home_id is not null and account_number is null limit 200; where home_id is not null and account_number is null limit 200;
</select> </select>
<select id="selectListByHomeIdSuccess" parameterType="com.ssf.mysqloracletest.domain.MetaActualUserInfo" resultMap="MetaActualUserInfoResult">
<include refid="selectMetaActualUserInfoVo"/>
where account_number ='success' and householder_relation = 0 limit 200;
</select>
</mapper> </mapper>

@ -0,0 +1,243 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ssf.mysqloracletest.mapper.VillageJwzUserInfoMapper">
<resultMap type="com.ssf.mysqloracletest.domain.VillageJwzUserInfo" id="VillageJwzUserInfoResult">
<result property="id" column="id" />
<result property="householderRelation" column="householder_relation" />
<result property="education" column="education" />
<result property="religious" column="religious" />
<result property="marriage" column="marriage" />
<result property="politicalOutlook" column="political_outlook" />
<result property="managementStatus" column="management_status" />
<result property="userPic" column="user_pic" />
<result property="userName" column="user_name" />
<result property="phone" column="phone" />
<result property="accountNumber" column="account_number" />
<result property="landline" column="landline" />
<result property="idCard" column="id_card" />
<result property="houseHoldRegister" column="house_hold_register" />
<result property="houseHoldAddress" column="house_hold_address" />
<result property="spouseName" column="spouse_name" />
<result property="spouseIdCard" column="spouse_id_card" />
<result property="fatherName" column="father_name" />
<result property="fatherIdCard" column="father_id_card" />
<result property="motherName" column="mother_name" />
<result property="motherIdCard" column="mother_id_card" />
<result property="policeDistrictCode" column="police_district_code" />
<result property="isactive" column="isactive" />
<result property="householderRelation" column="householder_relation" />
</resultMap>
<sql id="selectVillageJwzUserInfoVo">
select
id,
householder_relation,
education,
religious,
marriage,
political_outlook,
management_status,
user_pic,
user_name,
phone,
account_number,
landline,
id_card,
house_hold_register,
house_hold_address,
spouse_name,
spouse_id_card,
father_name,
father_id_card,
mother_name,
mother_id_card,
police_district_code,
isactive
from village_jwz_user_info
</sql>
<select id="selectVillageJwzUserInfoList" parameterType="com.ssf.mysqloracletest.domain.VillageJwzUserInfo" resultMap="VillageJwzUserInfoResult">
<include refid="selectVillageJwzUserInfoVo"/>
<where>
<if test="userName != null and userName != ''"> and user_name = #{userName}</if>
<if test="idCard != null and idCard != ''"> and id_card = #{idCard}</if>
<if test="accountNumber != null and accountNumber != ''"> and account_number = #{accountNumber}</if>
</where>
</select>
<select id="selectVillageJwzUserInfoById" parameterType="Long" resultMap="VillageJwzUserInfoResult">
<include refid="selectVillageJwzUserInfoVo"/>
where id = #{id}
</select>
<select id="selectVillageJwzUserInfoByIdcard" parameterType="String" resultMap="VillageJwzUserInfoResult">
<include refid="selectVillageJwzUserInfoVo"/>
where id_card = #{idCard} limit 1
</select>
<insert id="insertVillageJwzUserInfo" parameterType="com.ssf.mysqloracletest.domain.VillageJwzUserInfo" useGeneratedKeys="true" keyProperty="id">
insert into village_jwz_user_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="householderRelation != null and householderRelation != ''">householder_relation,</if>
<if test="education != null and education != ''">education,</if>
<if test="religious != null and religious != ''">religious,</if>
<if test="marriage != null and marriage != ''">marriage,</if>
<if test="politicalOutlook != null and politicalOutlook != ''">political_outlook,</if>
<if test="managementStatus != null and managementStatus != ''">management_status,</if>
<if test="userPic != null and userPic != ''">user_pic,</if>
<if test="userName != null and userName != ''">user_name,</if>
<if test="phone != null and phone != ''">phone,</if>
<if test="accountNumber != null and accountNumber != ''">account_number,</if>
<if test="landline != null and landline != ''">landline,</if>
<if test="idCard != null and idCard != ''">id_card,</if>
<if test="houseHoldRegister != null and houseHoldRegister != ''">house_hold_register,</if>
<if test="houseHoldAddress != null and houseHoldAddress != ''">house_hold_address,</if>
<if test="spouseName != null and spouseName != ''">spouse_name,</if>
<if test="spouseIdCard != null and spouseIdCard != ''">spouse_id_card,</if>
<if test="fatherName != null and fatherName != ''">father_name,</if>
<if test="fatherIdCard != null and fatherIdCard != ''">father_id_card,</if>
<if test="motherName != null and motherName != ''">mother_name,</if>
<if test="motherIdCard != null and motherIdCard != ''">mother_id_card,</if>
<if test="policeDistrictCode != null and policeDistrictCode != ''">police_district_code,</if>
<if test="isactive != null and isactive != ''">isactive,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="householderRelation != null and householderRelation != ''">#{householderRelation},</if>
<if test="education != null and education != ''">#{education},</if>
<if test="religious != null and religious != ''">#{religious},</if>
<if test="marriage != null and marriage != ''">#{marriage},</if>
<if test="politicalOutlook != null and politicalOutlook != ''">#{politicalOutlook},</if>
<if test="managementStatus != null and managementStatus != ''">#{managementStatus},</if>
<if test="userPic != null and userPic != ''">#{userPic},</if>
<if test="userName != null and userName != ''">#{userName},</if>
<if test="phone != null and phone != ''">#{phone},</if>
<if test="accountNumber != null and accountNumber != ''">#{accountNumber},</if>
<if test="landline != null and landline != ''">#{landline},</if>
<if test="idCard != null and idCard != ''">#{idCard},</if>
<if test="houseHoldRegister != null and houseHoldRegister != ''">#{houseHoldRegister},</if>
<if test="houseHoldAddress != null and houseHoldAddress != ''">#{houseHoldAddress},</if>
<if test="spouseName != null and spouseName != ''">#{spouseName},</if>
<if test="spouseIdCard != null and spouseIdCard != ''">#{spouseIdCard},</if>
<if test="fatherName != null and fatherName != ''">#{fatherName},</if>
<if test="fatherIdCard != null and fatherIdCard != ''">#{fatherIdCard},</if>
<if test="motherName != null and motherName != ''">#{motherName},</if>
<if test="motherIdCard != null and motherIdCard != ''">#{motherIdCard},</if>
<if test="policeDistrictCode != null and policeDistrictCode != ''">#{policeDistrictCode},</if>
<if test="isactive != null and isactive != ''">#{isactive},</if>
</trim>
</insert>
<update id="updateVillageJwzUserInfo" parameterType="com.ssf.mysqloracletest.domain.VillageJwzUserInfo">
update village_jwz_user_info
<trim prefix="SET" suffixOverrides=",">
<if test="householderRelation != null and householderRelation != ''">householder_relation = #{householderRelation},</if>
<if test="education != null and education != ''">education = #{education},</if>
<if test="religious != null and religious != ''">religious = #{religious},</if>
<if test="marriage != null and marriage != ''">marriage = #{marriage},</if>
<if test="politicalOutlook != null and politicalOutlook != ''">political_outlook = #{politicalOutlook},</if>
<if test="managementStatus != null and managementStatus != ''">management_status = #{managementStatus},</if>
<if test="userPic != null and userPic != ''">user_pic = #{userPic},</if>
<if test="userName != null and userName != ''">user_name = #{userName},</if>
<if test="phone != null and phone != ''">phone = #{phone},</if>
<if test="accountNumber != null and accountNumber != ''">account_number = #{accountNumber},</if>
<if test="landline != null and landline != ''">landline = #{landline},</if>
<if test="idCard != null and idCard != ''">id_card = #{idCard},</if>
<if test="houseHoldRegister != null and houseHoldRegister != ''">house_hold_register = #{houseHoldRegister},</if>
<if test="houseHoldAddress != null and houseHoldAddress != ''">house_hold_address = #{houseHoldAddress},</if>
<if test="spouseName != null and spouseName != ''">spouse_name = #{spouseName},</if>
<if test="spouseIdCard != null and spouseIdCard != ''">spouse_id_card = #{spouseIdCard},</if>
<if test="fatherName != null and fatherName != ''">father_name = #{fatherName},</if>
<if test="fatherIdCard != null and fatherIdCard != ''">father_id_card = #{fatherIdCard},</if>
<if test="motherName != null and motherName != ''">mother_name = #{motherName},</if>
<if test="motherIdCard != null and motherIdCard != ''">mother_id_card = #{motherIdCard},</if>
<if test="policeDistrictCode != null and policeDistrictCode != ''">police_district_code = #{policeDistrictCode},</if>
<if test="isactive != null and isactive != ''">isactive = #{isactive},</if>
</trim>
where id = #{id}
</update>
<update id="updateVillageJwzUserInfoByIdcard" parameterType="com.ssf.mysqloracletest.domain.VillageJwzUserInfo">
update village_jwz_user_info
<trim prefix="SET" suffixOverrides=",">
<if test="householderRelation != null and householderRelation != ''">householder_relation = #{householderRelation},</if>
<if test="education != null and education != ''">education = #{education},</if>
<if test="religious != null and religious != ''">religious = #{religious},</if>
<if test="marriage != null and marriage != ''">marriage = #{marriage},</if>
<if test="politicalOutlook != null and politicalOutlook != ''">political_outlook = #{politicalOutlook},</if>
<if test="managementStatus != null and managementStatus != ''">management_status = #{managementStatus},</if>
<if test="userPic != null and userPic != ''">user_pic = #{userPic},</if>
<if test="userName != null and userName != ''">user_name = #{userName},</if>
<if test="phone != null and phone != ''">phone = #{phone},</if>
<if test="accountNumber != null and accountNumber != ''">account_number = #{accountNumber},</if>
<if test="landline != null and landline != ''">landline = #{landline},</if>
<if test="idCard != null and idCard != ''">id_card = #{idCard},</if>
<if test="houseHoldRegister != null and houseHoldRegister != ''">house_hold_register = #{houseHoldRegister},</if>
<if test="houseHoldAddress != null and houseHoldAddress != ''">house_hold_address = #{houseHoldAddress},</if>
<if test="spouseName != null and spouseName != ''">spouse_name = #{spouseName},</if>
<if test="spouseIdCard != null and spouseIdCard != ''">spouse_id_card = #{spouseIdCard},</if>
<if test="fatherName != null and fatherName != ''">father_name = #{fatherName},</if>
<if test="fatherIdCard != null and fatherIdCard != ''">father_id_card = #{fatherIdCard},</if>
<if test="motherName != null and motherName != ''">mother_name = #{motherName},</if>
<if test="motherIdCard != null and motherIdCard != ''">mother_id_card = #{motherIdCard},</if>
<if test="policeDistrictCode != null and policeDistrictCode != ''">police_district_code = #{policeDistrictCode},</if>
<if test="isactive != null and isactive != ''">isactive = #{isactive},</if>
</trim>
where id_card = #{idCard}
</update>
<delete id="deleteVillageJwzUserInfoById" parameterType="Long">
delete from village_jwz_user_info where id = #{id}
</delete>
<delete id="deleteVillageJwzUserInfoByUpdatetime" parameterType="com.ssf.mysqloracletest.domain.VillageJwzUserInfo">
delete from village_jwz_user_info where DATE_FORMAT(updatetime, '%Y-%m-%d') != '${updatetimeV}'
</delete>
<delete id="deleteVillageJwzUserInfoByIds" parameterType="String">
delete from village_jwz_user_info where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
<select id="list" resultMap="VillageJwzUserInfoResult">
select * from village_jwz_user_info
where
1=1
and id > ${first}
limit 200
</select>
</mapper>
Loading…
Cancel
Save