---
# System prepended metadata

title: 9 - 材料系統維護紀錄表備註

---

# 9 - 材料系統維護紀錄表備註

## 問題

1.MR20201一般類請購單無法帶入材料名稱


2.MR20104→由請購申請單轉入挑選請購單時，單號應依建立時間排序

3.MR20101、MR20102修改功能名稱

## 邏輯分析

1. 因資料庫欄位缺少資料或是為null值，所以不會顯示

![](https://i.imgur.com/TEEdeBb.png)


2. 新增此功能

3. 更改程式碼


## 更正程式碼

**修正模式:A**

1.

mr20201_man_2Handlers.jsp

修正130的判斷式

``` java
if (!StringUtils.isEmpty(ls_seq)){
    String ls_mno = Utils.convertToString(DBTools.dLookUp("ANOB_MNO", "MAUR_ANOB", "ANOB_ANO = '" + ano + "' AND ANOB_PCODE = '" + pcode + "' AND ANOB_PYY = " + pyy + " AND ANOB_PSEQ = " + pseq  + " AND ANOB_SEQ = " + ls_seq, connectionName));
    if (!StringUtils.isEmpty(ls_mno)){
        if (ls_mno.substring(0,1).equals("X")){
            e.getGrid().getControl("ANOH_MNAME").setValue(Utils.convertToString(DBTools.dLookUp("ANOB_MNAME", "MAUR_ANOB", "ANOB_ANO = '" + ano + "' AND ANOB_PCODE = '" + pcode + "' AND ANOB_PYY = " + pyy + " AND ANOB_PSEQ = " + pseq  + " AND ANOB_SEQ = " + ls_seq, connectionName)));
        }else{
            e.getGrid().getControl("ANOH_MNAME").setValue(Utils.convertToString(DBTools.dLookUp("MNO_MNAME", "BASC_MNO", "MNO_MNO = '" + ls_mno + "'" , connectionName)));
        } 
    }else{
            e.getGrid().getControl("ANOH_MNAME").setValue(Utils.convertToString(DBTools.dLookUp("ANOB_MNAME", "MAUR_ANOB", "ANOB_ANO = '" + ano + "' AND ANOB_PCODE = '" + pcode + "' AND ANOB_PYY = " + pyy + " AND ANOB_PSEQ = " + pseq  + " AND ANOB_SEQ = " + ls_seq, connectionName)));
    }
}
```


2. 

mr20104_lis_2.xml 76行

``` JAVA
 <Select query="SELECT * FROM MAUR_ARNOH" type="raw" orderBy="ARNOH_PYY DESC, ARNOH_PSEQ DESC ">
```
   

3. 

mr20101_lis.jsp
191行改為

``` HTML
<p align="center"><font class="SynctFormHeaderFont">&nbsp;MR20101&nbsp;一般類請購申請單維護&nbsp;</font></p>
```

mr20102_sel.jsp

105行
``` HTML
  <p align="center"><font class="SynctFormHeaderFont">&nbsp;MR20102&nbsp;一般類請購申請單列印&nbsp;</font></p>
 
```
