diff --git a/logs/springboot-logback/info/2023-04-08-0.log.gz b/logs/springboot-logback/info/2023-04-08-0.log.gz new file mode 100644 index 0000000..7e9b4fa Binary files /dev/null and b/logs/springboot-logback/info/2023-04-08-0.log.gz differ diff --git a/src/main/java/com/laowu/controller/WorkstationAloneMappingController.java b/src/main/java/com/laowu/controller/WorkstationAloneMappingController.java new file mode 100644 index 0000000..36a2873 --- /dev/null +++ b/src/main/java/com/laowu/controller/WorkstationAloneMappingController.java @@ -0,0 +1,59 @@ +package com.laowu.controller; + + +import com.laowu.dto.station.RequiresDTO; +import com.laowu.dto.station.ShareDTO; +import com.laowu.model.WorkstationAloneMappingDO; +import com.laowu.service.WorkstationAloneMappingService; +import com.laowu.util.ResponseData; +import com.laowu.util.ResponseVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + *
+ * 职位需求工作站映射表 前端控制器 + *
+ * + * @author Tuyp + * @since 2023-03-30 + */ +@RestController +@Api(tags = "独立需求工作站映射表") +@RequestMapping("/workstationAloneMapping") +public class WorkstationAloneMappingController { + + @Autowired + private WorkstationAloneMappingService workstationAloneMappingService; + + @PostMapping("requires") + @ApiOperation("查看某个工作站的项目用工需求 stationId 工作站id pageSize pageNum itemStatus province city county positionId itemName ") + public ResponseVO requires(@RequestBody RequiresDTO requiresDTO){ + return ResponseData.generateCreatedResponse(0,workstationAloneMappingService.requires(requiresDTO)); + } + + @PostMapping("deleteRequire") + @ApiOperation("删除需求 stationId aloneId 需求id") + public ResponseVO deleteRequire(@RequestBody WorkstationAloneMappingDO workstationAloneMappingDO){ + return ResponseData.generateCreatedResponse(0,workstationAloneMappingService.deleteRequire(workstationAloneMappingDO)); + } + + @PostMapping("share") + @ApiOperation("分配工作站 stationIds requireIds ") + public ResponseVO share(@RequestBody ShareDTO shareDTO){ + return ResponseData.generateCreatedResponse(0,workstationAloneMappingService.share(shareDTO)); + } + + @PostMapping("requireStations") + @ApiOperation("查看需求已经在哪些工作站 aloneId") + public ResponseVO requireStations(@RequestBody WorkstationAloneMappingDO workstationAloneMappingDO){ + return ResponseData.generateCreatedResponse(0,workstationAloneMappingService.requireStations(workstationAloneMappingDO)); + } + + +} diff --git a/src/main/java/com/laowu/mapper/WorkstationAloneMappingMapper.java b/src/main/java/com/laowu/mapper/WorkstationAloneMappingMapper.java new file mode 100644 index 0000000..00e855c --- /dev/null +++ b/src/main/java/com/laowu/mapper/WorkstationAloneMappingMapper.java @@ -0,0 +1,38 @@ +package com.laowu.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.laowu.model.WorkstationAloneMappingDO; +import com.laowu.vo.position.AloneRequirementsVO; +import com.laowu.vo.position.AloneWorkVO; +import org.springframework.stereotype.Repository; + +import java.util.List; + +/** + *+ * 职位需求工作站映射表 Mapper 接口 + *
+ * + * @author Tuyp + * @since 2023-03-30 + */ +@Repository +public interface WorkstationAloneMappingMapper extends BaseMapper+ * 职位需求工作站映射表 + *
+ * + * @author Tuyp + * @since 2023-03-30 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("workstation_alone_mapping") +public class WorkstationAloneMappingDO extends BaseModel { + + private static final long serialVersionUID = 1L; + + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + /** + * 工作站id + */ + private Long stationId; + + /** + * 独立用用工需求id + */ + private Long aloneId; + + +} diff --git a/src/main/java/com/laowu/service/WorkstationAloneMappingService.java b/src/main/java/com/laowu/service/WorkstationAloneMappingService.java new file mode 100644 index 0000000..2e4b63a --- /dev/null +++ b/src/main/java/com/laowu/service/WorkstationAloneMappingService.java @@ -0,0 +1,29 @@ +package com.laowu.service; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.service.IService; +import com.laowu.dto.station.RequiresDTO; +import com.laowu.dto.station.ShareDTO; +import com.laowu.model.WorkstationAloneMappingDO; +import com.laowu.vo.position.AloneRequirementsVO; +import com.laowu.vo.station.RequireStationsVO; + +/** + *+ * 职位需求工作站映射表 服务类 + *
+ * + * @author Tuyp + * @since 2023-03-30 + */ +public interface WorkstationAloneMappingService extends IService
@@ -53,13 +55,23 @@ public class PositionRequireItemServiceImpl extends ServiceImpl
+ * 职位需求工作站映射表 服务实现类
+ *