Commit c701442a authored by hongguangwu's avatar hongguangwu

导入区域字典

parent c525acbe
...@@ -693,15 +693,8 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T ...@@ -693,15 +693,8 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
} }
if (!phoneList.isEmpty()) { if (!phoneList.isEmpty()) {
List<TEmployeeInfo> phones = baseMapper.getListByPhone(phoneList); List<TEmployeeInfo> phones = baseMapper.getListByPhone(phoneList);
if (phones != null && !phones.isEmpty()) { for (TEmployeeInfo employeeInfo : phones) {
Long l=2L; existPhoneMap.put(employeeInfo.getEmpPhone(), employeeInfo);
for (TEmployeeInfo employeeInfo : phones) {
errorMsg = new HashSet<>();
existPhoneMap.put(employeeInfo.getEmpPhone(), employeeInfo);
errorMsg.add("手机号:" + employeeInfo.getEmpPhone() + "已被使用!");
errorMsgMap.put(l, new ErrorMessage("第" + l + "行手机号:" + employeeInfo.getEmpPhone() + "已被使用!"));
l++;
}
} }
} }
...@@ -744,13 +737,15 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T ...@@ -744,13 +737,15 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
} }
// 调用区域服务,渲染区域值 // 调用区域服务,渲染区域值
R<Map<String, String>> areaR = HttpDaprUtil.invokeMethodPost(daprUpmsProperties.getAppUrl(), daprUpmsProperties.getAppId() R<Map<String,Map<String, String>>> areaR = HttpDaprUtil.invokeMethodPost(daprUpmsProperties.getAppUrl(), daprUpmsProperties.getAppId()
, "/area/inner/getAreaToName", null, Map.class, SecurityConstants.FROM_IN); , "/area/inner/getAreaToName", null, Map.class, SecurityConstants.FROM_IN);
Map<String,Map<String, String>> areaMapR;
Map<String, String> areaMap; Map<String, String> areaMap;
if (areaR == null) { if (areaR == null) {
return R.failed("获取区域失败!"); return R.failed("获取区域失败!");
} else { } else {
areaMap = areaR.getData(); areaMapR = areaR.getData();
areaMap = areaMapR.get("data");
} }
TEmployeeInfo checkPhone; TEmployeeInfo checkPhone;
...@@ -831,7 +826,6 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T ...@@ -831,7 +826,6 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
} }
} }
// 校验字典数据是否正确-婚姻 // 校验字典数据是否正确-婚姻
if (Common.isNotNull(excel.getEmpMarriStatus())) { if (Common.isNotNull(excel.getEmpMarriStatus())) {
if (empMarriMap.get(excel.getEmpMarriStatus()) == null) { if (empMarriMap.get(excel.getEmpMarriStatus()) == null) {
......
...@@ -21,7 +21,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.R; ...@@ -21,7 +21,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner; import com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
...@@ -50,7 +50,7 @@ public class AreaController { ...@@ -50,7 +50,7 @@ public class AreaController {
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.util.Map < java.lang.Integer, java.lang.String>> * @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.util.Map < java.lang.Integer, java.lang.String>>
**/ **/
@Inner @Inner
@GetMapping("/inner/getAreaToId") @PostMapping("/inner/getAreaToId")
public R<Map<String, String>> getAreaToId() { public R<Map<String, String>> getAreaToId() {
return sysAreaService.getAreaToId(); return sysAreaService.getAreaToId();
} }
...@@ -63,7 +63,7 @@ public class AreaController { ...@@ -63,7 +63,7 @@ public class AreaController {
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.util.Map < java.lang.String, java.util.Map < java.lang.String, java.lang.String>>> * @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.util.Map < java.lang.String, java.util.Map < java.lang.String, java.lang.String>>>
**/ **/
@Inner @Inner
@GetMapping("/inner/getAreaToName") @PostMapping("/inner/getAreaToName")
public R<Map<String, String>> getAreaToName() { public R<Map<String, String>> getAreaToName() {
return sysAreaService.getAreaToName(); return sysAreaService.getAreaToName();
} }
......
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