添加orgId

This commit is contained in:
YY
2025-07-21 16:25:39 +08:00
parent 1d6d19dd5f
commit 298758d6f1
17 changed files with 102 additions and 23 deletions

View File

@ -56,6 +56,10 @@ public class CoscoAnnualreviewTemplate extends BaseEntity {
* 是否启用(0.草稿、1.启用、2.禁用)
*/
private Long status;
/**
* 单位id
*/
private String orgId;
/**
* 删除标识(normal.正常、deleted.已删除)

View File

@ -81,6 +81,7 @@ public class CoscoAnnualreviewTemplateServiceImpl implements ICoscoAnnualreviewT
BaseCacheUser currentUser = TokenUtil.getCurrentUser();
Date date = new Date();
coscoAnnualreviewTemplate.setCreateTime(date);
coscoAnnualreviewTemplate.setOrgId(currentUser.getOrganizationId());
coscoAnnualreviewTemplate.setUpdateTime(date);
coscoAnnualreviewTemplate.setUpdateBy(currentUser.getUserId());
coscoAnnualreviewTemplate.setId(PropertyUtils.getSnowflakeId());

View File

@ -56,9 +56,15 @@ public class CoscoBlacklist extends BaseEntity {
* 恢复审批工作流id
*/
private String restoreWorkFlowId;
/**
* 单位id
*/
private String orgId;
private Date createTime;
private Date updateTime;
private String remark;
}

View File

