Commit 61879b7d by mobh

修改薪资组项选择界面接口

parent 37cc5fad
......@@ -18,14 +18,7 @@ import javax.script.ScriptException;
import cn.timer.api.dto.xcgl.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
......@@ -999,10 +992,10 @@ public class SalaryManagementController {
/**
* 获取薪资选项
*/
@GetMapping(value = "/salaryoptions")
@ApiOperation(value = "获取薪资选项", httpMethod = "GET", notes = "接口发布说明")
public ResponseResult SalaryOoptions(@CurrentUser UserBean userBean) {
List<XcglAssoOptionDto> itemlist = xcglsalaryitemmapper.selectxcglsalaryitemList();
@PostMapping(value = "/salaryoptions")
@ApiOperation(value = "获取薪资选项", httpMethod = "POST", notes = "接口发布说明")
public ResponseResult SalaryOoptions(@CurrentUser UserBean userBean, @RequestBody SalaryoptionsDto dto) {
List<XcglAssoOptionDto> itemlist = xcglsalaryitemmapper.selectxcglsalaryitemList(dto);
return new ResponseResult().success("获取薪资选项信息", itemlist);
}
......
package cn.timer.api.dao.xcgl;
import java.util.List;
import cn.timer.api.dto.xcgl.SalaryoptionsDto;
import org.springframework.stereotype.Repository;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
......@@ -15,6 +16,6 @@ import cn.timer.api.dto.xcgl.XcglAssoOptionDto;
@Repository
public interface XcglSalaryItemMapper extends BaseMapper<XcglSalaryItem> {
List<XcglAssoOptionDto> selectxcglsalaryitemList();
List<XcglAssoOptionDto> selectxcglsalaryitemList(SalaryoptionsDto dto);
}
package cn.timer.api.dto.xcgl;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class SalaryoptionsDto {
/**
* 状态 1:系统项;2:非系统项
*/
private Integer opttype;
}
......@@ -41,6 +41,9 @@
opt.type as opttype
from xcgl_salary_item item
LEFT JOIN xcgl_asso_option as opt on opt.itemid = item.id
<where>
<if test="opttype != null"> opt.type = #{opttype}</if>
</where>
</select>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment