重构scrap
This commit is contained in:
parent
487aa7bf90
commit
c8dd5dc2d1
|
|
@ -28,13 +28,12 @@ import com.bonus.common.core.web.page.TableDataInfo;
|
|||
* 报废任务详细Controller
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2024-09-27
|
||||
* @date 2024-10-16
|
||||
*/
|
||||
@Api(tags = "报废任务详细接口")
|
||||
@RestController
|
||||
@RequestMapping("/scrap_apply_details")
|
||||
public class ScrapApplyDetailsController extends BaseController
|
||||
{
|
||||
public class ScrapApplyDetailsController extends BaseController {
|
||||
@Autowired
|
||||
private IScrapApplyDetailsService scrapApplyDetailsService;
|
||||
|
||||
|
|
@ -44,8 +43,7 @@ public class ScrapApplyDetailsController extends BaseController
|
|||
@ApiOperation(value = "查询报废任务详细列表")
|
||||
@RequiresPermissions("scrap:details:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ScrapApplyDetails scrapApplyDetails)
|
||||
{
|
||||
public TableDataInfo list(ScrapApplyDetails scrapApplyDetails) {
|
||||
startPage();
|
||||
List<ScrapApplyDetails> list = scrapApplyDetailsService.selectScrapApplyDetailsList(scrapApplyDetails);
|
||||
return getDataTable(list);
|
||||
|
|
@ -59,8 +57,7 @@ public class ScrapApplyDetailsController extends BaseController
|
|||
@RequiresPermissions("scrap:details:export")
|
||||
@SysLog(title = "报废任务详细", businessType = OperaType.EXPORT, logType = 1,module = "仓储管理->导出报废任务详细")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, ScrapApplyDetails scrapApplyDetails)
|
||||
{
|
||||
public void export(HttpServletResponse response, ScrapApplyDetails scrapApplyDetails) {
|
||||
List<ScrapApplyDetails> list = scrapApplyDetailsService.selectScrapApplyDetailsList(scrapApplyDetails);
|
||||
ExcelUtil<ScrapApplyDetails> util = new ExcelUtil<ScrapApplyDetails>(ScrapApplyDetails.class);
|
||||
util.exportExcel(response, list, "报废任务详细数据");
|
||||
|
|
@ -72,8 +69,7 @@ public class ScrapApplyDetailsController extends BaseController
|
|||
@ApiOperation(value = "获取报废任务详细详细信息")
|
||||
@RequiresPermissions("scrap:details:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
return success(scrapApplyDetailsService.selectScrapApplyDetailsById(id));
|
||||
}
|
||||
|
||||
|
|
@ -85,9 +81,12 @@ public class ScrapApplyDetailsController extends BaseController
|
|||
@RequiresPermissions("scrap:details:add")
|
||||
@SysLog(title = "报废任务详细", businessType = OperaType.INSERT, logType = 1,module = "仓储管理->新增报废任务详细")
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody ScrapApplyDetails scrapApplyDetails)
|
||||
{
|
||||
public AjaxResult add(@RequestBody ScrapApplyDetails scrapApplyDetails) {
|
||||
try {
|
||||
return toAjax(scrapApplyDetailsService.insertScrapApplyDetails(scrapApplyDetails));
|
||||
} catch (Exception e) {
|
||||
return error("系统错误, " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -98,9 +97,12 @@ public class ScrapApplyDetailsController extends BaseController
|
|||
@RequiresPermissions("scrap:details:edit")
|
||||
@SysLog(title = "报废任务详细", businessType = OperaType.UPDATE, logType = 1,module = "仓储管理->修改报废任务详细")
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody ScrapApplyDetails scrapApplyDetails)
|
||||
{
|
||||
public AjaxResult edit(@RequestBody ScrapApplyDetails scrapApplyDetails) {
|
||||
try {
|
||||
return toAjax(scrapApplyDetailsService.updateScrapApplyDetails(scrapApplyDetails));
|
||||
} catch (Exception e) {
|
||||
return error("系统错误, " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -111,8 +113,7 @@ public class ScrapApplyDetailsController extends BaseController
|
|||
@RequiresPermissions("scrap:details:remove")
|
||||
@SysLog(title = "报废任务详细", businessType = OperaType.DELETE, logType = 1,module = "仓储管理->删除报废任务详细")
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(scrapApplyDetailsService.deleteScrapApplyDetailsByIds(ids));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,13 +28,12 @@ import com.bonus.common.core.web.page.TableDataInfo;
|
|||
* 报废审核人员配置Controller
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2024-09-27
|
||||
* @date 2024-10-16
|
||||
*/
|
||||
@Api(tags = "报废审核人员配置接口")
|
||||
@RestController
|
||||
@RequestMapping("/scrap_auditor_set")
|
||||
public class ScrapAuditorSetController extends BaseController
|
||||
{
|
||||
public class ScrapAuditorSetController extends BaseController {
|
||||
@Autowired
|
||||
private IScrapAuditorSetService scrapAuditorSetService;
|
||||
|
||||
|
|
@ -44,8 +43,7 @@ public class ScrapAuditorSetController extends BaseController
|
|||
@ApiOperation(value = "查询报废审核人员配置列表")
|
||||
@RequiresPermissions("scrap:set:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ScrapAuditorSet scrapAuditorSet)
|
||||
{
|
||||
public TableDataInfo list(ScrapAuditorSet scrapAuditorSet) {
|
||||
startPage();
|
||||
List<ScrapAuditorSet> list = scrapAuditorSetService.selectScrapAuditorSetList(scrapAuditorSet);
|
||||
return getDataTable(list);
|
||||
|
|
@ -59,8 +57,7 @@ public class ScrapAuditorSetController extends BaseController
|
|||
@RequiresPermissions("scrap:set:export")
|
||||
@SysLog(title = "报废审核人员配置", businessType = OperaType.EXPORT, logType = 1,module = "仓储管理->导出报废审核人员配置")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, ScrapAuditorSet scrapAuditorSet)
|
||||
{
|
||||
public void export(HttpServletResponse response, ScrapAuditorSet scrapAuditorSet) {
|
||||
List<ScrapAuditorSet> list = scrapAuditorSetService.selectScrapAuditorSetList(scrapAuditorSet);
|
||||
ExcelUtil<ScrapAuditorSet> util = new ExcelUtil<ScrapAuditorSet>(ScrapAuditorSet.class);
|
||||
util.exportExcel(response, list, "报废审核人员配置数据");
|
||||
|
|
@ -72,8 +69,7 @@ public class ScrapAuditorSetController extends BaseController
|
|||
@ApiOperation(value = "获取报废审核人员配置详细信息")
|
||||
@RequiresPermissions("scrap:set:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
return success(scrapAuditorSetService.selectScrapAuditorSetById(id));
|
||||
}
|
||||
|
||||
|
|
@ -85,9 +81,12 @@ public class ScrapAuditorSetController extends BaseController
|
|||
@RequiresPermissions("scrap:set:add")
|
||||
@SysLog(title = "报废审核人员配置", businessType = OperaType.INSERT, logType = 1,module = "仓储管理->新增报废审核人员配置")
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody ScrapAuditorSet scrapAuditorSet)
|
||||
{
|
||||
public AjaxResult add(@RequestBody ScrapAuditorSet scrapAuditorSet) {
|
||||
try {
|
||||
return toAjax(scrapAuditorSetService.insertScrapAuditorSet(scrapAuditorSet));
|
||||
} catch (Exception e) {
|
||||
return error("系统错误, " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -98,9 +97,12 @@ public class ScrapAuditorSetController extends BaseController
|
|||
@RequiresPermissions("scrap:set:edit")
|
||||
@SysLog(title = "报废审核人员配置", businessType = OperaType.UPDATE, logType = 1,module = "仓储管理->修改报废审核人员配置")
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody ScrapAuditorSet scrapAuditorSet)
|
||||
{
|
||||
public AjaxResult edit(@RequestBody ScrapAuditorSet scrapAuditorSet) {
|
||||
try {
|
||||
return toAjax(scrapAuditorSetService.updateScrapAuditorSet(scrapAuditorSet));
|
||||
} catch (Exception e) {
|
||||
return error("系统错误, " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -111,8 +113,7 @@ public class ScrapAuditorSetController extends BaseController
|
|||
@RequiresPermissions("scrap:set:remove")
|
||||
@SysLog(title = "报废审核人员配置", businessType = OperaType.DELETE, logType = 1,module = "仓储管理->删除报废审核人员配置")
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(scrapAuditorSetService.deleteScrapAuditorSetByIds(ids));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,14 +12,13 @@ import com.bonus.common.core.web.domain.BaseEntity;
|
|||
* 报废任务详细对象 scrap_apply_details
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2024-09-27
|
||||
* @date 2024-10-16
|
||||
*/
|
||||
|
||||
|
||||
@Data
|
||||
@ToString
|
||||
public class ScrapApplyDetails extends BaseEntity
|
||||
{
|
||||
public class ScrapApplyDetails extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** id */
|
||||
|
|
|
|||
|
|
@ -12,14 +12,13 @@ import com.bonus.common.core.web.domain.BaseEntity;
|
|||
* 报废审核人员配置对象 scrap_auditor_set
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2024-09-27
|
||||
* @date 2024-10-16
|
||||
*/
|
||||
|
||||
|
||||
@Data
|
||||
@ToString
|
||||
public class ScrapAuditorSet extends BaseEntity
|
||||
{
|
||||
public class ScrapAuditorSet extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** ID */
|
||||
|
|
|
|||
|
|
@ -7,10 +7,9 @@ import com.bonus.material.scrap.domain.ScrapApplyDetails;
|
|||
* 报废任务详细Mapper接口
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2024-09-27
|
||||
* @date 2024-10-16
|
||||
*/
|
||||
public interface ScrapApplyDetailsMapper
|
||||
{
|
||||
public interface ScrapApplyDetailsMapper {
|
||||
/**
|
||||
* 查询报废任务详细
|
||||
*
|
||||
|
|
|
|||
|
|
@ -7,10 +7,9 @@ import com.bonus.material.scrap.domain.ScrapAuditorSet;
|
|||
* 报废审核人员配置Mapper接口
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2024-09-27
|
||||
* @date 2024-10-16
|
||||
*/
|
||||
public interface ScrapAuditorSetMapper
|
||||
{
|
||||
public interface ScrapAuditorSetMapper {
|
||||
/**
|
||||
* 查询报废审核人员配置
|
||||
*
|
||||
|
|
|
|||
|
|
@ -7,10 +7,9 @@ import com.bonus.material.scrap.domain.ScrapApplyDetails;
|
|||
* 报废任务详细Service接口
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2024-09-27
|
||||
* @date 2024-10-16
|
||||
*/
|
||||
public interface IScrapApplyDetailsService
|
||||
{
|
||||
public interface IScrapApplyDetailsService {
|
||||
/**
|
||||
* 查询报废任务详细
|
||||
*
|
||||
|
|
|
|||
|
|
@ -7,10 +7,9 @@ import com.bonus.material.scrap.domain.ScrapAuditorSet;
|
|||
* 报废审核人员配置Service接口
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2024-09-27
|
||||
* @date 2024-10-16
|
||||
*/
|
||||
public interface IScrapAuditorSetService
|
||||
{
|
||||
public interface IScrapAuditorSetService {
|
||||
/**
|
||||
* 查询报废审核人员配置
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.bonus.material.scrap.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.bonus.common.core.exception.ServiceException;
|
||||
import com.bonus.common.core.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
|
@ -12,11 +13,10 @@ import com.bonus.material.scrap.service.IScrapApplyDetailsService;
|
|||
* 报废任务详细Service业务层处理
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2024-09-27
|
||||
* @date 2024-10-16
|
||||
*/
|
||||
@Service
|
||||
public class ScrapApplyDetailsServiceImpl implements IScrapApplyDetailsService
|
||||
{
|
||||
public class ScrapApplyDetailsServiceImpl implements IScrapApplyDetailsService {
|
||||
@Autowired
|
||||
private ScrapApplyDetailsMapper scrapApplyDetailsMapper;
|
||||
|
||||
|
|
@ -27,8 +27,7 @@ public class ScrapApplyDetailsServiceImpl implements IScrapApplyDetailsService
|
|||
* @return 报废任务详细
|
||||
*/
|
||||
@Override
|
||||
public ScrapApplyDetails selectScrapApplyDetailsById(Long id)
|
||||
{
|
||||
public ScrapApplyDetails selectScrapApplyDetailsById(Long id) {
|
||||
return scrapApplyDetailsMapper.selectScrapApplyDetailsById(id);
|
||||
}
|
||||
|
||||
|
|
@ -39,8 +38,7 @@ public class ScrapApplyDetailsServiceImpl implements IScrapApplyDetailsService
|
|||
* @return 报废任务详细
|
||||
*/
|
||||
@Override
|
||||
public List<ScrapApplyDetails> selectScrapApplyDetailsList(ScrapApplyDetails scrapApplyDetails)
|
||||
{
|
||||
public List<ScrapApplyDetails> selectScrapApplyDetailsList(ScrapApplyDetails scrapApplyDetails) {
|
||||
return scrapApplyDetailsMapper.selectScrapApplyDetailsList(scrapApplyDetails);
|
||||
}
|
||||
|
||||
|
|
@ -51,10 +49,13 @@ public class ScrapApplyDetailsServiceImpl implements IScrapApplyDetailsService
|
|||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertScrapApplyDetails(ScrapApplyDetails scrapApplyDetails)
|
||||
{
|
||||
public int insertScrapApplyDetails(ScrapApplyDetails scrapApplyDetails) {
|
||||
scrapApplyDetails.setCreateTime(DateUtils.getNowDate());
|
||||
try {
|
||||
return scrapApplyDetailsMapper.insertScrapApplyDetails(scrapApplyDetails);
|
||||
} catch (Exception e) {
|
||||
throw new ServiceException("错误信息描述");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -64,10 +65,13 @@ public class ScrapApplyDetailsServiceImpl implements IScrapApplyDetailsService
|
|||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateScrapApplyDetails(ScrapApplyDetails scrapApplyDetails)
|
||||
{
|
||||
public int updateScrapApplyDetails(ScrapApplyDetails scrapApplyDetails) {
|
||||
scrapApplyDetails.setUpdateTime(DateUtils.getNowDate());
|
||||
try {
|
||||
return scrapApplyDetailsMapper.updateScrapApplyDetails(scrapApplyDetails);
|
||||
} catch (Exception e) {
|
||||
throw new ServiceException("错误信息描述");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -77,8 +81,7 @@ public class ScrapApplyDetailsServiceImpl implements IScrapApplyDetailsService
|
|||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteScrapApplyDetailsByIds(Long[] ids)
|
||||
{
|
||||
public int deleteScrapApplyDetailsByIds(Long[] ids) {
|
||||
return scrapApplyDetailsMapper.deleteScrapApplyDetailsByIds(ids);
|
||||
}
|
||||
|
||||
|
|
@ -89,8 +92,7 @@ public class ScrapApplyDetailsServiceImpl implements IScrapApplyDetailsService
|
|||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteScrapApplyDetailsById(Long id)
|
||||
{
|
||||
public int deleteScrapApplyDetailsById(Long id) {
|
||||
return scrapApplyDetailsMapper.deleteScrapApplyDetailsById(id);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.bonus.material.scrap.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.bonus.common.core.exception.ServiceException;
|
||||
import com.bonus.common.core.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
|
@ -12,11 +13,10 @@ import com.bonus.material.scrap.service.IScrapAuditorSetService;
|
|||
* 报废审核人员配置Service业务层处理
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2024-09-27
|
||||
* @date 2024-10-16
|
||||
*/
|
||||
@Service
|
||||
public class ScrapAuditorSetServiceImpl implements IScrapAuditorSetService
|
||||
{
|
||||
public class ScrapAuditorSetServiceImpl implements IScrapAuditorSetService {
|
||||
@Autowired
|
||||
private ScrapAuditorSetMapper scrapAuditorSetMapper;
|
||||
|
||||
|
|
@ -27,8 +27,7 @@ public class ScrapAuditorSetServiceImpl implements IScrapAuditorSetService
|
|||
* @return 报废审核人员配置
|
||||
*/
|
||||
@Override
|
||||
public ScrapAuditorSet selectScrapAuditorSetById(Long id)
|
||||
{
|
||||
public ScrapAuditorSet selectScrapAuditorSetById(Long id) {
|
||||
return scrapAuditorSetMapper.selectScrapAuditorSetById(id);
|
||||
}
|
||||
|
||||
|
|
@ -39,8 +38,7 @@ public class ScrapAuditorSetServiceImpl implements IScrapAuditorSetService
|
|||
* @return 报废审核人员配置
|
||||
*/
|
||||
@Override
|
||||
public List<ScrapAuditorSet> selectScrapAuditorSetList(ScrapAuditorSet scrapAuditorSet)
|
||||
{
|
||||
public List<ScrapAuditorSet> selectScrapAuditorSetList(ScrapAuditorSet scrapAuditorSet) {
|
||||
return scrapAuditorSetMapper.selectScrapAuditorSetList(scrapAuditorSet);
|
||||
}
|
||||
|
||||
|
|
@ -51,10 +49,13 @@ public class ScrapAuditorSetServiceImpl implements IScrapAuditorSetService
|
|||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertScrapAuditorSet(ScrapAuditorSet scrapAuditorSet)
|
||||
{
|
||||
public int insertScrapAuditorSet(ScrapAuditorSet scrapAuditorSet) {
|
||||
scrapAuditorSet.setCreateTime(DateUtils.getNowDate());
|
||||
try {
|
||||
return scrapAuditorSetMapper.insertScrapAuditorSet(scrapAuditorSet);
|
||||
} catch (Exception e) {
|
||||
throw new ServiceException("错误信息描述");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -64,10 +65,13 @@ public class ScrapAuditorSetServiceImpl implements IScrapAuditorSetService
|
|||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateScrapAuditorSet(ScrapAuditorSet scrapAuditorSet)
|
||||
{
|
||||
public int updateScrapAuditorSet(ScrapAuditorSet scrapAuditorSet) {
|
||||
scrapAuditorSet.setUpdateTime(DateUtils.getNowDate());
|
||||
try {
|
||||
return scrapAuditorSetMapper.updateScrapAuditorSet(scrapAuditorSet);
|
||||
} catch (Exception e) {
|
||||
throw new ServiceException("错误信息描述");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -77,8 +81,7 @@ public class ScrapAuditorSetServiceImpl implements IScrapAuditorSetService
|
|||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteScrapAuditorSetByIds(Long[] ids)
|
||||
{
|
||||
public int deleteScrapAuditorSetByIds(Long[] ids) {
|
||||
return scrapAuditorSetMapper.deleteScrapAuditorSetByIds(ids);
|
||||
}
|
||||
|
||||
|
|
@ -89,8 +92,7 @@ public class ScrapAuditorSetServiceImpl implements IScrapAuditorSetService
|
|||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteScrapAuditorSetById(Long id)
|
||||
{
|
||||
public int deleteScrapAuditorSetById(Long id) {
|
||||
return scrapAuditorSetMapper.deleteScrapAuditorSetById(id);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue