Commit 9c6b6a3d authored by fangxinjiang's avatar fangxinjiang

权限配置页面

parent d59103f9
......@@ -108,12 +108,22 @@ public class TEmployeeContractAreaResController {
@PostMapping
@PreAuthorize("@pms.hasPermission('temployeecontractareares_add')")
public R<Boolean> save(@RequestBody TEmployeeContractAreaRes areaRes) {
TEmployeeContractAreaRes res = tEmployeeContractAreaResService.getOne(Wrappers.<TEmployeeContractAreaRes>query().lambda()
.eq(TEmployeeContractAreaRes::getFileProvince,areaRes.getFileProvince())
.eq(TEmployeeContractAreaRes::getFileCity,areaRes.getFileCity())
.eq(TEmployeeContractAreaRes::getFileTown,areaRes.getFileTown())
.eq(TEmployeeContractAreaRes::getUserId,areaRes.getUserId())
.last(CommonConstants.LAST_ONE_SQL));
TEmployeeContractAreaRes res = null;
if (Common.isEmpty(areaRes.getFileTown())){
res = tEmployeeContractAreaResService.getOne(Wrappers.<TEmployeeContractAreaRes>query().lambda()
.eq(TEmployeeContractAreaRes::getFileProvince,areaRes.getFileProvince())
.eq(TEmployeeContractAreaRes::getFileCity,areaRes.getFileCity())
.isNull(TEmployeeContractAreaRes::getFileTown)
.eq(TEmployeeContractAreaRes::getUserId,areaRes.getUserId())
.last(CommonConstants.LAST_ONE_SQL));
}
if (Common.isEmpty(areaRes.getFileCity())){
res = tEmployeeContractAreaResService.getOne(Wrappers.<TEmployeeContractAreaRes>query().lambda()
.eq(TEmployeeContractAreaRes::getFileProvince,areaRes.getFileProvince())
.isNull(TEmployeeContractAreaRes::getFileCity)
.eq(TEmployeeContractAreaRes::getUserId,areaRes.getUserId())
.last(CommonConstants.LAST_ONE_SQL));
}
if (Common.isNotNull(res)){
return R.failed("已存在对应审核人及地市配置!");
}
......
......@@ -1100,6 +1100,9 @@ public class ExcelUtil <T> implements Serializable {
field.set(vo, Common.isNotNull(value)?value:field.get(vo));
}catch (Exception e){
log.error("字典数据解析异常");
}finally {
fields.clear();
allField.clear();
}
}
}
......
......@@ -107,11 +107,20 @@ public class TInsuranceAreaResController {
@PostMapping
@PreAuthorize("@pms.hasPermission('tinsuranceareares_add')")
public R<Boolean> save(@RequestBody TInsuranceAreaRes areaRes) {
TInsuranceAreaRes res = tInsuranceAreaResService.getOne(Wrappers.<TInsuranceAreaRes>query().lambda()
.eq(TInsuranceAreaRes::getProvince,areaRes.getProvince())
.eq(TInsuranceAreaRes::getCity,areaRes.getCity())
.eq(TInsuranceAreaRes::getUserId,areaRes.getUserId())
.last(CommonConstants.LAST_ONE_SQL));
TInsuranceAreaRes res = null;
if (Common.isEmpty(areaRes.getCity())){
res = tInsuranceAreaResService.getOne(Wrappers.<TInsuranceAreaRes>query().lambda()
.eq(TInsuranceAreaRes::getProvince,areaRes.getProvince())
.isNull(TInsuranceAreaRes::getCity)
.eq(TInsuranceAreaRes::getUserId,areaRes.getUserId())
.last(CommonConstants.LAST_ONE_SQL));
}else {
res = tInsuranceAreaResService.getOne(Wrappers.<TInsuranceAreaRes>query().lambda()
.eq(TInsuranceAreaRes::getProvince,areaRes.getProvince())
.eq(TInsuranceAreaRes::getCity,areaRes.getCity())
.eq(TInsuranceAreaRes::getUserId,areaRes.getUserId())
.last(CommonConstants.LAST_ONE_SQL));
}
if (Common.isNotNull(res)){
return R.failed("已存在对应审核人及地市配置!");
}
......
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