重构input
This commit is contained in:
parent
a7eb631c35
commit
2db458e227
|
|
@ -28,13 +28,12 @@ import com.bonus.common.core.web.page.TableDataInfo;
|
|||
* 入库任务详细Controller
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2024-09-26
|
||||
* @date 2024-10-16
|
||||
*/
|
||||
@Api(tags = "入库任务详细接口")
|
||||
@RestController
|
||||
@RequestMapping("/input_apply_details")
|
||||
public class InputApplyDetailsController extends BaseController
|
||||
{
|
||||
public class InputApplyDetailsController extends BaseController {
|
||||
@Autowired
|
||||
private IInputApplyDetailsService inputApplyDetailsService;
|
||||
|
||||
|
|
@ -44,8 +43,7 @@ public class InputApplyDetailsController extends BaseController
|
|||
@ApiOperation(value = "查询入库任务详细列表")
|
||||
@RequiresPermissions("input:details:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(InputApplyDetails inputApplyDetails)
|
||||
{
|
||||
public TableDataInfo list(InputApplyDetails inputApplyDetails) {
|
||||
startPage();
|
||||
List<InputApplyDetails> list = inputApplyDetailsService.selectInputApplyDetailsList(inputApplyDetails);
|
||||
return getDataTable(list);
|
||||
|
|
@ -59,8 +57,7 @@ public class InputApplyDetailsController extends BaseController
|
|||
@RequiresPermissions("input:details:export")
|
||||
@SysLog(title = "入库任务详细", businessType = OperaType.EXPORT, logType = 1,module = "仓储管理->导出入库任务详细")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, InputApplyDetails inputApplyDetails)
|
||||
{
|
||||
public void export(HttpServletResponse response, InputApplyDetails inputApplyDetails) {
|
||||
List<InputApplyDetails> list = inputApplyDetailsService.selectInputApplyDetailsList(inputApplyDetails);
|
||||
ExcelUtil<InputApplyDetails> util = new ExcelUtil<InputApplyDetails>(InputApplyDetails.class);
|
||||
util.exportExcel(response, list, "入库任务详细数据");
|
||||
|
|
@ -72,8 +69,7 @@ public class InputApplyDetailsController extends BaseController
|
|||
@ApiOperation(value = "获取入库任务详细详细信息")
|
||||
@RequiresPermissions("input:details:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
return success(inputApplyDetailsService.selectInputApplyDetailsById(id));
|
||||
}
|
||||
|
||||
|
|
@ -85,9 +81,12 @@ public class InputApplyDetailsController extends BaseController
|
|||
@RequiresPermissions("input:details:add")
|
||||
@SysLog(title = "入库任务详细", businessType = OperaType.INSERT, logType = 1,module = "仓储管理->新增入库任务详细")
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody InputApplyDetails inputApplyDetails)
|
||||
{
|
||||
return toAjax(inputApplyDetailsService.insertInputApplyDetails(inputApplyDetails));
|
||||
public AjaxResult add(@RequestBody InputApplyDetails inputApplyDetails) {
|
||||
try {
|
||||
return toAjax(inputApplyDetailsService.insertInputApplyDetails(inputApplyDetails));
|
||||
} catch (Exception e) {
|
||||
return error("系统错误, " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -98,9 +97,12 @@ public class InputApplyDetailsController extends BaseController
|
|||
@RequiresPermissions("input:details:edit")
|
||||
@SysLog(title = "入库任务详细", businessType = OperaType.UPDATE, logType = 1,module = "仓储管理->修改入库任务详细")
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody InputApplyDetails inputApplyDetails)
|
||||
{
|
||||
return toAjax(inputApplyDetailsService.updateInputApplyDetails(inputApplyDetails));
|
||||
public AjaxResult edit(@RequestBody InputApplyDetails inputApplyDetails) {
|
||||
try {
|
||||
return toAjax(inputApplyDetailsService.updateInputApplyDetails(inputApplyDetails));
|
||||
} catch (Exception e) {
|
||||
return error("系统错误, " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -111,8 +113,7 @@ public class InputApplyDetailsController extends BaseController
|
|||
@RequiresPermissions("input: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(inputApplyDetailsService.deleteInputApplyDetailsByIds(ids));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,14 +10,13 @@ import com.bonus.common.core.web.domain.BaseEntity;
|
|||
* 入库任务详细对象 input_apply_details
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2024-09-26
|
||||
* @date 2024-10-16
|
||||
*/
|
||||
|
||||
|
||||
@Data
|
||||
@ToString
|
||||
public class InputApplyDetails extends BaseEntity
|
||||
{
|
||||
public class InputApplyDetails extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** ID */
|
||||
|
|
|
|||
|
|
@ -7,10 +7,9 @@ import com.bonus.material.input.domain.InputApplyDetails;
|
|||
* 入库任务详细Mapper接口
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2024-09-26
|
||||
* @date 2024-10-16
|
||||
*/
|
||||
public interface InputApplyDetailsMapper
|
||||
{
|
||||
public interface InputApplyDetailsMapper {
|
||||
/**
|
||||
* 查询入库任务详细
|
||||
*
|
||||
|
|
|
|||
|
|
@ -7,10 +7,9 @@ import com.bonus.material.input.domain.InputApplyDetails;
|
|||
* 入库任务详细Service接口
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2024-09-26
|
||||
* @date 2024-10-16
|
||||
*/
|
||||
public interface IInputApplyDetailsService
|
||||
{
|
||||
public interface IInputApplyDetailsService {
|
||||
/**
|
||||
* 查询入库任务详细
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.bonus.material.input.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.input.service.IInputApplyDetailsService;
|
|||
* 入库任务详细Service业务层处理
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2024-09-26
|
||||
* @date 2024-10-16
|
||||
*/
|
||||
@Service
|
||||
public class InputApplyDetailsServiceImpl implements IInputApplyDetailsService
|
||||
{
|
||||
public class InputApplyDetailsServiceImpl implements IInputApplyDetailsService {
|
||||
@Autowired
|
||||
private InputApplyDetailsMapper inputApplyDetailsMapper;
|
||||
|
||||
|
|
@ -27,8 +27,7 @@ public class InputApplyDetailsServiceImpl implements IInputApplyDetailsService
|
|||
* @return 入库任务详细
|
||||
*/
|
||||
@Override
|
||||
public InputApplyDetails selectInputApplyDetailsById(Long id)
|
||||
{
|
||||
public InputApplyDetails selectInputApplyDetailsById(Long id) {
|
||||
return inputApplyDetailsMapper.selectInputApplyDetailsById(id);
|
||||
}
|
||||
|
||||
|
|
@ -39,8 +38,7 @@ public class InputApplyDetailsServiceImpl implements IInputApplyDetailsService
|
|||
* @return 入库任务详细
|
||||
*/
|
||||
@Override
|
||||
public List<InputApplyDetails> selectInputApplyDetailsList(InputApplyDetails inputApplyDetails)
|
||||
{
|
||||
public List<InputApplyDetails> selectInputApplyDetailsList(InputApplyDetails inputApplyDetails) {
|
||||
return inputApplyDetailsMapper.selectInputApplyDetailsList(inputApplyDetails);
|
||||
}
|
||||
|
||||
|
|
@ -51,10 +49,13 @@ public class InputApplyDetailsServiceImpl implements IInputApplyDetailsService
|
|||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertInputApplyDetails(InputApplyDetails inputApplyDetails)
|
||||
{
|
||||
public int insertInputApplyDetails(InputApplyDetails inputApplyDetails) {
|
||||
inputApplyDetails.setCreateTime(DateUtils.getNowDate());
|
||||
return inputApplyDetailsMapper.insertInputApplyDetails(inputApplyDetails);
|
||||
try {
|
||||
return inputApplyDetailsMapper.insertInputApplyDetails(inputApplyDetails);
|
||||
} catch (Exception e) {
|
||||
throw new ServiceException("错误信息描述");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -64,10 +65,13 @@ public class InputApplyDetailsServiceImpl implements IInputApplyDetailsService
|
|||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateInputApplyDetails(InputApplyDetails inputApplyDetails)
|
||||
{
|
||||
public int updateInputApplyDetails(InputApplyDetails inputApplyDetails) {
|
||||
inputApplyDetails.setUpdateTime(DateUtils.getNowDate());
|
||||
return inputApplyDetailsMapper.updateInputApplyDetails(inputApplyDetails);
|
||||
try {
|
||||
return inputApplyDetailsMapper.updateInputApplyDetails(inputApplyDetails);
|
||||
} catch (Exception e) {
|
||||
throw new ServiceException("错误信息描述");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -77,8 +81,7 @@ public class InputApplyDetailsServiceImpl implements IInputApplyDetailsService
|
|||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteInputApplyDetailsByIds(Long[] ids)
|
||||
{
|
||||
public int deleteInputApplyDetailsByIds(Long[] ids) {
|
||||
return inputApplyDetailsMapper.deleteInputApplyDetailsByIds(ids);
|
||||
}
|
||||
|
||||
|
|
@ -89,8 +92,7 @@ public class InputApplyDetailsServiceImpl implements IInputApplyDetailsService
|
|||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteInputApplyDetailsById(Long id)
|
||||
{
|
||||
public int deleteInputApplyDetailsById(Long id) {
|
||||
return inputApplyDetailsMapper.deleteInputApplyDetailsById(id);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue