排产增删改查
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ import com.ruoyi.common.core.domain.BaseEntity;
|
||||
/**
|
||||
* 项目排产对象 oa_report_schedule
|
||||
*
|
||||
* @author liujingchao
|
||||
* @author ruoyi
|
||||
* @date 2025-07-15
|
||||
*/
|
||||
@Data
|
||||
|
||||
@@ -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;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
|
||||
@@ -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;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
|
||||
@@ -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> {
|
||||
|
||||
@@ -12,7 +12,7 @@ import java.util.List;
|
||||
/**
|
||||
* 项目排产Service接口
|
||||
*
|
||||
* @author liujingchao
|
||||
* @author ruoyi
|
||||
* @date 2025-07-15
|
||||
*/
|
||||
public interface IOaReportScheduleService {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user