Commit bb48c454 authored by fangxinjiang's avatar fangxinjiang

版本切换-fxj

parent b6c48698
......@@ -290,44 +290,38 @@ public class ExcelUtil <T> implements Serializable {
if (Common.isNotNull(attr.readConverterExp())) {
tempStr= reverseByExp( c, attr.readConverterExp());
if (Common.isEmpty(tempStr)){
errorMessageHashMap = initErrorMessage(errorMessageHashMap, new ErrorMessage(rowNum, "未找到:" + c + "的字典数据"), errorTemp);
errorMessageHashMap = initErrorMessage(errorMessageHashMap, new ErrorMessage(rowNum, attr.name()+"未找到:" + c + "的字典数据"), errorTemp);
continue;
}else {
c = tempStr;
}
} else if (attr.isDataId()) {
if (Common.isNotNull(attr.dataType())) {
//非区域字段处理 TODO
//非区域字段处理
tempStr = getDicValue(c, tempStr, attr,rowNum,errorTemp);
/*if (Common.isNotNull(attr.parentField())){
tempStr = dicMap.get(attr.dataType() + "_" + c.trim() + "_" + getFieldValueByName(attr.parentField(), entity, DateUtil.ISO_EXPANDED_DATE_FORMAT));
}else {
tempStr = dicMap.get(attr.dataType() + "_" + c.trim());
}*/
}
}else {
if (attr.isArea()) {
//区域字段处理 TODO
//区域字段处理
if (!Common.isNotNull(attr.parentField())) {
tempStr = getAreaValue(c.trim(), tempStr, attr,rowNum,errorTemp);
} else {
// TODO
tempStr = getAreaValue(c.trim()+ "_" + getFieldValueByName(attr.parentField(), data, DateUtil.ISO_EXPANDED_DATE_FORMAT), tempStr, attr,rowNum,errorTemp);
}
}
}
if (StringUtils.isEmpty(tempStr) && (attr.isArea() || attr.isDataId())) {
if (attr.isOrgan()) {
errorMessageHashMap = initErrorMessage(errorMessageHashMap, new ErrorMessage(rowNum, "未找到:" + c + "的单位或项目数据,请确认存在项目权限"), errorTemp);
errorMessageHashMap = initErrorMessage(errorMessageHashMap, new ErrorMessage(rowNum, attr.name()+"未找到:" + c + "的单位或项目数据,请确认存在项目权限"), errorTemp);
}
if (attr.isArea()) {
errorMessageHashMap = initErrorMessage(errorMessageHashMap, new ErrorMessage(rowNum, "未找到:" + c + "的区域数据"), errorTemp);
errorMessageHashMap = initErrorMessage(errorMessageHashMap, new ErrorMessage(rowNum, attr.name()+"未找到:" + c + "的区域数据"), errorTemp);
} else {
if (Common.isNotNull(attr.errorInfoImport())) {
errorMessageHashMap = initErrorMessage(errorMessageHashMap, new ErrorMessage(rowNum, "数据'" + c + "':" + attr.errorInfoImport()), errorTemp);
} else {
errorMessageHashMap = initErrorMessage(errorMessageHashMap, new ErrorMessage(rowNum, "未找到:" + c + "的字典数据"), errorTemp);
errorMessageHashMap = initErrorMessage(errorMessageHashMap, new ErrorMessage(rowNum, attr.name()+"未找到:" + c + "的字典数据"), errorTemp);
}
}
continue;
......
......@@ -83,4 +83,6 @@ public interface SysBaseSetInfoService extends IService<SysBaseSetInfo> {
R<List<ErrorMessage>> importFundDiy(InputStream inputStream);
void listFundExport(HttpServletResponse response, SysBaseSetInfo searchVo);
void updateAreaCode(String name, String province, String city, String town, String type);
}
......@@ -75,7 +75,7 @@ import java.util.regex.Pattern;
@EnableConfigurationProperties(DaprCheckProperties.class)
public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMapper, SysHouseHoldInfo> implements SysHouseHoldInfoService {
private final SysBaseSetInfoMapper baseSetInfoMapper;
private final SysBaseSetInfoService baseSetInfoService;
private final TSocialLogService tSocialLogService;
......@@ -473,7 +473,7 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
}
}
if (CommonConstants.ONE_STRING.equals(hold.getDelFlag())
&& baseSetInfoMapper.selectCount(Wrappers.<SysBaseSetInfo>query().lambda()
&& baseSetInfoService.count(Wrappers.<SysBaseSetInfo>query().lambda()
.eq(SysBaseSetInfo::getBaseType, holdInfo.getType())
.le(SysBaseSetInfo::getApplyStartDate, DateUtil.getCurrentDateTime())
.in(SysBaseSetInfo::getDepartId,holdInfo.getId())
......@@ -543,6 +543,13 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
if (Common.isEmpty(hold.getCity()) && Common.isEmpty(holdInfo.getCity())) {
holdInfo.setCity(hold.getCity());
}
// 判断户的省市县是否有变更,有变更赋值给标识字段 changeFlag = true 否则 changeFlag = false
boolean changeFlag = false;
if (!holdInfo.getProvince().equals(hold.getProvince())
|| !holdInfo.getCity().equals(hold.getCity())
|| !holdInfo.getTown().equals(hold.getTown())){
changeFlag = true;
}
// 记录变更日志
tSocialLogService.saveModificationRecord(CommonConstants.FOUR_INT, holdInfo.getId(), holdInfo, hold);
if (isEdit) {
......@@ -557,6 +564,10 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
this.saveAuditUserOrHandleUser(hold, CommonConstants.ZERO_STRING);
this.saveAuditUserOrHandleUser(hold, CommonConstants.ONE_STRING);
}
// 区域变更同步户对应的基数配置的区域
if (changeFlag){
baseSetInfoService.updateAreaCode(hold.getName(), hold.getProvince(), hold.getCity(), hold.getTown(),hold.getType());
}
return R.ok();
}else {
return R.failed(CommonConstants.SAVE_FAILED);
......@@ -1514,9 +1525,25 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
oldInfo.setDataFlagYsd(info.getDataFlagYsd());
oldInfo.setIsSingleYsdPush(info.getIsSingleYsdPush());
}
if (Common.isEmpty(oldInfo.getTown()) && Common.isEmpty(info.getTown())) {
oldInfo.setTown(info.getTown());
}
if (Common.isEmpty(oldInfo.getCity()) && Common.isEmpty(info.getCity())) {
oldInfo.setCity(info.getCity());
}
//判断户的省市县是否一致,不一致,则更新对应户基数配置的区域信息
boolean changeFlag = false;
if (!oldInfo.getProvince().equals(info.getProvince())
|| !oldInfo.getCity().equals(info.getCity())
|| !oldInfo.getTown().equals(info.getTown())){
changeFlag = true;
}
// 记录变更日志
tSocialLogService.saveModificationRecord(CommonConstants.FOUR_INT, oldInfo.getId(), oldInfo, info);
baseMapper.updateById(info);
if (changeFlag){
baseSetInfoService.updateAreaCode(info.getName(), info.getProvince(), info.getCity(), info.getTown(),info.getType());
}
}
//获取所有区域数据
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment