|
@@ -96,7 +96,7 @@ func (c *SalaryController) Salary_Get() {
|
|
|
c.ServeJSON()
|
|
|
return
|
|
|
}
|
|
|
- salary_new.T_State = 1
|
|
|
+ salary_new.T_State = 3
|
|
|
c.Data["json"] = lib.JSONS{Code: 200, Msg: "ok!", Data: salary_new}
|
|
|
c.ServeJSON()
|
|
|
return
|
|
@@ -119,7 +119,7 @@ func (c *SalaryController) Salary_User_Get() {
|
|
|
T_date = time.Now().AddDate(0, -1, 0).Format("2006-01")
|
|
|
}
|
|
|
|
|
|
- salary, err := Salary.Read_Salary_ByT_uuid_T_date(c.User.T_uuid, T_date)
|
|
|
+ salary, err := Salary.Read_Salary_ByT_date(c.User.T_uuid, T_date)
|
|
|
if err != nil {
|
|
|
if err.Error() == orm.ErrNoRows.Error() {
|
|
|
c.Data["json"] = lib.JSONS{Code: 202, Msg: "暂无当月数据!"}
|
|
@@ -458,22 +458,22 @@ func (c *SalaryController) Salary_Excel() {
|
|
|
//f.SetCellValue("Sheet1", fmt.Sprintf("V%d", line), total)
|
|
|
|
|
|
// 函数统计
|
|
|
- f.SetCellFormula("Sheet1", fmt.Sprintf("E%d", line), fmt.Sprintf("SUM(E4,E%d)", line-1))
|
|
|
- f.SetCellFormula("Sheet1", fmt.Sprintf("F%d", line), fmt.Sprintf("SUM(F4,F%d)", line-1))
|
|
|
- f.SetCellFormula("Sheet1", fmt.Sprintf("G%d", line), fmt.Sprintf("SUM(G4,G%d)", line-1))
|
|
|
- f.SetCellFormula("Sheet1", fmt.Sprintf("J%d", line), fmt.Sprintf("SUM(J4,J%d)", line-1))
|
|
|
- f.SetCellFormula("Sheet1", fmt.Sprintf("K%d", line), fmt.Sprintf("SUM(K4,K%d)", line-1))
|
|
|
- f.SetCellFormula("Sheet1", fmt.Sprintf("L%d", line), fmt.Sprintf("SUM(L4,L%d)", line-1))
|
|
|
- f.SetCellFormula("Sheet1", fmt.Sprintf("M%d", line), fmt.Sprintf("SUM(M4,M%d)", line-1))
|
|
|
- f.SetCellFormula("Sheet1", fmt.Sprintf("N%d", line), fmt.Sprintf("SUM(N4,N%d)", line-1))
|
|
|
- f.SetCellFormula("Sheet1", fmt.Sprintf("O%d", line), fmt.Sprintf("SUM(O4,O%d)", line-1))
|
|
|
- f.SetCellFormula("Sheet1", fmt.Sprintf("P%d", line), fmt.Sprintf("SUM(P4,P%d)", line-1))
|
|
|
- f.SetCellFormula("Sheet1", fmt.Sprintf("Q%d", line), fmt.Sprintf("SUM(Q4,Q%d)", line-1))
|
|
|
- f.SetCellFormula("Sheet1", fmt.Sprintf("R%d", line), fmt.Sprintf("SUM(R4,R%d)", line-1))
|
|
|
- f.SetCellFormula("Sheet1", fmt.Sprintf("S%d", line), fmt.Sprintf("SUM(S4,S%d)", line-1))
|
|
|
- f.SetCellFormula("Sheet1", fmt.Sprintf("T%d", line), fmt.Sprintf("SUM(T4,T%d)", line-1))
|
|
|
- f.SetCellFormula("Sheet1", fmt.Sprintf("U%d", line), fmt.Sprintf("SUM(U4,U%d)", line-1))
|
|
|
- f.SetCellFormula("Sheet1", fmt.Sprintf("V%d", line), fmt.Sprintf("SUM(V4,V%d)", line-1))
|
|
|
+ f.SetCellFormula("Sheet1", fmt.Sprintf("E%d", line), fmt.Sprintf("SUM(E4:E%d)", line-1))
|
|
|
+ f.SetCellFormula("Sheet1", fmt.Sprintf("F%d", line), fmt.Sprintf("SUM(F4:F%d)", line-1))
|
|
|
+ f.SetCellFormula("Sheet1", fmt.Sprintf("G%d", line), fmt.Sprintf("SUM(G4:G%d)", line-1))
|
|
|
+ f.SetCellFormula("Sheet1", fmt.Sprintf("J%d", line), fmt.Sprintf("SUM(J4:J%d)", line-1))
|
|
|
+ f.SetCellFormula("Sheet1", fmt.Sprintf("K%d", line), fmt.Sprintf("SUM(K4:K%d)", line-1))
|
|
|
+ f.SetCellFormula("Sheet1", fmt.Sprintf("L%d", line), fmt.Sprintf("SUM(L4:L%d)", line-1))
|
|
|
+ f.SetCellFormula("Sheet1", fmt.Sprintf("M%d", line), fmt.Sprintf("SUM(M4:M%d)", line-1))
|
|
|
+ f.SetCellFormula("Sheet1", fmt.Sprintf("N%d", line), fmt.Sprintf("SUM(N4:N%d)", line-1))
|
|
|
+ f.SetCellFormula("Sheet1", fmt.Sprintf("O%d", line), fmt.Sprintf("SUM(O4:O%d)", line-1))
|
|
|
+ f.SetCellFormula("Sheet1", fmt.Sprintf("P%d", line), fmt.Sprintf("SUM(P4:P%d)", line-1))
|
|
|
+ f.SetCellFormula("Sheet1", fmt.Sprintf("Q%d", line), fmt.Sprintf("SUM(Q4:Q%d)", line-1))
|
|
|
+ f.SetCellFormula("Sheet1", fmt.Sprintf("R%d", line), fmt.Sprintf("SUM(R4:R%d)", line-1))
|
|
|
+ f.SetCellFormula("Sheet1", fmt.Sprintf("S%d", line), fmt.Sprintf("SUM(S4:S%d)", line-1))
|
|
|
+ f.SetCellFormula("Sheet1", fmt.Sprintf("T%d", line), fmt.Sprintf("SUM(T4:T%d)", line-1))
|
|
|
+ f.SetCellFormula("Sheet1", fmt.Sprintf("U%d", line), fmt.Sprintf("SUM(U4:U%d)", line-1))
|
|
|
+ f.SetCellFormula("Sheet1", fmt.Sprintf("V%d", line), fmt.Sprintf("SUM(V4:V%d)", line-1))
|
|
|
|
|
|
Style4, _ := f.NewStyle(
|
|
|
&excelize.Style{
|