bank account

This commit is contained in:
jiangyong27 2024-03-09 20:04:21 +08:00
parent 52fe224d44
commit dc8eede4b7
1 changed files with 5 additions and 3 deletions

View File

@ -53,6 +53,7 @@ type ApplyValue struct {
} `json:"files"`
Vacation *Vacation `json:"vacation"`
PunchCorrection interface{} `json:"punch_correction"`
BankAccount interface{} `json:"bank_account"`
}
type ApplyContent struct {
@ -118,6 +119,9 @@ func (d *ApproveDetail) GetValue(title string) string {
ddate = dtime
}
value = ddate + "," + dtime + "," + cast.ToString(mp["state"])
} else if content.Control == "BankAccount" {
mp := cast.ToStringMap(content.Value.BankAccount)
value = cast.ToString(mp["account_type"]) + "," + cast.ToString(mp["account_name"]) + "," + cast.ToString(mp["account_number"])
}
return value
}
@ -147,9 +151,7 @@ func (q *AppApprove) GetDetail(spNo string) (*ApproveDetail, error) {
}
var rsp ApproveDetailRsp
mp := make(map[string]interface{})
json.Unmarshal(rspBody, &mp)
//fmt.Println(goutil.EncodeJSONIndent(mp))
fmt.Println("spno: %s, detail: %s", spNo, string(rspBody))
if err := json.Unmarshal(rspBody, &rsp); err != nil {
log.Errorf("get body[%s] json error :%s", string(rspBody), err.Error())
return nil, err