fix:엔티티 toString수정 및 작성자 첫번째버전 아이디적용

TaehunPark 2022-09-27 09:21:23 +09:00
parent bdffee9f96
commit a6f69d3e5c
6 changed files with 24 additions and 7 deletions

View File

@ -98,6 +98,7 @@ public class EquipController {
String accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/equip/equipStatus").get(0).getAccessAuth(); String accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/equip/equipStatus").get(0).getAccessAuth();
mav.addObject("accessAuth", accessAuth); mav.addObject("accessAuth", accessAuth);
mav.addObject("userId", loginUser.getUserId()); mav.addObject("userId", loginUser.getUserId());
mav.addObject("wrtId", equipService.selectEquipFirstId(equip));
mav.addObject("equInfo", equipService.selectEquipInfo(equip)); mav.addObject("equInfo", equipService.selectEquipInfo(equip));
return mav; return mav;
} }

View File

@ -27,6 +27,8 @@ public interface EquipMapper {
Integer selectEquipLogListCnt(EquipLog equipLog); Integer selectEquipLogListCnt(EquipLog equipLog);
String selectEquipFirstId(Equip equip);
} }

View File

@ -83,15 +83,14 @@ public static class EquipId implements Serializable {
private Integer versionNo; private Integer versionNo;
} }
@Override @Override
public String toString() { public String toString() {
return "Equip [equKey=" + equKey + ", versionNo=" + versionNo + ", mgtOrgan=" + mgtOrgan + ", equType=" + equType return "Equip [equKey=" + equKey + ", versionNo=" + versionNo + ", mgtOrgan=" + mgtOrgan + ", equType=" + equType
+ ", detailType=" + detailType + ", storedYear=" + storedYear + ", mgtType=" + mgtType + ", itemQty=" + ", detailType=" + detailType + ", storedYear=" + storedYear + ", itemQty=" + itemQty + ", itemCondition="
+ itemQty + ", itemCondition=" + itemCondition + ", note=" + note + ", wrtOrgan=" + wrtOrgan + ", wrtNm=" + itemCondition + ", note=" + note + ", wrtOrgan=" + wrtOrgan + ", wrtNm=" + wrtNm + ", wrtDt=" + wrtDt
+ wrtNm + ", wrtDt=" + wrtDt + ", sosok=" + sosok + ", detailSosok=" + detailSosok + ", detailName=" + ", sosok=" + sosok + ", detailSosok=" + detailSosok + ", detailName=" + detailName + ", origNm=" + origNm
+ detailName + ", origNm=" + origNm + ", convNm=" + convNm + ", filePath=" + filePath + ", deleteFileKey=" + ", convNm=" + convNm + ", filePath=" + filePath + ", deleteFileKey=" + deleteFileKey + ", deleteFileVnum="
+ deleteFileKey + ", deleteFileVnum=" + deleteFileVnum + "]"; + deleteFileVnum + ", noUpdateImg=" + noUpdateImg + "]";
} }
@ -110,6 +109,9 @@ public String toString() {

View File

@ -288,6 +288,10 @@ public class EquipService {
public Integer selectEquipLogListCnt(EquipLog equipLog) { public Integer selectEquipLogListCnt(EquipLog equipLog) {
return equipMapper.selectEquipLogListCnt(equipLog); return equipMapper.selectEquipLogListCnt(equipLog);
} }
public String selectEquipFirstId(Equip equip) {
return equipMapper.selectEquipFirstId(equip);
}

View File

@ -398,6 +398,14 @@
order by el.wrt_dt desc order by el.wrt_dt desc
) a ) a
</select> </select>
<select id="selectEquipFirstId" resultType="String" parameterType="Equip">
select wrt_nm
from equ_mgt
where equ_key = #{equKey}
order by version_no asc
limit 1
</select>
</mapper> </mapper>

View File

@ -87,7 +87,7 @@
<div class="modal-footer justify-content-between"> <div class="modal-footer justify-content-between">
<div class="col-auto"> <div class="col-auto">
<button type="button" class="btn btn-secondary" id="closeModal" data-bs-dismiss="modal">닫기</button> <button type="button" class="btn btn-secondary" id="closeModal" data-bs-dismiss="modal">닫기</button>
<button type="button" class="btn btn-primary" id="updateEquip" th:if="${accessAuth eq 'ACC003'} or ${equInfo.wrtNm eq userId}">수정</button> <button type="button" class="btn btn-primary" id="updateEquip" th:if="${accessAuth eq 'ACC003'} or ${wrtId eq userId}">수정</button>
</div> </div>
</div> </div>
</html> </html>