@ -101,6 +101,7 @@ public class CoscoBlacklistServiceImpl implements ICoscoBlacklistService {
public int insertCoscoBlacklist(AddBlackListVo listVo) {
BaseCacheUser currentUser = TokenUtil.getCurrentUser();
listVo.setCreateTime(new Date());
listVo.setOrgId(currentUser.getOrganizationId());
listVo.setCreateBy(currentUser.getUserId());
listVo.setLastUpdateTime(LocalDateTime.now());
listVo.setDelFlag(CoscoCategoryConstant.DELETE_FLAG_YES);

View File

@ -51,6 +51,10 @@ public class BlackListVo implements Serializable {
private String themeName;
private String deptId;
/**
* 单位id
*/
private String orgId;
@ApiModelProperty(value = "分页对象信息")
private BasePageRequest basePageRequest;

View File

@ -25,6 +25,10 @@ public class BlackSupplierVo implements Serializable {
* 社会信用代码
*/
private String socialCreditCode;
/**
* 社会信用代码
*/
private String unifiedCode;
/**
* 部门名称
*/

View File

@ -55,5 +55,6 @@ public class CoscoCategoryLibrary extends BaseEntity {
private LocalDateTime createTime;
private LocalDateTime updateTime;
private String orgId;
}

View File

@ -89,6 +89,7 @@ public class CoscoCategoryLibraryServiceImpl extends BaseServiceImpl<CoscoCatego
BaseCacheUser currentUser = TokenUtil.getCurrentUser();
coscoCategoryLibrary.setCreateTime(LocalDateTime.now());
coscoCategoryLibrary.setCreateBy(currentUser.getUserId());
coscoCategoryLibrary.setOrgId(currentUser.getOrganizationId());
coscoCategoryLibrary.setDelFlag(CoscoCategoryConstant.DELETE_FLAG_YES);
coscoCategoryLibrary.setApplyDeptId(currentUser.getOrganizationId());
coscoCategoryLibrary.setId(PropertyUtils.getSnowflakeId());

View File

@ -87,4 +87,6 @@ public class CoscoCategoryLibraryVo implements Serializable {
* 申请建库部门id
*/
private String applyDeptId;
private String orgId;
}

View File

@ -62,4 +62,9 @@ public class CoscoEvaluateTemplate extends BaseEntity {
private String categoryName;
private String copyTemplateName;
/**
* 单位id
*/
private String orgId;
}

View File

@ -92,6 +92,7 @@ public class CoscoEvaluateTemplateServiceImpl implements ICoscoEvaluateTemplateS
Date date = new Date();
BaseCacheUser currentUser = TokenUtil.getCurrentUser();
templateVo.setCreateTime(date);
templateVo.setOrgId(currentUser.getOrganizationId());
templateVo.setId(PropertyUtils.getSnowflakeId());
templateVo.setUpdateTime(date);
templateVo.setCreateBy(currentUser.getUserId());

View File

@ -22,6 +22,10 @@ public class CoscoEvaluateTemplateVo implements Serializable {
* 品类id
*/
private String categoryId;
/**
* 单位id
*/
private String orgId;
/**
* 创建单位
*/

View File

@ -20,12 +20,14 @@
<result property="updateTime" column="update_time"/>
<result property="categoryName" column="category_name"/>
<result property="lastUpdateTime" column="last_update_time"/>
<result property="orgId" column="org_id"/>
</resultMap>
<sql id="selectCoscoAnnualreviewTemplateVo">
select cat.id,
cat.template_name,
cat.template_type,
cat.org_id,
cat.copy_template_id,
cat.category_limitation,
cat.category_id,
@ -68,6 +70,9 @@
<if test="vo.lastUpdateTime != null ">
and cat.last_update_time = #{vo.lastUpdateTime}
</if>
<if test="vo.orgId != null ">
and cat.org_id = #{vo.orgId}
</if>
</where>
order by cat.create_time desc
</select>
@ -100,6 +105,9 @@
<if test="lastUpdateTime != null ">
and cat.last_update_time = #{lastUpdateTime}
</if>
<if test="orgId != null ">
and cat.org_id = #{orgId}
</if>
</where>
</select>
@ -126,6 +134,7 @@
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="lastUpdateTime != null">last_update_time,</if>
<if test="orgId != null">org_id,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
@ -141,6 +150,7 @@
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="lastUpdateTime != null">#{lastUpdateTime},</if>
<if test="orgId != null">#{orgId},</if>
</trim>
</insert>
<insert id="batchCoscoAnnualreviewTemplate" parameterType="java.util.List">

View File

@ -22,6 +22,7 @@
<result property="endTime" column="end_time"/>
<result property="restoreApproveStatus" column="restore_approve_status"/>
<result property="restoreWorkFlowId" column="restore_work_flow_id"/>
<result property="orgId" column="org_id"/>
</resultMap>
<sql id="selectCoscoBlacklistVo">
@ -29,6 +30,7 @@
timelimit_type,
start_time,
end_time,
org_id,
restore_approve_status,
restore_work_flow_id,
blacklist_reason,
@ -68,6 +70,9 @@
<if test="lastUpdateTime != null ">
and last_update_time = #{lastUpdateTime}
</if>
<if test="orgId != null ">
and org_id = #{orgId}
</if>
</where>
</select>
@ -104,6 +109,7 @@
<if test="endTime != null">end_time,</if>
<if test="restoreApproveStatus != null">restore_approve_status,</if>
<if test="restoreWorkFlowId != null">restore_work_flow_id,</if>
<if test="orgId != null">org_id,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
@ -123,6 +129,7 @@
<if test="endTime != null">#{endTime},</if>
<if test="restoreApproveStatus != null">#{restoreApproveStatus},</if>
<if test="restoreWorkFlowId != null">#{restoreWorkFlowId},</if>
<if test="orgId != null">#{orgId},</if>
</trim>
</insert>
<insert id="batchCoscoBlacklist" parameterType="java.util.List">
@ -210,26 +217,30 @@
<select id="selectPage" resultType="com.chinaunicom.zyhy.ebtp.supplier.coscoBlack.vo.BlackListVo"
parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscoBlack.vo.BlackListVo">
SELECT cb.id,
'发起部门' AS deptName,
'发起单位' as unitName,
cb.create_time as createTime,
cb.dept_id AS deptId,
cb.approve_status as approveStatus,
cb.restore_approve_status as restoreApproveStatus,
case
when cb.approve_status is null then '未开始'
when cb.approve_status = 0 then '进行中'
else '已结束' end as approveStatusName,
concat((select csb.name
from cosco_blacklist_supplier cbs
join cosco_supplier_base csb on cbs.supplier_id = csb.id
where cbs.blacklist_id = cb.id limit 1) ,'等',
(case when cb.backlist_type = 0 then '黑名单申请'
else '灰名单申请' end )
)
as themeName
'发起部门' AS deptName,
'发起单位' as unitName,
cb.create_time as createTime,
cb.dept_id AS deptId,
cb.org_id as orgId,
cb.approve_status as approveStatus,
cb.restore_approve_status as restoreApproveStatus,
case
when cb.approve_status is null then '未开始'
when cb.approve_status = 0 then '进行中'
else '已结束' end as approveStatusName,
concat((select csb.name
from cosco_blacklist_supplier cbs
join cosco_supplier_base csb on cbs.supplier_id = csb.id
where cbs.blacklist_id = cb.id limit 1) ,'等',
(case when cb.backlist_type = 0 then '黑名单申请'
else '灰名单申请' end )
)
as themeName
FROM cosco_blacklist cb
where cb.del_flag = 'normal'
<if test="orgId!=null">
and cb.org_id = #{orgId}
</if>
order by cb.create_time desc
</select>

View File

@ -22,6 +22,7 @@
<result property="remark" column="remark"/>
<result property="approveType" column="approve_type"/>
<result property="applyDeptId" column="apply_dept_id"/>
<result property="orgId" column="org_id"/>
</resultMap>
<sql id="selectCoscoCategoryLibraryVo">
@ -29,6 +30,7 @@
name,
apply_dept_id,
approve_type,
org_id,
term_of_validity,
remark,
dept_id,
@ -70,6 +72,10 @@
<if test="lastUpdateTime != null ">
and last_update_time = #{lastUpdateTime}
</if>
<if test="orgId != null ">
and org_id = #{orgId}
</if>
</where>
</select>
@ -98,6 +104,7 @@
<if test="lastUpdateTime != null">last_update_time,</if>
<if test="approveType != null">approve_type,</if>
<if test="applyDeptId != null">apply_dept_id,</if>
<if test="orgId != null">org_id,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
@ -115,6 +122,8 @@
<if test="lastUpdateTime != null">#{lastUpdateTime},</if>
<if test="approveType != null">#{approveType},</if>
<if test="applyDeptId != null">#{applyDeptId},</if>
<if test="orgId != null">#{orgId},</if>
</trim>
</insert>
<insert id="batchCoscoCategoryLibrary" parameterType="java.util.List">
@ -256,6 +265,9 @@
<if test="vo.startTime!=null and vo.endTime!=null">
AND ccl.create_time between #{vo.startTime} and #{vo.endTime}
</if>
<if test="vo.orgId!=null and vo.orgId!=null">
AND ccl.org_id = #{vo.orgId}
</if>
</where>
GROUP BY
ccl.id

View File

@ -23,16 +23,15 @@
<result property="indicatorStMore" column="indicator_st_more"/>
<result property="indicatorNdMore" column="indicator_nd_more"/>
<result property="copyTemplateName" column="copy_template_name"/>
<result property="categoryName" column="category_name"/>
<result property="orgId" column="org_id"/>
</resultMap>
<sql id="selectCoscoEvaluateTemplateVo">
select id,
template_name,
template_type,
org_id,
copy_template_id,
category_limitation,
category_id,
@ -57,6 +56,7 @@
"单位" as tenantName,
"部门" as deptName,
cet.create_time as createTime,
cet.org_id as orgId,
cet.status ,
cet.create_by as createBy,
case status
@ -105,6 +105,9 @@
<if test="lastUpdateTime != null ">
and last_update_time = #{lastUpdateTime}
</if>
<if test="orgId != null ">
and org_id = #{orgId}
</if>
</where>
</select>
@ -153,7 +156,7 @@
<if test="lastUpdateTime != null">last_update_time,</if>
<if test="indicatorTypeMore != null">indicator_type_more,</if>
<if test="indicatorStMore != null">indicator_st_more,</if>
<if test="indicatorNdMore != null">indicator_nd_more,</if>
<if test="orgId != null">org_id,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
@ -172,6 +175,7 @@
<if test="indicatorTypeMore != null">#{indicatorTypeMore},</if>
<if test="indicatorStMore != null">#{indicatorStMore},</if>
<if test="indicatorNdMore != null">#{indicatorNdMore},</if>
<if test="orgId != null">#{orgId},</if>
</trim>
</insert>
<insert id="batchCoscoEvaluateTemplate" parameterType="java.util.List">

View File

@ -1028,8 +1028,16 @@
resultType="com.chinaunicom.zyhy.ebtp.supplier.coscoBlack.vo.BlackSupplierVo">
SELECT
csb.id AS supplierId,
csb.name AS supplierName,
CASE
WHEN csb.supplier_type = 'ovs' THEN
csb.name_en ELSE csb.name END AS supplierName,
csb.social_credit_code as socialCreditCode,
CASE
WHEN csb.supplier_type = 'dvs' THEN social_credit_code
WHEN csb.supplier_type = 'ovs' THEN vat
WHEN csb.supplier_type = 'pe' THEN id_card
ELSE NULL
END AS unifiedCode,
'准入部门' AS deptName,
category_info.categoryName AS categoryName,
work_time.createTime AS createTime,