添加品类全id

This commit is contained in:
YY
2025-08-01 10:09:23 +08:00
parent 2c23823800
commit 543bcd5ee4
16 changed files with 63 additions and 14 deletions

View File

@ -68,5 +68,9 @@ public class CoscoAnnualreviewTask extends BaseEntity{
* 模板名称 * 模板名称
*/ */
private String templateName; private String templateName;
/**
* 品类全id
*/
private String categoryPathId;
} }

View File

@ -81,6 +81,10 @@ public class CoscoAnnualreviewTemplate extends BaseEntity {
* 品类全名 * 品类全名
*/ */
private String categoryPathName; private String categoryPathName;
/**
* 品类全id
*/
private String categoryPathId;
@ApiModelProperty(value = "分页对象信息") @ApiModelProperty(value = "分页对象信息")

View File

@ -179,6 +179,7 @@ public class CoscoAnnualreviewTaskServiceImpl implements ICoscoAnnualreviewTaskS
CoscoCategoryMaintenance category = coscoCategoryService.getCategoryNameById(taskVo.getCategoryId()); CoscoCategoryMaintenance category = coscoCategoryService.getCategoryNameById(taskVo.getCategoryId());
taskVo.setCategoryName(category.getCategoryName()); taskVo.setCategoryName(category.getCategoryName());
taskVo.setCategoryPathName(category.getPathName()); taskVo.setCategoryPathName(category.getPathName());
taskVo.setCategoryPathId(category.getPath());
} }
taskVo.setStatus(AnnualreviewTaskConstant.NOT_START); taskVo.setStatus(AnnualreviewTaskConstant.NOT_START);
coscoAnnualreviewTaskMapper.insertCoscoAnnualreviewTask(taskVo); coscoAnnualreviewTaskMapper.insertCoscoAnnualreviewTask(taskVo);
@ -260,6 +261,7 @@ public class CoscoAnnualreviewTaskServiceImpl implements ICoscoAnnualreviewTaskS
CoscoCategoryMaintenance category = coscoCategoryService.getCategoryNameById(taskVo.getCategoryId()); CoscoCategoryMaintenance category = coscoCategoryService.getCategoryNameById(taskVo.getCategoryId());
taskVo.setCategoryName(category.getCategoryName()); taskVo.setCategoryName(category.getCategoryName());
taskVo.setCategoryPathName(category.getPathName()); taskVo.setCategoryPathName(category.getPathName());
taskVo.setCategoryPathId(category.getPath());
} }
coscoAnnualreviewTaskMapper.updateCoscoAnnualreviewTask(taskVo); coscoAnnualreviewTaskMapper.updateCoscoAnnualreviewTask(taskVo);
addList(taskVo); addList(taskVo);

View File

