代码提交
This commit is contained in:
parent
a812b4b0c2
commit
4c46e9f1db
|
|
@ -27,7 +27,7 @@ import java.util.List;
|
|||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/monthlyPlan")
|
||||
@RequestMapping("/dayPlan")
|
||||
public class DayPlanController extends BaseController {
|
||||
|
||||
@Resource
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import com.bonus.digital.dao.InspectionStationVo;
|
|||
import com.bonus.digital.service.InspectionStationService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
|
@ -46,7 +47,7 @@ public class InspectionStationController extends BaseController {
|
|||
*/
|
||||
@PreAuthorize("@ss.hasPermi('inspection:station:add')")
|
||||
@PostMapping("/addInspectionStation")
|
||||
public AjaxResult addInspectionStation(@RequestBody InspectionStationVo inspectionStationVo)
|
||||
public AjaxResult addInspectionStation(@RequestBody @Validated InspectionStationVo inspectionStationVo)
|
||||
{
|
||||
try {
|
||||
int res = inspectionStationService.addInspectionStation(inspectionStationVo);
|
||||
|
|
@ -84,7 +85,7 @@ public class InspectionStationController extends BaseController {
|
|||
*/
|
||||
@PreAuthorize("@ss.hasPermi('inspection:station:update')")
|
||||
@PostMapping("/updateInspectionStation")
|
||||
public AjaxResult updateInspectionStation(@RequestBody InspectionStationVo inspectionStationVo)
|
||||
public AjaxResult updateInspectionStation(@RequestBody @Validated InspectionStationVo inspectionStationVo)
|
||||
{
|
||||
try {
|
||||
int res = inspectionStationService.updateInspectionStation(inspectionStationVo);
|
||||
|
|
|
|||
|
|
@ -11,10 +11,7 @@ import com.bonus.digital.dao.ExportMonthPlanPersonVo;
|
|||
import com.bonus.digital.service.MonthlyPlanService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
|
@ -67,7 +64,7 @@ public class MonthlyPlanController extends BaseController {
|
|||
*/
|
||||
@PreAuthorize("@ss.hasPermi('monthly:plan:add')")
|
||||
@PostMapping("/addMonthlyPlan")
|
||||
public AjaxResult addMonthlyPlan(MonthlyPlanVo monthlyPlanVo) {
|
||||
public AjaxResult addMonthlyPlan(@RequestBody MonthlyPlanVo monthlyPlanVo) {
|
||||
try {
|
||||
int res = monthlyPlanService.addMonthlyPlanList(monthlyPlanVo);
|
||||
if (res > 0) {
|
||||
|
|
@ -85,7 +82,7 @@ public class MonthlyPlanController extends BaseController {
|
|||
*/
|
||||
@PreAuthorize("@ss.hasPermi('monthly:plan:del')")
|
||||
@PostMapping("/delMonthlyPlan")
|
||||
public AjaxResult delMonthlyPlan(MonthlyPlanVo monthlyPlanVo) {
|
||||
public AjaxResult delMonthlyPlan(@RequestBody MonthlyPlanVo monthlyPlanVo) {
|
||||
try {
|
||||
int res = monthlyPlanService.delMonthlyPlanList(monthlyPlanVo);
|
||||
if (res > 0) {
|
||||
|
|
@ -103,7 +100,7 @@ public class MonthlyPlanController extends BaseController {
|
|||
*/
|
||||
@PreAuthorize("@ss.hasPermi('monthly:plan:update')")
|
||||
@PostMapping("/updateMonthlyPlan")
|
||||
public AjaxResult updateMonthlyPlan(MonthlyPlanVo monthlyPlanVo) {
|
||||
public AjaxResult updateMonthlyPlan(@RequestBody MonthlyPlanVo monthlyPlanVo) {
|
||||
try {
|
||||
int res = monthlyPlanService.updateMonthlyPlan(monthlyPlanVo);
|
||||
if (res > 0) {
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import com.bonus.digital.dao.PersonnelClassificationVo;
|
|||
import com.bonus.digital.service.PersonnelClassificationService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
|
@ -45,7 +46,7 @@ public class PersonnelClassificationController extends BaseController {
|
|||
*/
|
||||
@PreAuthorize("@ss.hasPermi('personnel:classification:add')")
|
||||
@PostMapping("/addClassification")
|
||||
public AjaxResult addClassification(@RequestBody PersonnelClassificationVo personnelClassificationVo)
|
||||
public AjaxResult addClassification(@RequestBody @Validated PersonnelClassificationVo personnelClassificationVo)
|
||||
{
|
||||
try {
|
||||
int res = personnelClassificationService.addClassification(personnelClassificationVo);
|
||||
|
|
@ -83,7 +84,7 @@ public class PersonnelClassificationController extends BaseController {
|
|||
*/
|
||||
@PreAuthorize("@ss.hasPermi('personnel:classification:update')")
|
||||
@PostMapping("/updateClassification")
|
||||
public AjaxResult updateClassification(@RequestBody PersonnelClassificationVo personnelClassificationVo)
|
||||
public AjaxResult updateClassification(@RequestBody @Validated PersonnelClassificationVo personnelClassificationVo)
|
||||
{
|
||||
try {
|
||||
int res = personnelClassificationService.updateClassification(personnelClassificationVo);
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import com.bonus.digital.dao.PlanMajorVo;
|
|||
import com.bonus.digital.service.PlanMajorService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
|
@ -47,7 +48,7 @@ public class PlanMajorController extends BaseController {
|
|||
*/
|
||||
@PreAuthorize("@ss.hasPermi('plan:major:add')")
|
||||
@PostMapping("/addPlanMajor")
|
||||
public AjaxResult addPlanMajor(@RequestBody PlanMajorVo planMajorVo)
|
||||
public AjaxResult addPlanMajor(@RequestBody @Validated PlanMajorVo planMajorVo)
|
||||
{
|
||||
try {
|
||||
int res = planMajorService.addPlanMajor(planMajorVo);
|
||||
|
|
@ -85,7 +86,7 @@ public class PlanMajorController extends BaseController {
|
|||
*/
|
||||
@PreAuthorize("@ss.hasPermi('plan:major:update')")
|
||||
@PostMapping("/updatePlanMajor")
|
||||
public AjaxResult updatePlanMajor(@RequestBody PlanMajorVo planMajorVo)
|
||||
public AjaxResult updatePlanMajor(@RequestBody @Validated PlanMajorVo planMajorVo)
|
||||
{
|
||||
try {
|
||||
int res = planMajorService.updatePlanMajor(planMajorVo);
|
||||
|
|
|
|||
|
|
@ -30,14 +30,13 @@ public class WorkloadCategoryController extends BaseController {
|
|||
*/
|
||||
@PreAuthorize("@ss.hasPermi('workload:category:list')")
|
||||
@GetMapping("/getWorkloadCategoryList")
|
||||
public TableDataInfo getWorkloadCategoryList(WorkloadCategoryVo workloadCategoryVo)
|
||||
{
|
||||
public TableDataInfo getWorkloadCategoryList(WorkloadCategoryVo workloadCategoryVo) {
|
||||
try {
|
||||
startPage();
|
||||
List<WorkloadCategoryVo> list = workloadCategoryService.getWorkloadCategoryList(workloadCategoryVo);
|
||||
return getDataTable(list);
|
||||
}catch (Exception e) {
|
||||
return getDataTable(null);
|
||||
} catch (Exception e) {
|
||||
return getDataTable(null);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -46,17 +45,16 @@ public class WorkloadCategoryController extends BaseController {
|
|||
*/
|
||||
@PreAuthorize("@ss.hasPermi('workload:category:add')")
|
||||
@PostMapping("/addWorkloadCategory")
|
||||
public AjaxResult addWorkloadCategory(@RequestBody WorkloadCategoryVo workloadCategoryVo)
|
||||
{
|
||||
public AjaxResult addWorkloadCategory(@RequestBody WorkloadCategoryVo workloadCategoryVo) {
|
||||
try {
|
||||
int res = workloadCategoryService.addWorkloadCategory(workloadCategoryVo);
|
||||
int res = workloadCategoryService.addWorkloadCategory(workloadCategoryVo);
|
||||
if (res > 0) {
|
||||
return AjaxResult.success();
|
||||
}else {
|
||||
} else {
|
||||
return AjaxResult.error("新增失败");
|
||||
}
|
||||
}catch (Exception e) {
|
||||
return AjaxResult.error("系统异常,请联系管理员");
|
||||
} catch (Exception e) {
|
||||
return AjaxResult.error("系统异常,请联系管理员");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -65,17 +63,16 @@ public class WorkloadCategoryController extends BaseController {
|
|||
*/
|
||||
@PreAuthorize("@ss.hasPermi('workload:category:del')")
|
||||
@PostMapping("/delWorkloadCategory")
|
||||
public AjaxResult delWorkloadCategory(@RequestBody WorkloadCategoryVo workloadCategoryVo)
|
||||
{
|
||||
public AjaxResult delWorkloadCategory(@RequestBody WorkloadCategoryVo workloadCategoryVo) {
|
||||
try {
|
||||
int res = workloadCategoryService.delWorkloadCategory(workloadCategoryVo);
|
||||
int res = workloadCategoryService.delWorkloadCategory(workloadCategoryVo);
|
||||
if (res > 0) {
|
||||
return AjaxResult.success();
|
||||
}else {
|
||||
} else {
|
||||
return AjaxResult.error("删除失败");
|
||||
}
|
||||
}catch (Exception e) {
|
||||
return AjaxResult.error("系统异常,请联系管理员");
|
||||
} catch (Exception e) {
|
||||
return AjaxResult.error("系统异常,请联系管理员");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -84,17 +81,16 @@ public class WorkloadCategoryController extends BaseController {
|
|||
*/
|
||||
@PreAuthorize("@ss.hasPermi('workload:category:update')")
|
||||
@PostMapping("/updateWorkloadCategory")
|
||||
public AjaxResult updateWorkloadCategory(@RequestBody WorkloadCategoryVo workloadCategoryVo)
|
||||
{
|
||||
public AjaxResult updateWorkloadCategory(@RequestBody WorkloadCategoryVo workloadCategoryVo) {
|
||||
try {
|
||||
int res = workloadCategoryService.updateWorkloadCategory(workloadCategoryVo);
|
||||
int res = workloadCategoryService.updateWorkloadCategory(workloadCategoryVo);
|
||||
if (res > 0) {
|
||||
return AjaxResult.success();
|
||||
}else {
|
||||
} else {
|
||||
return AjaxResult.error("修改失败");
|
||||
}
|
||||
}catch (Exception e) {
|
||||
return AjaxResult.error("系统异常,请联系管理员");
|
||||
} catch (Exception e) {
|
||||
return AjaxResult.error("系统异常,请联系管理员");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,9 @@
|
|||
package com.bonus.digital.dao;
|
||||
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
|
|
@ -19,11 +21,14 @@ public class InspectionStationVo {
|
|||
/**
|
||||
* 单位名称
|
||||
*/
|
||||
@NotBlank(message = "名称不能为空")
|
||||
@Length(max = 50, message = "名称不能超过50个字符")
|
||||
private String inspectionStationName;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@Length(max = 200,message = "备注不能超过200个字符")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,7 +1,9 @@
|
|||
package com.bonus.digital.dao;
|
||||
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
|
|
@ -19,11 +21,14 @@ public class PersonnelClassificationVo {
|
|||
/**
|
||||
* 人员分类名称
|
||||
*/
|
||||
@NotBlank(message = "名称不能为空")
|
||||
@Length(max = 50, message = "名称不能超过50个字符")
|
||||
private String personnelClassificationName;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@Length(max = 200, message = "名称不能超过200个字符")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,7 +1,9 @@
|
|||
package com.bonus.digital.dao;
|
||||
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
|
|
@ -19,11 +21,14 @@ public class PlanMajorVo {
|
|||
/**
|
||||
* 计划专业名称
|
||||
*/
|
||||
@NotBlank(message = "名称不能为空")
|
||||
@Length(max = 50,message = "名称长度不能超过50")
|
||||
private String planMajorName;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@Length(max = 200,message = "备注长度不能超过200")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -32,6 +32,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<select id="getInspectionStationList" resultType="com.bonus.digital.dao.InspectionStationVo">
|
||||
select inspection_station_id,inspection_station_name,remark,category
|
||||
from tb_inspection_station where category = #{category} and is_active = '1'
|
||||
<if test="inspectionStationName != null and inspectionStationName != ''">
|
||||
and inspection_station_name like concat('%',#{inspectionStationName},'%')
|
||||
</if>
|
||||
</select>
|
||||
<select id="getInspectionStationDetail" resultType="com.bonus.digital.dao.InspectionStationVo">
|
||||
select inspection_station_id,inspection_station_name,remark,category
|
||||
|
|
|
|||
|
|
@ -33,5 +33,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<select id="classificationList" resultType="com.bonus.digital.dao.PersonnelClassificationVo">
|
||||
select personnel_classification_id,personnel_classification_name,remark,category
|
||||
from tb_personnel_classification where category = #{category} and is_active = '1'
|
||||
<if test="personnelClassificationName != null and personnelClassificationName !=''">
|
||||
and personnel_classification_name like concat('%',#{personnelClassificationName},'%')
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -32,5 +32,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<select id="getPlanMajorList" resultType="com.bonus.digital.dao.PersonnelVo">
|
||||
select plan_major_id,plan_major_name,remark,category
|
||||
from tb_plan_major where category = #{category} and is_active = '1'
|
||||
<if test="planMajorName != null and planMajorName !=''">
|
||||
and plan_major_name like concat('%',#{planMajorName},'%')
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -35,5 +35,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<select id="getWorkloadCategoryList" resultType="com.bonus.digital.dao.WorkloadCategoryVo">
|
||||
select workload_category_id,workload_category_name,remark,category,unit_price
|
||||
from tb_workload_category where is_active = '1'
|
||||
<if test="workloadCategoryName !=null and workloadCategoryName != ''">
|
||||
and workload_category_name like concat('%',#{workloadCategoryName},'%')
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
Loading…
Reference in New Issue