代码提交

This commit is contained in:
liang.chao 2025-12-18 18:22:27 +08:00
parent 6ee0bdbdd8
commit 85592af4e4
4 changed files with 18 additions and 13 deletions

View File

@ -12,10 +12,7 @@ import com.bonus.digital.dao.MonthlyPlanVo;
import com.bonus.digital.service.DayPlanService; import com.bonus.digital.service.DayPlanService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
@ -47,7 +44,7 @@ public class DayPlanController extends BaseController {
//新增日计划 //新增日计划
@PreAuthorize("@ss.hasPermi('day:plan:add')") @PreAuthorize("@ss.hasPermi('day:plan:add')")
@PostMapping("/addDayPlan") @PostMapping("/addDayPlan")
public AjaxResult addMonthlyPlan(DayPlanVo dayPlanVo) { public AjaxResult addMonthlyPlan(@RequestBody DayPlanVo dayPlanVo) {
try { try {
int res = dayPlanService.addMonthlyPlan(dayPlanVo); int res = dayPlanService.addMonthlyPlan(dayPlanVo);
if (res > 0) { if (res > 0) {
@ -63,7 +60,7 @@ public class DayPlanController extends BaseController {
//删除日计划 //删除日计划
@PreAuthorize("@ss.hasPermi('day:plan:del')") @PreAuthorize("@ss.hasPermi('day:plan:del')")
@PostMapping("/delDayPlan") @PostMapping("/delDayPlan")
public AjaxResult delMonthlyPlan(DayPlanVo dayPlanVo) { public AjaxResult delMonthlyPlan(@RequestBody DayPlanVo dayPlanVo) {
try { try {
int res = dayPlanService.delDayPlan(dayPlanVo); int res = dayPlanService.delDayPlan(dayPlanVo);
if (res > 0) { if (res > 0) {
@ -79,7 +76,7 @@ public class DayPlanController extends BaseController {
// 修改日计划 // 修改日计划
@PreAuthorize("@ss.hasPermi('day:plan:update')") @PreAuthorize("@ss.hasPermi('day:plan:update')")
@PostMapping("/updateDayPlan") @PostMapping("/updateDayPlan")
public AjaxResult updateMonthlyPlan(DayPlanVo dayPlanVo) { public AjaxResult updateMonthlyPlan(@RequestBody DayPlanVo dayPlanVo) {
try { try {
int res = dayPlanService.updateDayPlan(dayPlanVo); int res = dayPlanService.updateDayPlan(dayPlanVo);
if (res > 0) { if (res > 0) {

View File

@ -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); List<SelectDto> getInspectionStationSelect(@Param("category") String category);

View File

@ -31,6 +31,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createUser != null and createUser != ''">create_user,</if> <if test="createUser != null and createUser != ''">create_user,</if>
<if test="createTime != null">create_time,</if> <if test="createTime != null">create_time,</if>
<if test="status != null and status != ''">status,</if> <if test="status != null and status != ''">status,</if>
<if test="dayPlanType != null and dayPlanType != ''">day_plan_type,</if>
</trim> </trim>
<trim prefix="VALUES (" suffix=")" suffixOverrides=","> <trim prefix="VALUES (" suffix=")" suffixOverrides=",">
<if test="dayPlan != null and dayPlan != ''">#{dayPlan},</if> <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="createUser != null and createUser != ''">#{createUser},</if>
<if test="createTime != null">#{createTime},</if> <if test="createTime != null">#{createTime},</if>
<if test="status != null and status != ''">#{status},</if> <if test="status != null and status != ''">#{status},</if>
<if test="dayPlanType != null and dayPlanType != ''">#{dayPlanType},</if>
</trim> </trim>
</insert> </insert>
<update id="updateDayPlan"> <update id="updateDayPlan">
@ -95,10 +97,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete> </delete>
<select id="getDayPlanList" resultType="com.bonus.digital.dao.DayPlanVo"> <select id="getDayPlanList" resultType="com.bonus.digital.dao.DayPlanVo">
SELECT SELECT
* tdp.*
FROM FROM
tb_day_plan tdp tb_day_plan tdp
LEFT JOIN tb_monthly_plan tmp ON tdp.monthly_plan_id = tmp.monthly_plan_id 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 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> </select>
</mapper> </mapper>

View File

@ -13,7 +13,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update tb_personnel update tb_personnel
<trim prefix="set" suffixOverrides=","> <trim prefix="set" suffixOverrides=",">
<if test="inspectionStationId!= null " > <if test="inspectionStationId!= null " >
inspectionStationId=#{inspectionStationId}, inspection_station_id = #{inspectionStationId},
</if> </if>
<if test="name!= null " > <if test="name!= null " >
NAME=#{name}, NAME=#{name},
@ -43,7 +43,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update_time=#{updateTime}, update_time=#{updateTime},
</if> </if>
</trim> </trim>
where personnel_classification_id = #{personnelClassificationId} where id = #{id}
</update> </update>
<delete id="delPersonnel"> <delete id="delPersonnel">
update tb_personnel set is_active ='0' where id = #{id} update tb_personnel set is_active ='0' where id = #{id}
@ -92,6 +92,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach> </foreach>
) )
</if> </if>
and tis.is_active = '1'
</where> </where>
</select> </select>
<select id="getInspectionStationSelect" resultType="com.bonus.digital.dao.SelectDto"> <select id="getInspectionStationSelect" resultType="com.bonus.digital.dao.SelectDto">