fixed:新增校验统一社会信用代码是否重复接口;人员资质证书列表新增返回参数
parent
ff5cbfb094
commit
926a1fc891
|
|
@ -40,6 +40,16 @@ public class CorpInfoController {
|
|||
return corpInfoService.add(cmd);
|
||||
}
|
||||
|
||||
@ApiOperation("判断统一社会信用代码是否重复, true:没重复, false:有重复")
|
||||
@PostMapping("/checkCorpCode")
|
||||
public SingleResponse<Object> checkCorpCode(@Validated @RequestBody CorpInfoCheckCodeQry qry) {
|
||||
if(corpInfoService.checkCorpCode(qry)){
|
||||
return SingleResponse.of(true);
|
||||
}else {
|
||||
return SingleResponse.of(false);
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation("分页")
|
||||
@PostMapping("/list")
|
||||
public PageResponse<CorpInfoCO> page(@Validated @RequestBody CorpInfoPageQry qry) {
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import com.zcloud.basic.info.domain.model.CorpDepartmentE;
|
|||
import com.zcloud.basic.info.domain.model.CorpInfoE;
|
||||
import com.zcloud.basic.info.domain.model.DepartmentE;
|
||||
import com.zcloud.basic.info.dto.CorpDepartmentQry;
|
||||
import com.zcloud.basic.info.dto.CorpInfoCheckCodeQry;
|
||||
import com.zcloud.basic.info.dto.CorpInfoPageQry;
|
||||
import com.zcloud.basic.info.dto.CorpUserMiddleQry;
|
||||
import com.zcloud.basic.info.dto.clientobject.CorpDepartmentCO;
|
||||
|
|
@ -67,6 +68,21 @@ public class CorpInfoQueryExe {
|
|||
return corpInfoCO;
|
||||
}
|
||||
|
||||
public Boolean execute(CorpInfoCheckCodeQry qry) {
|
||||
List<CorpInfoDO> list = new ArrayList<>();
|
||||
if(qry.getId() != null && qry.getId() > 0L){
|
||||
list = corpInfoRepository.getCorpinfoByCodeAndId(qry.getCode(), qry.getId());
|
||||
}else {
|
||||
list = corpInfoRepository.getCorpinfoByCode(qry.getCode());
|
||||
}
|
||||
|
||||
if(CollUtil.isEmpty(list)){
|
||||
return true;
|
||||
}else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public PageResponse<CorpDepartmentCO> corpDepartlist(CorpDepartmentQry corpDepartmentQry) {
|
||||
Map<String, Object> parmas = PageQueryHelper.toHashMap(corpDepartmentQry);
|
||||
PageResponse<CorpInfoDO> pageResponse = corpInfoRepository.listPage(parmas);
|
||||
|
|
|
|||
|
|
@ -49,6 +49,11 @@ public class CorpInfoServiceImpl implements CorpInfoServiceI {
|
|||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean checkCorpCode(CorpInfoCheckCodeQry qry) {
|
||||
return corpInfoQueryExe.execute(qry);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void edit(CorpInfoUpdateCmd corpInfoUpdateCmd) {
|
||||
corpInfoUpdateExe.execute(corpInfoUpdateCmd);
|
||||
|
|
|
|||
|
|
@ -21,6 +21,8 @@ public interface CorpInfoServiceI {
|
|||
|
||||
SingleResponse<CorpInfoCO> add(CorpInfoAddCmd cmd);
|
||||
|
||||
Boolean checkCorpCode(CorpInfoCheckCodeQry qry);
|
||||
|
||||
void edit(CorpInfoUpdateCmd cmd);
|
||||
|
||||
void remove(Long id);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,42 @@
|
|||
package com.zcloud.basic.info.dto;
|
||||
|
||||
import com.alibaba.cola.dto.PageQuery;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
|
||||
|
||||
/**
|
||||
* web-client
|
||||
*
|
||||
* @Author zhaokai
|
||||
* @Date 2025-10-30 15:12:50
|
||||
*/
|
||||
@Data
|
||||
public class CorpInfoCheckCodeQry extends PageQuery {
|
||||
|
||||
/**
|
||||
* 查询条件操作前缀,支持以下几种数据库查询操作:
|
||||
* - `like`: 模糊匹配查询,对应SQL的LIKE操作符
|
||||
* - `eq`: 等值查询,对应SQL的=操作符
|
||||
* - `gt`: 大于比较查询
|
||||
* - `lt`: 小于比较查询
|
||||
* - `ge`: 大于等于比较查询
|
||||
* - `le`: 小于等于比较查询
|
||||
* - `ne`: 不等比较查询,对应SQL的!=操作符
|
||||
*/
|
||||
|
||||
|
||||
@ApiModelProperty(value = "企业id", name = "id")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "统一社会信用代码", name = "code", required = true)
|
||||
@NotEmpty(message = "统一社会信用代码不能为空")
|
||||
private String code;
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -2,7 +2,6 @@ package com.zcloud.basic.info.domain.model;
|
|||
|
||||
import com.jjb.saas.framework.domain.model.BaseE;
|
||||
import com.zcloud.gbscommon.utils.*;
|
||||
import com.zcloud.basic.info.domain.utils.Smb;
|
||||
import lombok.Data;
|
||||
import org.apache.commons.beanutils.BeanUtils;
|
||||
import org.springframework.util.ObjectUtils;
|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* web-infrastructure
|
||||
* @Author SondonYong
|
||||
|
|
@ -18,5 +20,7 @@ public interface UserQualificationInfoMapper extends BaseMapper<UserQualificatio
|
|||
|
||||
IPage<UserQualificationInfoDO> selectQualificationInfoPage(IPage<UserQualificationInfoDO> page, @Param("ew") QueryWrapper<UserQualificationInfoDO> queryWrapper);
|
||||
|
||||
List<UserQualificationInfoDO> selectQualificationInfoList(@Param("ew") QueryWrapper<UserQualificationInfoDO> queryWrapper);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -52,9 +52,10 @@ public class UserQualificationInfoRepositoryImpl extends BaseRepositoryImpl<User
|
|||
params.put("eqCorpinfoId", AuthContext.getTenantId());
|
||||
}
|
||||
QueryWrapper<UserQualificationInfoDO> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper = PageQueryHelper.createPageQueryWrapper(queryWrapper, params);
|
||||
queryWrapper.orderByDesc("create_time");
|
||||
List<UserQualificationInfoDO> result = userQualificationInfoMapper.selectList(queryWrapper);
|
||||
queryWrapper = PageQueryHelper.createPageQueryWrapper(queryWrapper, params, "a.");
|
||||
queryWrapper.eq("a.delete_enum", "FALSE");
|
||||
queryWrapper.orderByDesc("a.create_time");
|
||||
List<UserQualificationInfoDO> result = userQualificationInfoMapper.selectQualificationInfoList(queryWrapper);
|
||||
return MultiResponse.of(result);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -41,5 +41,43 @@
|
|||
left join department d on u.department_id = d.id
|
||||
${ew.customSqlSegment}
|
||||
</select>
|
||||
|
||||
<select id="selectQualificationInfoList" resultType="com.zcloud.basic.info.persistence.dataobject.UserQualificationInfoDO">
|
||||
select
|
||||
a.id,
|
||||
a.user_qualificationinfo_id,
|
||||
a.corpinfo_id,
|
||||
a.user_id,
|
||||
a.qualification_name,
|
||||
a.certificate_no,
|
||||
a.qualificationinfo_type,
|
||||
a.qualificationinfo_category,
|
||||
a.qualificationinfo_category_name,
|
||||
a.operating_project,
|
||||
a.operating_project_name,
|
||||
a.delete_enum,
|
||||
a.tenant_id,
|
||||
a.org_id,
|
||||
a.version,
|
||||
a.create_time,
|
||||
a.update_time,
|
||||
a.create_id,
|
||||
a.update_id,
|
||||
a.create_name,
|
||||
a.update_name,
|
||||
a.remarks,
|
||||
a.env,
|
||||
u.name as userName,
|
||||
case
|
||||
when u.employment_flag = '1' then '在职'
|
||||
when u.employment_flag = '0' then '离职'
|
||||
else '离职'
|
||||
end as employmentFlagName,
|
||||
d.name as departmentName
|
||||
from user_qualification_info a
|
||||
left join user u on a.user_id = u.id
|
||||
left join department d on u.department_id = d.id
|
||||
${ew.customSqlSegment}
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue