代码提交
This commit is contained in:
parent
6ee0bdbdd8
commit
85592af4e4
|
|
@ -12,10 +12,7 @@ import com.bonus.digital.dao.MonthlyPlanVo;
|
|||
import com.bonus.digital.service.DayPlanService;
|
||||
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;
|
||||
|
|
@ -47,7 +44,7 @@ public class DayPlanController extends BaseController {
|
|||
//新增日计划
|
||||
@PreAuthorize("@ss.hasPermi('day:plan:add')")
|
||||
@PostMapping("/addDayPlan")
|
||||
public AjaxResult addMonthlyPlan(DayPlanVo dayPlanVo) {
|
||||
public AjaxResult addMonthlyPlan(@RequestBody DayPlanVo dayPlanVo) {
|
||||
try {
|
||||
int res = dayPlanService.addMonthlyPlan(dayPlanVo);
|
||||
if (res > 0) {
|
||||
|
|
@ -63,7 +60,7 @@ public class DayPlanController extends BaseController {
|
|||
//删除日计划
|
||||
@PreAuthorize("@ss.hasPermi('day:plan:del')")
|
||||
@PostMapping("/delDayPlan")
|
||||
public AjaxResult delMonthlyPlan(DayPlanVo dayPlanVo) {
|
||||
public AjaxResult delMonthlyPlan(@RequestBody DayPlanVo dayPlanVo) {
|
||||
try {
|
||||
int res = dayPlanService.delDayPlan(dayPlanVo);
|
||||
if (res > 0) {
|
||||
|
|
@ -79,7 +76,7 @@ public class DayPlanController extends BaseController {
|
|||
// 修改日计划
|
||||
@PreAuthorize("@ss.hasPermi('day:plan:update')")
|
||||
@PostMapping("/updateDayPlan")
|
||||
public AjaxResult updateMonthlyPlan(DayPlanVo dayPlanVo) {
|
||||
public AjaxResult updateMonthlyPlan(@RequestBody DayPlanVo dayPlanVo) {
|
||||
try {
|
||||
int res = dayPlanService.updateDayPlan(dayPlanVo);
|
||||
if (res > 0) {
|
||||
|
|
|
|||
|
|
@ -16,17 +16,17 @@ public interface PersonnelMapper {
|
|||
/**
|
||||
* 新增人员
|
||||
*/
|
||||
int addPersonnel(PersonnelVo personnelVo);
|
||||
Integer addPersonnel(PersonnelVo personnelVo);
|
||||
|
||||
/**
|
||||
* 删除人员
|
||||
*/
|
||||
int delPersonnel(PersonnelVo personnelVo);
|
||||
Integer delPersonnel(PersonnelVo personnelVo);
|
||||
|
||||
/**
|
||||
* 修改人员
|
||||
*/
|
||||
int updatePersonnel(PersonnelVo personnelVo);
|
||||
Integer updatePersonnel(PersonnelVo personnelVo);
|
||||
|
||||
List<SelectDto> getInspectionStationSelect(@Param("category") String category);
|
||||
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="createUser != null and createUser != ''">create_user,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="status != null and status != ''">status,</if>
|
||||
<if test="dayPlanType != null and dayPlanType != ''">day_plan_type,</if>
|
||||
</trim>
|
||||
<trim prefix="VALUES (" suffix=")" suffixOverrides=",">
|
||||
<if test="dayPlan != null and dayPlan != ''">#{dayPlan},</if>
|
||||
|
|
@ -57,6 +58,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="createUser != null and createUser != ''">#{createUser},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="status != null and status != ''">#{status},</if>
|
||||
<if test="dayPlanType != null and dayPlanType != ''">#{dayPlanType},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateDayPlan">
|
||||
|
|
@ -95,10 +97,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</delete>
|
||||
<select id="getDayPlanList" resultType="com.bonus.digital.dao.DayPlanVo">
|
||||
SELECT
|
||||
*
|
||||
tdp.*
|
||||
FROM
|
||||
tb_day_plan tdp
|
||||
LEFT JOIN tb_monthly_plan tmp ON tdp.monthly_plan_id = tmp.monthly_plan_id
|
||||
LEFT JOIN tb_plan_management tpm ON tmp.plan_management_id = tpm.plan_management_id
|
||||
WHERE
|
||||
tdp.is_active = '1'
|
||||
<if test="startTime != null and endTime != ''">
|
||||
AND DATE_FORMAT( tdp.day_plan, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime}
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
update tb_personnel
|
||||
<trim prefix="set" suffixOverrides=",">
|
||||
<if test="inspectionStationId!= null " >
|
||||
inspectionStationId=#{inspectionStationId},
|
||||
inspection_station_id = #{inspectionStationId},
|
||||
</if>
|
||||
<if test="name!= null " >
|
||||
NAME=#{name},
|
||||
|
|
@ -43,7 +43,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
update_time=#{updateTime},
|
||||
</if>
|
||||
</trim>
|
||||
where personnel_classification_id = #{personnelClassificationId}
|
||||
where id = #{id}
|
||||
</update>
|
||||
<delete id="delPersonnel">
|
||||
update tb_personnel set is_active ='0' where id = #{id}
|
||||
|
|
@ -92,6 +92,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</foreach>
|
||||
)
|
||||
</if>
|
||||
and tis.is_active = '1'
|
||||
</where>
|
||||
</select>
|
||||
<select id="getInspectionStationSelect" resultType="com.bonus.digital.dao.SelectDto">
|
||||
|
|
|
|||
Loading…
Reference in New Issue