@@ -12,7 +12,11 @@
ri.*,
(IF(ri.practical_returned_time is null,IF (ri.should_returned_time < NOW(),2,1),1)) as 'isTimeOut',
(select name from blade_user WHERE id = ri.reminder_user) as reminderUserName
- from c_contract_returned_info ri where ri.contract_id = #{contractId}
+ from c_contract_returned_info ri where ri.is_deleted = 0
+ <if test="contractId != null and contractId != ''">
+ and ri.contract_id = #{contractId}
+ </if>
+
</select>
<select id="getListByProjectId" resultType="org.springblade.control.vo.ContractReturnedInfoVO">
@@ -33,16 +33,16 @@
<select id="getCostTypeDict" resultType="org.springblade.control.entity.DictInfo">
- select * from c_dict_info WHERE code = 'cost_type' order by sort
+ select * from c_dict_info WHERE code = 'cost_type' and is_deleted = 0 order by sort
<select id="getProcessList" resultType="org.springblade.control.entity.ProjectProcess">
SELECT * FROM c_project_process
- WHERE project_id = #{projectId}
+ WHERE project_id = #{projectId} and is_deleted = 0
order by sort
<select id="getPostDict" resultType="org.springblade.control.entity.DictInfo">
- select * from c_dict_info WHERE `type` = 3 order by sort
+ select * from c_dict_info WHERE `type` = 3 and is_deleted = 0 order by sort
</mapper>
@@ -299,7 +299,14 @@ public class AnnualBudgetServiceImpl extends BaseServiceImpl<AnnualBudgetMapper,
list.add(v02);
}
- list = list.stream().sorted(Comparator.comparing(DictInfo::getSort)).collect(Collectors.toList());
+ if (list != null && list.size() > 0) {
+ for (DictInfoVO infoVO : list) {
+ if (infoVO.getSort() == null){
+ infoVO.setSort(1);
+ }
+ list = list.stream().sorted(Comparator.comparing(DictInfo::getSort)).collect(Collectors.toList());
vo.setChildren(list);
return allBudgetSubject;