修改数据
This commit is contained in:
@ -228,13 +228,10 @@
|
||||
FROM cosco_annualreview_task cat
|
||||
<where>
|
||||
<if test="vo.annualreviewTheme != null and vo.annualreviewTheme != ''">
|
||||
and cat.annualreview_theme = #{vo.annualreviewTheme}
|
||||
and cat.annualreview_theme like concat('%',#{vo.annualreviewTheme},'%')
|
||||
</if>
|
||||
<if test="vo.startTime != null ">
|
||||
and cat.start_time = #{vo.startTime}
|
||||
</if>
|
||||
<if test="vo.endTime != null ">
|
||||
and cat.end_time = #{vo.endTime}
|
||||
<if test="vo.startTime != null and vo.endTime != null">
|
||||
and cat.start_time between #{vo.startTime} and #{vo.endTime}
|
||||
</if>
|
||||
<if test="vo.status != null ">
|
||||
and cat.status = #{vo.status}
|
||||
|
@ -51,7 +51,7 @@
|
||||
cosco_annualreview_task_supplier cats
|
||||
join cosco_annualreview_task cat on cats.annualreview_task_id = cat.id
|
||||
JOIN cosco_supplier_base csb ON cats.supplier_id = csb.id
|
||||
left join cosco_category cc on cc.id = csb.category_id
|
||||
left join cosco_category cc on cc.id = cat.category_id
|
||||
where cats.del_flag='normal'
|
||||
<if test="vo.name!=null and vo.name!=''">
|
||||
and csb.name like concat('%',#{vo.name},'%')
|
||||
@ -62,6 +62,9 @@
|
||||
<if test="vo.reviewResult!=null">
|
||||
and cats.review_result=#{vo.reviewResult}
|
||||
</if>
|
||||
<if test="vo.startTime!=null and vo.endTime!=null">
|
||||
and cats.last_update_time between #{vo.startTime} and #{vo.endTime}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectCoscoAnnualreviewTaskSupplierList"
|
||||
|
@ -75,14 +75,20 @@
|
||||
<if test="vo.userId!=null and vo.userId!=''">
|
||||
and catsu.user_id=#{vo.userId}
|
||||
</if>
|
||||
<if test="vo.name!=null and vo.name!=''">
|
||||
and csb.name like concat('%',#{vo.name},'%')
|
||||
</if>
|
||||
<if test="vo.status!=null and vo.status!=''">
|
||||
and cat.status=#{vo.status}
|
||||
</if>
|
||||
<if test="vo.supplierId!=null and vo.supplierId!=''">
|
||||
and catsu.supplier_id=#{vo.supplierId}
|
||||
</if>
|
||||
<if test="vo.annualreviewTaskId!=null and vo.annualreviewTaskId!=''">
|
||||
and catsu.annualreview_task_id=#{vo.annualreviewTaskId}
|
||||
<if test="vo.startTime!=null and vo.endTime!=''">
|
||||
and catsu.start_time between #{vo.startTime} and #{vo.endTime}
|
||||
</if>
|
||||
<if test="vo.annualreviewTheme!=null and vo.annualreviewTheme!=''">
|
||||
and catsu.annualreview_theme like concat('%',#{vo.annualreviewTheme},'%')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
@ -47,6 +47,10 @@ public class CoscoAnnualreviewTemplate extends BaseEntity {
|
||||
* 品类id(cosco_category表主键)
|
||||
*/
|
||||
private String categoryId;
|
||||
/**
|
||||
* 创建单位
|
||||
*/
|
||||
private String deptId;
|
||||
|
||||
/**
|
||||
* 是否启用(0.草稿、1.启用、2.禁用)
|
||||
|
@ -62,6 +62,7 @@ public class CoscoAnnualreviewTaskServiceImpl implements ICoscoAnnualreviewTaskS
|
||||
vo.setAnnualreviewTheme(coscoAnnualreviewTask.getAnnualreviewTheme());
|
||||
vo.setTemplateId(coscoAnnualreviewTask.getTemplateId());
|
||||
vo.setStartTime(coscoAnnualreviewTask.getStartTime());
|
||||
vo.setAnnualreviewYear(coscoAnnualreviewTask.getAnnualreviewYear());
|
||||
vo.setEndTime(coscoAnnualreviewTask.getEndTime());
|
||||
vo.setCategoryId(coscoAnnualreviewTask.getCategoryId());
|
||||
vo.setCategoryLimitation(coscoAnnualreviewTask.getCategoryLimitation());
|
||||
|
@ -6,6 +6,7 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class AnnualreviewTaskSupplierListVo implements Serializable {
|
||||
@ -42,6 +43,12 @@ public class AnnualreviewTaskSupplierListVo implements Serializable {
|
||||
|
||||
private String deptId;
|
||||
|
||||
/**
|
||||
* 审查开始时间
|
||||
*/
|
||||
private Date startTime;
|
||||
private Date endTime;
|
||||
|
||||
@ApiModelProperty(value = "分页对象信息")
|
||||
private BasePageRequest basePageRequest;
|
||||
|
||||
|
@ -232,7 +232,7 @@
|
||||
<select id="selectBecomeDue" resultType="com.chinaunicom.zyhy.ebtp.supplier.coscoBlack.vo.BecomeDueVo">
|
||||
select cb.dept_id deptId,
|
||||
cb.create_by creater,
|
||||
csb.name ,
|
||||
csb.name,
|
||||
csb.id
|
||||
|
||||
from cosco_blacklist cb
|
||||
|
@ -82,4 +82,11 @@ public interface CoscoCategoryLibraryContainMapper extends IBaseMapper<CoscoCate
|
||||
* @param co
|
||||
*/
|
||||
void updateLockType(CoscoCategoryLibraryContain co);
|
||||
|
||||
/**
|
||||
* 获取品类id
|
||||
* @param libraryId
|
||||
* @return
|
||||
*/
|
||||
List<String> selectCoscoCateGoryIdByLibraryId(String libraryId);
|
||||
}
|
||||
|
@ -65,5 +65,10 @@ public interface CoscoCategoryMapper extends IBaseMapper<CoscoCategory> {
|
||||
|
||||
IPage<CoscoCategoryVO> selectMyPage(IPage<CoscoCategoryVO> p,@Param("coscoCategory") CoscoCategoryVO coscoCategory);
|
||||
|
||||
/**
|
||||
* 根据品类id获取全部名称
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
String selectCategoryNameById(String id);
|
||||
}
|
||||
|
@ -108,4 +108,11 @@
|
||||
and category_id = #{categoryId}
|
||||
</update>
|
||||
|
||||
<select id="selectCoscoCateGoryIdByLibraryId" parameterType="string" resultType="string">
|
||||
select cclc.category_id
|
||||
from cosco_category_library_contain cclc
|
||||
join cosco_category cc on cc.id= cclc.category_id
|
||||
where cclc.category_library_id = #{libraryId} and cc.type=1
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
@ -50,6 +50,7 @@
|
||||
select cclsa.id,
|
||||
ccl.name,
|
||||
ccl.area,
|
||||
ccl.id as libraryId,
|
||||
'张三' as applyUser ,
|
||||
ccl.create_time as applyTime,
|
||||
cclsa.approve_status as approveStatus
|
||||
@ -206,6 +207,12 @@
|
||||
<if test="vo.name!=null and vo.name!=''">
|
||||
and ccl.name like concat('%',#{vo.name},'%')
|
||||
</if>
|
||||
<if test="vo.area!=null and vo.area!=''">
|
||||
and ccl.area = #{vo.area}
|
||||
</if>
|
||||
<if test="vo.approveStatus!=null and vo.approveStatus!=''">
|
||||
and ccl.area = #{vo.approveStatus}
|
||||
</if>
|
||||
GROUP BY
|
||||
cclsa.id
|
||||
</select>
|
||||
|
@ -96,4 +96,11 @@ public interface ICoscoCategoryLibraryContainService extends IBaseService<Cosco
|
||||
* @return
|
||||
*/
|
||||
int updateList(List<CoscoCategoryLibraryContain> coscoCategoryLibraryContain);
|
||||
|
||||
/**
|
||||
* 获取品类名称
|
||||
* @param libraryId
|
||||
* @return
|
||||
*/
|
||||
List<String> selectCoscoCateGoryIdByLibraryId(String libraryId);
|
||||
}
|
||||
|
@ -154,6 +154,16 @@ public class CoscoCategoryLibraryContainServiceImpl extends BaseServiceImpl<Cosc
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取品类id
|
||||
* @param libraryId
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<String> selectCoscoCateGoryIdByLibraryId(String libraryId) {
|
||||
return coscoCategoryLibraryContainMapper.selectCoscoCateGoryIdByLibraryId(libraryId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 递归构建树形结构
|
||||
*
|
||||
|
@ -6,7 +6,10 @@ import com.chinaunicom.mall.ebtp.common.base.service.impl.BaseServiceImpl;
|
||||
import com.chinaunicom.mall.ebtp.common.util.PropertyUtils;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.base.constant.SupplierUserConstant;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.coscoCategory.dao.CoscoCategoryLibrarySupplierApplyMapper;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.coscoCategory.dao.CoscoCategoryMapper;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.coscoCategory.entity.CoscoCategory;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.coscoCategory.entity.CoscoCategoryLibrarySupplierApply;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.coscoCategory.service.ICoscoCategoryLibraryContainService;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.coscoCategory.service.ICoscoCategoryLibrarySupplierApplyService;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.coscoCategory.service.ICoscoCategoryLibrarySupplierService;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.coscoCategory.vo.AddCoscoCategoryLibrarySupplierApplyVo;
|
||||
@ -31,6 +34,10 @@ public class CoscoCategoryLibrarySupplierApplyServiceImpl extends BaseServiceImp
|
||||
private CoscoCategoryLibrarySupplierApplyMapper coscoCategoryLibrarySupplierApplyMapper;
|
||||
@Autowired
|
||||
private ICoscoCategoryLibrarySupplierService coscoCategoryLibrarySupplierService;
|
||||
@Autowired
|
||||
private ICoscoCategoryLibraryContainService coscoCategoryLibraryContainService;
|
||||
@Autowired
|
||||
private CoscoCategoryMapper coscoCategoryMapper;
|
||||
|
||||
/**
|
||||
* 查询品类库_品类库入库供应商申请单
|
||||
@ -42,7 +49,15 @@ public class CoscoCategoryLibrarySupplierApplyServiceImpl extends BaseServiceImp
|
||||
public ListCoscoCategoryLibrarySupplierApplyVo selectCoscoCategoryLibrarySupplierApplyById(String id) {
|
||||
ListCoscoCategoryLibrarySupplierApplyVo vo = coscoCategoryLibrarySupplierApplyMapper.selectCoscoCategoryLibrarySupplierApplyById(id);
|
||||
//获取添加的供应商
|
||||
|
||||
List<String> strings = coscoCategoryLibraryContainService.selectCoscoCateGoryIdByLibraryId(vo.getLibraryId());
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (String s : strings) {
|
||||
if (sb.length() > 0) {
|
||||
sb.append(",");
|
||||
}
|
||||
sb.append(coscoCategoryMapper.selectCategoryNameById(s));
|
||||
}
|
||||
vo.setCategoryName(sb.toString());
|
||||
vo.setCoscoCategoryLibrarySupplierVos(coscoCategoryLibrarySupplierService.selectSupplierByApplyId(id));
|
||||
|
||||
return vo;
|
||||
|
@ -17,6 +17,18 @@ public class ListCoscoCategoryLibrarySupplierApplyVo implements Serializable {
|
||||
* 品类库
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 部门名称
|
||||
*/
|
||||
private String deptName="部门";
|
||||
/**
|
||||
* 品类名称
|
||||
*/
|
||||
private String categoryName;
|
||||
/**
|
||||
* 品类id
|
||||
*/
|
||||
private String libraryId;
|
||||
/**
|
||||
* 地域
|
||||
*/
|
||||
|
@ -122,14 +122,14 @@
|
||||
select cet.id as taskId,
|
||||
case when cetad.status = 1 and cetad2.status is null then 1 else 2 end as division
|
||||
from cosco_evaluate_task cet
|
||||
join cosco_evaluate_task_assign_dept cetad
|
||||
join cosco_evaluate_task_assign_dept cetad
|
||||
on cet.id = cetad.evaluate_task_id and cetad.parent_dept_id = #{parentDeptId} and
|
||||
cetad.status = 1
|
||||
left join cosco_evaluate_task_assign_dept cetad2
|
||||
on cet.id = cetad2.evaluate_task_id and cetad2.parent_dept_id = #{deptId}
|
||||
<where>
|
||||
<if test="taskIds!=null and taskIds.size>0">
|
||||
cet.id in (
|
||||
cet.id in (
|
||||
<foreach item="item" collection="taskIds" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
@ -353,10 +353,10 @@
|
||||
cet.dept_id as deptId,
|
||||
cet.approve_status as approveStatus,
|
||||
case
|
||||
when cet.approve_status = 0 then '审批中'
|
||||
when cet.approve_status = 1 then '通过'
|
||||
when cet.approve_status = 2 then '驳回'
|
||||
else '未审批' end as approveName,
|
||||
when cet.approve_status = 0 then '审批中'
|
||||
when cet.approve_status = 1 then '通过'
|
||||
when cet.approve_status = 2 then '驳回'
|
||||
else '未审批' end as approveName,
|
||||
case
|
||||
when cet.status = 0 then '待评价'
|
||||
when cet.status = 1 then '评价中'
|
||||
@ -376,6 +376,9 @@
|
||||
<if test="vo.status!=null">
|
||||
and cet.status=#{vo.status}
|
||||
</if>
|
||||
<if test="vo.startTime!=null and vo.endTime!=null">
|
||||
and cet.start_time between #{vo.startTime} and #{vo.endTime}
|
||||
</if>
|
||||
</where>
|
||||
group by id
|
||||
</select>
|
||||
@ -407,6 +410,10 @@
|
||||
<if test="vo.status!=null">
|
||||
and cet.status=#{vo.status}
|
||||
</if>
|
||||
<if test="vo.startTime!=null and vo.endTime!=null">
|
||||
and (cet.start_time >= #{vo.startTime} and cet.end_time <= #{vo.endTime})
|
||||
</if>
|
||||
|
||||
</where>
|
||||
order by cet.create_time desc
|
||||
</select>
|
||||
|
@ -79,6 +79,7 @@
|
||||
<if test="lastUpdateTime != null ">
|
||||
and cets.last_update_time = #{lastUpdateTime}
|
||||
</if>
|
||||
|
||||
</where>
|
||||
</select>
|
||||
|
||||
@ -122,6 +123,12 @@
|
||||
<if test="vo.lastUpdateTime != null ">
|
||||
and cets.last_update_time = #{vo.lastUpdateTime}
|
||||
</if>
|
||||
<if test="vo.supplierName!=null and vo.supplierName!=''">
|
||||
and csb.name like concat('%',#{vo.supplierName},'%')
|
||||
</if>
|
||||
<if test="vo.levelName!=null and vo.levelName!=''">
|
||||
and csb.level_name = #{levelName}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
@ -289,6 +296,15 @@
|
||||
LEFT JOIN cosco_supplier_base csb ON cets.supplier_id = csb.id and csb.del_flag='normal'
|
||||
<where>
|
||||
and cetsu.del_flag = 'normal'
|
||||
<if test="vo.name !=null and vo.name !=''">
|
||||
and (csb.name like concat('%',#{vo.name},'%') or cet.evaluate_theme like concat('%',#{vo.name},'%'))
|
||||
</if>
|
||||
<if test="vo.startTime != null and vo.endTime!=null">
|
||||
and cets.start_time between #{vo.startTime} and #{vo.endTime}
|
||||
</if>
|
||||
<if test="vo.status !=null ">
|
||||
and cets.status = #{vo.status}
|
||||
</if>
|
||||
<if test="vo.userId != null and vo.userId != ''">and cetsu.user_id= #{vo.userId}</if>
|
||||
<if test="vo.taskId!=null and vo.taskId!=null">and cet.id= #{vo.taskId}</if>
|
||||
<if test="vo.supplierId!=null and vo.supplierId!=null">and cets.supplier_id= #{vo.supplierId}</if>
|
||||
|
@ -155,6 +155,7 @@ public class CoscoEvaluateTaskServiceImpl implements ICoscoEvaluateTaskService {
|
||||
addCoscoEvaluateTaskVo.setBlackSupplierVos(blackSupplierVos);
|
||||
addCoscoEvaluateTaskVo.setIndicatorList(vos);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
return addCoscoEvaluateTaskVo;
|
||||
|
@ -21,7 +21,7 @@ public class CoscoEvaluateTemplateVo implements Serializable {
|
||||
/**
|
||||
* 品类id
|
||||
*/
|
||||
private Long categoryId;
|
||||
private String categoryId;
|
||||
/**
|
||||
* 创建单位
|
||||
*/
|
||||
|
@ -43,6 +43,10 @@ public class SupplierPageVo {
|
||||
|
||||
/** 最新评价时间 */
|
||||
private String supplierType;
|
||||
/**
|
||||
* 品类id
|
||||
*/
|
||||
private String categoryId;
|
||||
|
||||
/**
|
||||
* 黑名单部门list
|
||||
|
@ -897,7 +897,7 @@
|
||||
SELECT
|
||||
csb.id,
|
||||
MAX(csb.name) AS name,
|
||||
csb.social_credit_code AS socialCreditCode,
|
||||
MAX(csb.social_credit_code) AS socialCreditCode,
|
||||
MAX(cas.dept_id) AS deptId,
|
||||
MAX(caw.id) AS accessWorkId,
|
||||
MAX(caw.update_time) AS admissionTime,
|
||||
@ -941,6 +941,7 @@
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
casc.supplier_id,
|
||||
GROUP_CONCAT(casc.category_id SEPARATOR ', ') AS categoryId,
|
||||
GROUP_CONCAT(cc.category_name SEPARATOR ', ') AS categoryName
|
||||
FROM
|
||||
cosco_access_supplier_category casc
|
||||
@ -987,6 +988,16 @@
|
||||
</foreach>
|
||||
</if>
|
||||
)
|
||||
<if test="vo.name!=null and vo.name!=''">
|
||||
and csb.name like concat('%',#{vo.name},'%')
|
||||
</if>
|
||||
<if test="vo.deptId!=null and vo.deptId!=''">
|
||||
and cas.dept_id = #{vo.deptId}
|
||||
</if>
|
||||
<if test="vo.categoryId!=null and vo.categoryId!=''">
|
||||
and category_info.categoryId like concat('%',#{vo.categoryId},'%')
|
||||
</if>
|
||||
|
||||
|
||||
GROUP BY
|
||||
csb.id
|
||||
|
Reference in New Issue
Block a user