排产增删改查

This commit is contained in:
2025-07-15 16:14:56 +08:00
parent b717b07049
commit 6b53156e1e
8 changed files with 39 additions and 10 deletions

View File

@@ -27,7 +27,7 @@ import com.ruoyi.common.core.page.TableDataInfo;
/**
* 项目排产
*
* @author liujingchao
* @author ruoyi
* @date 2025-07-15
*/
@Validated
@@ -63,7 +63,7 @@ public class OaReportScheduleController extends BaseController {
*/
@GetMapping("/{scheduleId}")
public R<OaReportScheduleVo> getInfo(@NotNull(message = "主键不能为空")
@PathVariable Long scheduleId) {
@PathVariable Long scheduleId) {
return R.ok(iOaReportScheduleService.queryById(scheduleId));
}

View File

@@ -14,7 +14,7 @@ import com.ruoyi.common.core.domain.BaseEntity;
/**
* 项目排产对象 oa_report_schedule
*
* @author liujingchao
* @author ruoyi
* @date 2025-07-15
*/
@Data

View File

@@ -15,7 +15,7 @@ import com.ruoyi.common.core.domain.BaseEntity;
/**
* 项目排产业务对象 oa_report_schedule
*
* @author liujingchao
* @author ruoyi
* @date 2025-07-15
*/
@@ -23,6 +23,11 @@ import com.ruoyi.common.core.domain.BaseEntity;
@EqualsAndHashCode(callSuper = true)
public class OaReportScheduleBo extends BaseEntity {
/**
* 主键ID
*/
private Long scheduleId;
/**
* 项目ID
*/
@@ -83,6 +88,11 @@ public class OaReportScheduleBo extends BaseEntity {
*/
private String accessory;
/**
* 排序
*/
private Long sort;
/**
* 状态
*/

View File

@@ -14,7 +14,7 @@ import java.util.Date;
/**
* 项目排产视图对象 oa_report_schedule
*
* @author liujingchao
* @author ruoyi
* @date 2025-07-15
*/
@Data
@@ -23,6 +23,12 @@ public class OaReportScheduleVo {
private static final long serialVersionUID = 1L;
/**
* 主键ID
*/
@ExcelProperty(value = "主键ID")
private Long scheduleId;
/**
* 项目ID
*/
@@ -97,6 +103,12 @@ public class OaReportScheduleVo {
@ExcelProperty(value = "OSS附件ID列表多个ID用逗号分隔")
private String accessory;
/**
* 排序
*/
@ExcelProperty(value = "排序")
private Long sort;
/**
* 状态
*/

View File

@@ -7,7 +7,7 @@ import com.ruoyi.common.core.mapper.BaseMapperPlus;
/**
* 项目排产Mapper接口
*
* @author liujingchao
* @author ruoyi
* @date 2025-07-15
*/
public interface OaReportScheduleMapper extends BaseMapperPlus<OaReportScheduleMapper, OaReportSchedule, OaReportScheduleVo> {

View File

@@ -12,7 +12,7 @@ import java.util.List;
/**
* 项目排产Service接口
*
* @author liujingchao
* @author ruoyi
* @date 2025-07-15
*/
public interface IOaReportScheduleService {

View File

@@ -22,7 +22,7 @@ import java.util.Collection;
/**
* 项目排产Service业务层处理
*
* @author liujingchao
* @author ruoyi
* @date 2025-07-15
*/
@RequiredArgsConstructor
@@ -70,6 +70,10 @@ public class OaReportScheduleServiceImpl implements IOaReportScheduleService {
lqw.eq(StringUtils.isNotBlank(bo.getHeader()), OaReportSchedule::getHeader, bo.getHeader());
lqw.eq(StringUtils.isNotBlank(bo.getContactPhone()), OaReportSchedule::getContactPhone, bo.getContactPhone());
lqw.eq(bo.getDeliveryStatus() != null, OaReportSchedule::getDeliveryStatus, bo.getDeliveryStatus());
lqw.eq(bo.getDeliveryId() != null, OaReportSchedule::getDeliveryId, bo.getDeliveryId());
lqw.eq(bo.getDeliveryTime() != null, OaReportSchedule::getDeliveryTime, bo.getDeliveryTime());
lqw.eq(StringUtils.isNotBlank(bo.getAccessory()), OaReportSchedule::getAccessory, bo.getAccessory());
lqw.eq(bo.getSort() != null, OaReportSchedule::getSort, bo.getSort());
lqw.eq(bo.getStatus() != null, OaReportSchedule::getStatus, bo.getStatus());
return lqw;
}
@@ -82,6 +86,9 @@ public class OaReportScheduleServiceImpl implements IOaReportScheduleService {
OaReportSchedule add = BeanUtil.toBean(bo, OaReportSchedule.class);
validEntityBeforeSave(add);
boolean flag = baseMapper.insert(add) > 0;
if (flag) {
bo.setScheduleId(add.getScheduleId());
}
return flag;
}

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.oa.mapper.OaReportScheduleMapper">
<resultMap type="com.ruoyi.oa.domain.OaReportSchedule" id="OaReportScheduleResult">