Commit f54e936d authored by hanbing's avatar hanbing

[add] 快速特勤,删除分组

parent 952d7121
package net.wanji.web.bo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author Kent HAN
* @date 2023/5/17 13:36
*/
@Data
public class GroupNameBO {
@ApiModelProperty(value = "特勤ID")
Integer specialServiceId;
@ApiModelProperty(value = "分组名称")
private String groupName;
}
...@@ -157,6 +157,16 @@ public class SpecialServiceController { ...@@ -157,6 +157,16 @@ public class SpecialServiceController {
return JsonViewObject.newInstance().success(); return JsonViewObject.newInstance().success();
} }
@AspectLog(description = "删除分组", operationType = BaseEnum.OperationTypeEnum.UPDATE)
@ApiOperation(value = "删除分组", notes = "删除分组", response = JsonViewObject.class,
produces = MediaType.APPLICATION_JSON, consumes = MediaType.APPLICATION_JSON)
@PostMapping(value = "/deleteGroup",
produces = MediaType.APPLICATION_JSON, consumes = MediaType.APPLICATION_JSON)
public JsonViewObject deleteGroup(@RequestBody GroupNameBO groupNameBO) {
specialServiceService.deleteGroup(groupNameBO);
return JsonViewObject.newInstance().success();
}
@AspectLog(description = "更新路口", operationType = BaseEnum.OperationTypeEnum.UPDATE) @AspectLog(description = "更新路口", operationType = BaseEnum.OperationTypeEnum.UPDATE)
@ApiOperation(value = "更新路口", notes = "更新路口", response = JsonViewObject.class, @ApiOperation(value = "更新路口", notes = "更新路口", response = JsonViewObject.class,
produces = MediaType.APPLICATION_JSON, consumes = MediaType.APPLICATION_JSON) produces = MediaType.APPLICATION_JSON, consumes = MediaType.APPLICATION_JSON)
......
...@@ -48,4 +48,6 @@ public interface SpecialServiceCrossMapper { ...@@ -48,4 +48,6 @@ public interface SpecialServiceCrossMapper {
Integer selectSpecialServiceIdByCrossId(String crossId); Integer selectSpecialServiceIdByCrossId(String crossId);
void updateGroupName(String crossId, String groupName); void updateGroupName(String crossId, String groupName);
void deleteGroup(Integer specialServiceId, String groupName);
} }
...@@ -44,4 +44,6 @@ public interface SpecialServiceService { ...@@ -44,4 +44,6 @@ public interface SpecialServiceService {
GroupListVO groupList(SpecialServiceIdBO specialServiceIdBO); GroupListVO groupList(SpecialServiceIdBO specialServiceIdBO);
void updateGroup(GroupListVO groupListVO); void updateGroup(GroupListVO groupListVO);
void deleteGroup(GroupNameBO groupNameBO);
} }
...@@ -695,6 +695,14 @@ public class SpecialServiceServiceImpl implements SpecialServiceService { ...@@ -695,6 +695,14 @@ public class SpecialServiceServiceImpl implements SpecialServiceService {
} }
} }
@Override
@Transactional
public void deleteGroup(GroupNameBO groupNameBO) {
Integer specialServiceId = groupNameBO.getSpecialServiceId();
String groupName = groupNameBO.getGroupName();
specialServiceCrossMapper.deleteGroup(specialServiceId, groupName);
}
private List<GroupListVO.GroupListElement> buildGroupList(SpecialServicePO specialServicePO) { private List<GroupListVO.GroupListElement> buildGroupList(SpecialServicePO specialServicePO) {
List<GroupListVO.GroupListElement> groupList = new ArrayList<>(); List<GroupListVO.GroupListElement> groupList = new ArrayList<>();
......
...@@ -72,6 +72,12 @@ ...@@ -72,6 +72,12 @@
where special_service_id = #{id} where special_service_id = #{id}
</delete> </delete>
<delete id="deleteGroup">
update t_special_service_cross
set group_name = '未分组路口'
where special_service_id = #{specialServiceId} and group_name = #{groupName}
</delete>
<select id="getMaxSort" resultType="java.lang.Integer"> <select id="getMaxSort" resultType="java.lang.Integer">
select max(sort) select max(sort)
from t_special_service_cross from t_special_service_cross
......
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