This commit is contained in:
parent
e11d095b6d
commit
42002e753a
|
|
@ -108,7 +108,7 @@ public class ArchivesServiceImpl implements ArchivesService {
|
|||
@Override
|
||||
public AjaxResult edit(ArchivesInfo archiveInfo) {
|
||||
// 根据类型名称和上级id查询,同级下名称不能重复
|
||||
archiveInfo.setParentId(archiveInfo.getInfoId() != null ? archiveInfo.getInfoId() : 0L);
|
||||
archiveInfo.setParentId(archiveInfo.getParentId() != null ? archiveInfo.getParentId() : 0L);
|
||||
ArchivesInfo info = archivesMapper.selectByName(archiveInfo);
|
||||
if (info != null && !archiveInfo.getInfoId().equals(info.getInfoId())) {
|
||||
return AjaxResult.error(HttpCodeEnum.NAME_DUPLICATE.getCode(), HttpCodeEnum.NAME_DUPLICATE.getMsg());
|
||||
|
|
|
|||
|
|
@ -583,7 +583,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
m.test_load as testLoad,
|
||||
m.holding_time as holdingTime,
|
||||
m.remark as remark,whi.house_name as houseName,
|
||||
m.fac_model AS facModel,su.user_name as keeperNickName,su2.user_name as repairNickName
|
||||
m.fac_model AS facModel,su.user_name as keeperNickName,su2.user_name as repairNickName,
|
||||
m.sort_num as sortNum
|
||||
FROM
|
||||
ma_type m
|
||||
LEFT JOIN ma_type m1 ON m.parent_id = m1.type_id and m1.del_flag = '0'
|
||||
|
|
@ -604,6 +605,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
)
|
||||
</if>
|
||||
GROUP BY m.type_id
|
||||
ORDER BY
|
||||
m.sort_num ASC,
|
||||
CASE
|
||||
WHEN m.update_time > m.create_time THEN
|
||||
m.update_time ELSE m.create_time
|
||||
END DESC,
|
||||
m.create_time DESC
|
||||
</select>
|
||||
<select id="queryByNameAndParentId" resultType="com.bonus.material.ma.domain.Type">
|
||||
select
|
||||
|
|
|
|||
Loading…
Reference in New Issue