@ -95,6 +95,7 @@ public class CoscoAnnualreviewTemplateServiceImpl implements ICoscoAnnualreviewT
CoscoCategoryMaintenance category = coscoCategoryService.getCategoryNameById(coscoAnnualreviewTemplate.getCategoryId()); CoscoCategoryMaintenance category = coscoCategoryService.getCategoryNameById(coscoAnnualreviewTemplate.getCategoryId());
coscoAnnualreviewTemplate.setCategoryName(category.getCategoryName()); coscoAnnualreviewTemplate.setCategoryName(category.getCategoryName());
coscoAnnualreviewTemplate.setCategoryPathName(category.getPathName()); coscoAnnualreviewTemplate.setCategoryPathName(category.getPathName());
coscoAnnualreviewTemplate.setCategoryPathId(category.getPath());
} }
coscoAnnualreviewTemplateMapper.insertCoscoAnnualreviewTemplate(coscoAnnualreviewTemplate); coscoAnnualreviewTemplateMapper.insertCoscoAnnualreviewTemplate(coscoAnnualreviewTemplate);
coscoAnnualreviewTemplateIndicatorService.batchInsertCoscoAnnualreviewTemplateIndicator(coscoAnnualreviewTemplate); coscoAnnualreviewTemplateIndicatorService.batchInsertCoscoAnnualreviewTemplateIndicator(coscoAnnualreviewTemplate);
@ -116,6 +117,7 @@ public class CoscoAnnualreviewTemplateServiceImpl implements ICoscoAnnualreviewT
CoscoCategoryMaintenance category = coscoCategoryService.getCategoryNameById(coscoAnnualreviewTemplate.getCategoryId()); CoscoCategoryMaintenance category = coscoCategoryService.getCategoryNameById(coscoAnnualreviewTemplate.getCategoryId());
coscoAnnualreviewTemplate.setCategoryName(category.getCategoryName()); coscoAnnualreviewTemplate.setCategoryName(category.getCategoryName());
coscoAnnualreviewTemplate.setCategoryPathName(category.getPathName()); coscoAnnualreviewTemplate.setCategoryPathName(category.getPathName());
coscoAnnualreviewTemplate.setCategoryPathId(category.getPath());
} }
coscoAnnualreviewTemplateMapper.updateCoscoAnnualreviewTemplate(coscoAnnualreviewTemplate); coscoAnnualreviewTemplateMapper.updateCoscoAnnualreviewTemplate(coscoAnnualreviewTemplate);
coscoAnnualreviewTemplateIndicatorService.batchInsertCoscoAnnualreviewTemplateIndicator(coscoAnnualreviewTemplate); coscoAnnualreviewTemplateIndicatorService.batchInsertCoscoAnnualreviewTemplateIndicator(coscoAnnualreviewTemplate);

View File

@ -35,6 +35,10 @@ public class CoscoCategoryLibraryContain extends BaseEntity {
* 品类全名 * 品类全名
*/ */
private String categoryPathName; private String categoryPathName;
/**
* 品类全id
*/
private String categoryPathId;
} }

View File

@ -107,6 +107,7 @@ public class CoscoCategoryLibraryContainServiceImpl extends BaseServiceImpl<Cosc
coscoCategoryLibraryContain.setCategoryId(categoryId.getId()); coscoCategoryLibraryContain.setCategoryId(categoryId.getId());
coscoCategoryLibraryContain.setCategoryPathName(categoryId.getCategoryPathName()); coscoCategoryLibraryContain.setCategoryPathName(categoryId.getCategoryPathName());
coscoCategoryLibraryContain.setLockType(categoryId.getLockType()); coscoCategoryLibraryContain.setLockType(categoryId.getLockType());
coscoCategoryLibraryContain.setCategoryPathId(categoryId.getCategoryPathId());
coscoCategoryLibraryContain.setCategoryName(categoryId.getCategoryName()); coscoCategoryLibraryContain.setCategoryName(categoryId.getCategoryName());
coscoCategoryLibraryContain.setCategoryType(categoryId.getCategoryType()); coscoCategoryLibraryContain.setCategoryType(categoryId.getCategoryType());
coscoCategoryLibraryContain.setDeptId(TokenUtil.getCurrentUser().getOrganizationId()); coscoCategoryLibraryContain.setDeptId(TokenUtil.getCurrentUser().getOrganizationId());

View File

@ -27,6 +27,10 @@ public class AddCategoryIdVo implements Serializable {
* 品类全名 * 品类全名
*/ */
private String categoryPathName; private String categoryPathName;
/**
* 品类全id
*/
private String categoryPathId;
} }

View File

@ -111,6 +111,10 @@ public class CoscoEvaluateTask extends BaseEntity {
* 品类路径名称 * 品类路径名称
*/ */
private String categoryPathName; private String categoryPathName;
/**
* 品类全路径id
*/
private String categoryPathId;
} }

View File

@ -73,4 +73,8 @@ public class CoscoEvaluateTemplate extends BaseEntity {
* 单位id * 单位id
*/ */
private String orgId; private String orgId;
/**
* 品类全名id
*/
private String categoryPathId;
} }

View File

@ -236,6 +236,7 @@ public class CoscoEvaluateTaskServiceImpl implements ICoscoEvaluateTaskService {
CoscoCategoryMaintenance category = coscoCategoryService.getCategoryNameById(coscoEvaluateTask.getCategoryId()); CoscoCategoryMaintenance category = coscoCategoryService.getCategoryNameById(coscoEvaluateTask.getCategoryId());
coscoEvaluateTask.setCategoryName(category.getCategoryName()); coscoEvaluateTask.setCategoryName(category.getCategoryName());
coscoEvaluateTask.setCategoryPathName(category.getPathName()); coscoEvaluateTask.setCategoryPathName(category.getPathName());
coscoEvaluateTask.setCategoryPathId(category.getPath());
} }
return coscoEvaluateTaskMapper.updateCoscoEvaluateTask(coscoEvaluateTask); return coscoEvaluateTaskMapper.updateCoscoEvaluateTask(coscoEvaluateTask);
} }
@ -554,6 +555,7 @@ public class CoscoEvaluateTaskServiceImpl implements ICoscoEvaluateTaskService {
addCoscoEvaluateTaskVo.setDeptId(currentUser.getOrganizationId()); addCoscoEvaluateTaskVo.setDeptId(currentUser.getOrganizationId());
if (addCoscoEvaluateTaskVo.getCategoryId() != null) { if (addCoscoEvaluateTaskVo.getCategoryId() != null) {
CoscoCategoryMaintenance category = coscoCategoryService.getCategoryNameById(addCoscoEvaluateTaskVo.getCategoryId()); CoscoCategoryMaintenance category = coscoCategoryService.getCategoryNameById(addCoscoEvaluateTaskVo.getCategoryId());
addCoscoEvaluateTaskVo.setCategoryPathId(category.getPath());
addCoscoEvaluateTaskVo.setCategoryName(category.getCategoryName()); addCoscoEvaluateTaskVo.setCategoryName(category.getCategoryName());
addCoscoEvaluateTaskVo.setCategoryPathName(category.getPathName()); addCoscoEvaluateTaskVo.setCategoryPathName(category.getPathName());

View File

@ -107,6 +107,7 @@ public class CoscoEvaluateTemplateServiceImpl implements ICoscoEvaluateTemplateS
CoscoCategoryMaintenance category = coscoCategoryService.getCategoryNameById(templateVo.getCategoryId()); CoscoCategoryMaintenance category = coscoCategoryService.getCategoryNameById(templateVo.getCategoryId());
templateVo.setCategoryName(category.getCategoryName()); templateVo.setCategoryName(category.getCategoryName());
templateVo.setCategoryPathName(category.getPathName()); templateVo.setCategoryPathName(category.getPathName());
templateVo.setCategoryPathId(category.getPath());
} }
coscoEvaluateTemplateMapper.insertCoscoEvaluateTemplate(templateVo); coscoEvaluateTemplateMapper.insertCoscoEvaluateTemplate(templateVo);
// 添加一级二级评价想信息 // 添加一级二级评价想信息
@ -129,6 +130,7 @@ public class CoscoEvaluateTemplateServiceImpl implements ICoscoEvaluateTemplateS
CoscoCategoryMaintenance category = coscoCategoryService.getCategoryNameById(templateVo.getCategoryId()); CoscoCategoryMaintenance category = coscoCategoryService.getCategoryNameById(templateVo.getCategoryId());
templateVo.setCategoryName(category.getCategoryName()); templateVo.setCategoryName(category.getCategoryName());
templateVo.setCategoryPathName(category.getPathName()); templateVo.setCategoryPathName(category.getPathName());
templateVo.setCategoryPathId(category.getPath());
} }
coscoEvaluateTemplateMapper.updateCoscoEvaluateTemplate(templateVo); coscoEvaluateTemplateMapper.updateCoscoEvaluateTemplate(templateVo);
/** /**

View File

@ -141,6 +141,7 @@
<if test="lastUpdateTime != null">last_update_time,</if> <if test="lastUpdateTime != null">last_update_time,</if>
<if test="categoryName != null">category_name,</if> <if test="categoryName != null">category_name,</if>
<if test="categoryPathName != null">category_path_name,</if> <if test="categoryPathName != null">category_path_name,</if>
<if test="categoryPathId != null">category_path_id,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if> <if test="id != null">#{id},</if>
@ -160,9 +161,9 @@
<if test="updateTime != null">#{updateTime},</if> <if test="updateTime != null">#{updateTime},</if>
<if test="lastUpdateTime != null">#{lastUpdateTime},</if> <if test="lastUpdateTime != null">#{lastUpdateTime},</if>
<if test="categoryName != null">#{categoryName},</if> <if test="categoryName != null">#{categoryName},</if>
<if test="categoryPathName != null"> <if test="categoryPathName != null">#{categoryPathName},</if>
#{categoryPathName}, <if test="categoryPathId != null">#{categoryPathId},</if>
</if>
</trim> </trim>
</insert> </insert>
<insert id="batchCoscoAnnualreviewTask" parameterType="java.util.List"> <insert id="batchCoscoAnnualreviewTask" parameterType="java.util.List">
@ -232,6 +233,9 @@
<if test="categoryPathName != null">category_path_name = <if test="categoryPathName != null">category_path_name =
#{categoryPathName}, #{categoryPathName},
</if> </if>
<if test="categoryPathId != null">category_path_id =
#{categoryPathId},
</if>
</trim> </trim>
where id = #{id} where id = #{id}
</update> </update>

View File

@ -140,6 +140,7 @@
<if test="orgId != null">org_id,</if> <if test="orgId != null">org_id,</if>
<if test="categoryName != null">category_name,</if> <if test="categoryName != null">category_name,</if>
<if test="categoryPathName != null">category_path_name,</if> <if test="categoryPathName != null">category_path_name,</if>
<if test="categoryPathId != null">category_path_id,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if> <if test="id != null">#{id},</if>
@ -158,6 +159,7 @@
<if test="orgId != null">#{orgId},</if> <if test="orgId != null">#{orgId},</if>
<if test="categoryName != null">#{categoryName},</if> <if test="categoryName != null">#{categoryName},</if>
<if test="categoryPathName != null">#{categoryPathName},</if> <if test="categoryPathName != null">#{categoryPathName},</if>
<if test="categoryPathId != null">#{categoryPathId},</if>
</trim> </trim>
</insert> </insert>
<insert id="batchCoscoAnnualreviewTemplate" parameterType="java.util.List"> <insert id="batchCoscoAnnualreviewTemplate" parameterType="java.util.List">
@ -217,6 +219,9 @@
<if test="categoryPathName != null">category_path_name = <if test="categoryPathName != null">category_path_name =
#{categoryPathName}, #{categoryPathName},
</if> </if>
<if test="categoryPathId != null">category_path_id =
#{categoryPathId},
</if>
</trim> </trim>
where id = #{id} where id = #{id}
</update> </update>

View File

@ -13,7 +13,7 @@
</resultMap> </resultMap>
<sql id="selectCoscoCategoryLibraryContainVo"> <sql id="selectCoscoCategoryLibraryContainVo">
select category_library_id, category_id,category_name,category_path_name select category_library_id, category_id, category_name, category_path_name
from cosco_category_library_contain from cosco_category_library_contain
</sql> </sql>
@ -46,10 +46,11 @@
</insert> </insert>
<insert id="batchCoscoCategoryLibraryContain" parameterType="java.util.List"> <insert id="batchCoscoCategoryLibraryContain" parameterType="java.util.List">
insert into cosco_category_library_contain insert into cosco_category_library_contain
( category_library_id, category_id,category_name,category_type,category_path_name) ( category_library_id, category_id,category_name,category_type,category_path_name,category_path_id)
values values
<foreach item="item" index="index" collection="list" separator=","> <foreach item="item" index="index" collection="list" separator=",">
( #{item.categoryLibraryId}, #{item.categoryId},#{item.categoryName},#{item.categoryType},#{item.categoryPathName}) ( #{item.categoryLibraryId}, #{item.categoryId},#{item.categoryName},#{item.categoryType},
#{item.categoryPathName},#{item.categoryPathId})
</foreach> </foreach>
</insert> </insert>
<update id="updateCoscoCategoryLibraryContain" <update id="updateCoscoCategoryLibraryContain"
@ -100,7 +101,8 @@
where cclc.category_library_id = #{categoryLibraryId} where cclc.category_library_id = #{categoryLibraryId}
</select> </select>
<update id="updateLockType" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscoCategory.entity.CoscoCategoryLibraryContain"> <update id="updateLockType"
parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscoCategory.entity.CoscoCategoryLibraryContain">
update cosco_category_library_contain update cosco_category_library_contain
set lock_type = #{lockType} set lock_type = #{lockType}
where category_library_id = #{categoryLibraryId} where category_library_id = #{categoryLibraryId}
@ -108,10 +110,10 @@
</update> </update>
<select id="selectCoscoCateGoryIdByLibraryId" parameterType="string" resultMap="CoscoCategoryLibraryContainResult"> <select id="selectCoscoCateGoryIdByLibraryId" parameterType="string" resultMap="CoscoCategoryLibraryContainResult">
select cclc.category_name,cclc.category_path_name select cclc.category_name, cclc.category_path_name
from cosco_category_library_contain cclc from cosco_category_library_contain cclc
where cclc.category_library_id = #{libraryId} where cclc.category_library_id = #{libraryId}
and cclc.category_type=1 and cclc.category_type = 1
</select> </select>
<select id="selectSupplierIdByLibraryId" parameterType="string" resultType="string"> <select id="selectSupplierIdByLibraryId" parameterType="string" resultType="string">

View File

@ -188,9 +188,7 @@
cet.weight_dept, cet.weight_dept,
cet.weight_value, cet.weight_value,
cet.status, cet.status,
cet.category_path_name cet.category_path_name cet.del_flag, cet.create_by,
cet.del_flag,
cet.create_by,
cet.create_time, cet.create_time,
cet.update_by, cet.update_by,
cet.update_time, cet.update_time,
@ -229,6 +227,7 @@
<if test="lastUpdateTime != null">last_update_time,</if> <if test="lastUpdateTime != null">last_update_time,</if>
<if test="categoryName != null">category_name,</if> <if test="categoryName != null">category_name,</if>
<if test="categoryPathName != null">category_path_name,</if> <if test="categoryPathName != null">category_path_name,</if>
<if test="categoryPathId != null">category_path_id,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if> <if test="id != null">#{id},</if>
@ -252,6 +251,7 @@
<if test="lastUpdateTime != null">#{lastUpdateTime},</if> <if test="lastUpdateTime != null">#{lastUpdateTime},</if>
<if test="categoryName != null">#{categoryName},</if> <if test="categoryName != null">#{categoryName},</if>
<if test="categoryPathName != null">#{categoryPathName},</if> <if test="categoryPathName != null">#{categoryPathName},</if>
<if test="categoryPathId != null">#{categoryPathId},</if>
</trim> </trim>
</insert> </insert>

View File

@ -163,6 +163,7 @@
<if test="orgId != null">org_id,</if> <if test="orgId != null">org_id,</if>
<if test="categoryName != null">category_name,</if> <if test="categoryName != null">category_name,</if>
<if test="categoryPathName != null">category_path_name,</if> <if test="categoryPathName != null">category_path_name,</if>
<if test="categoryPathId != null">category_path_id,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if> <if test="id != null">#{id},</if>
@ -184,6 +185,7 @@
<if test="orgId != null">#{orgId},</if> <if test="orgId != null">#{orgId},</if>
<if test="categoryName != null">#{categoryName},</if> <if test="categoryName != null">#{categoryName},</if>
<if test="categoryPathName != null">#{categoryPathName},</if> <if test="categoryPathName != null">#{categoryPathName},</if>
<if test="categoryPathId != null">#{categoryPathId},</if>
</trim> </trim>
</insert> </insert>
<insert id="batchCoscoEvaluateTemplate" parameterType="java.util.List"> <insert id="batchCoscoEvaluateTemplate" parameterType="java.util.List">
@ -252,6 +254,9 @@
<if test="categoryPathName != null">category_path_name = <if test="categoryPathName != null">category_path_name =
#{categoryPathName}, #{categoryPathName},
</if> </if>
<if test="categoryPathId != null">category_path_id =
#{categoryPathId},
</if>
</trim> </trim>
where id = #{id} where id = #{id}
</update> </update>