package com.jcdm.main.da.passingStationCollection.controller;
|
|
import java.util.List;
|
import javax.servlet.http.HttpServletResponse;
|
|
import com.jcdm.common.core.domain.R;
|
import com.jcdm.common.utils.DateUtils;
|
import com.jcdm.main.bs.orderScheduling.domain.BsOrderScheduling;
|
import com.jcdm.main.da.passingStationCollection.domain.DaPassingStationCollection;
|
import com.jcdm.main.da.passingStationCollection.service.IDaPassingStationCollectionService;
|
import com.jcdm.main.da.passingStationCollection.vo.DaPassingStationVO;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PutMapping;
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
import org.springframework.web.bind.annotation.PathVariable;
|
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RestController;
|
import com.jcdm.common.annotation.Log;
|
import com.jcdm.common.core.controller.BaseController;
|
import com.jcdm.common.core.domain.AjaxResult;
|
import com.jcdm.common.enums.BusinessType;
|
import com.jcdm.common.utils.poi.ExcelUtil;
|
import com.jcdm.common.core.page.TableDataInfo;
|
|
/**
|
* 产品过站采集Controller
|
*
|
* @author yyt
|
* @date 2023-12-12
|
*/
|
@RestController
|
@RequestMapping("/da/passingStationCollection")
|
public class DaPassingStationCollectionController extends BaseController
|
{
|
@Autowired
|
private IDaPassingStationCollectionService daPassingStationCollectionService;
|
|
/**
|
* 查询产品过站采集列表
|
*/
|
@PreAuthorize("@ss.hasPermi('da:passingStationCollection:list')")
|
@GetMapping("/list")
|
public TableDataInfo list(DaPassingStationCollection daPassingStationCollection)
|
{
|
startPage();
|
List<DaPassingStationCollection> list = daPassingStationCollectionService.selectDaPassingStationCollectionList(daPassingStationCollection);
|
return getDataTable(list);
|
}
|
|
@PreAuthorize("@ss.hasPermi('da:passingStationCollection:list')")
|
@GetMapping("/getTopProcess")
|
public TableDataInfo getTopProcess()
|
{
|
DaPassingStationCollection daPassingStationCollection = new DaPassingStationCollection();
|
List<DaPassingStationVO> list = daPassingStationCollectionService.getTopProcess(daPassingStationCollection);
|
return getDataTable(list);
|
}
|
/**
|
* 查询产品过站采集列表
|
*/
|
@PreAuthorize("@ss.hasPermi('da:passingStationCollection:list')")
|
@GetMapping("/noPageList")
|
public TableDataInfo noPageList(DaPassingStationCollection daPassingStationCollection)
|
{
|
List<DaPassingStationCollection> list = daPassingStationCollectionService.selectDaPassingStationCollectionList(daPassingStationCollection);
|
return getDataTable(list);
|
}
|
|
@PreAuthorize("@ss.hasPermi('da:passingStationCollection:list')")
|
@GetMapping("/getProduceNumToday")
|
public R getProduceNumToday(String fieldName)
|
{
|
Integer num = daPassingStationCollectionService.getProduceNumToday(fieldName);
|
return R.ok(num);
|
}
|
|
/**
|
* 查询产品过站采集列表
|
*/
|
@GetMapping("/insertRepairRecordByIds")
|
public AjaxResult insertRepairRecordByIds(DaPassingStationCollection daPassingStationCollection)
|
{
|
daPassingStationCollectionService.insertRepairRecordByIds(daPassingStationCollection);
|
return AjaxResult.success();
|
}
|
|
/**
|
* 导出产品过站采集列表
|
*/
|
@PreAuthorize("@ss.hasPermi('da:passingStationCollection:export')")
|
@Log(title = "产品过站采集", businessType = BusinessType.EXPORT)
|
@PostMapping("/export")
|
public void export(HttpServletResponse response, DaPassingStationCollection daPassingStationCollection)
|
{
|
List<DaPassingStationCollection> list = daPassingStationCollectionService.selectDaPassingStationCollectionList(daPassingStationCollection);
|
ExcelUtil<DaPassingStationCollection> util = new ExcelUtil<DaPassingStationCollection>(DaPassingStationCollection.class);
|
util.exportExcel(response, list, "产品过站采集数据");
|
}
|
|
/**
|
* 获取产品过站采集详细信息
|
*/
|
@PreAuthorize("@ss.hasPermi('da:passingStationCollection:query')")
|
@GetMapping(value = "/{id}")
|
public AjaxResult getInfo(@PathVariable("id") Long id)
|
{
|
return success(daPassingStationCollectionService.selectDaPassingStationCollectionById(id));
|
}
|
|
/**
|
* 新增产品过站采集
|
*/
|
@PreAuthorize("@ss.hasPermi('da:passingStationCollection:add')")
|
@Log(title = "产品过站采集", businessType = BusinessType.INSERT)
|
@PostMapping
|
public AjaxResult add(@RequestBody DaPassingStationCollection daPassingStationCollection)
|
{
|
daPassingStationCollection.setCreateBy(getUsername());
|
daPassingStationCollection.setCreateTime(DateUtils.getNowDate());
|
return toAjax(daPassingStationCollectionService.insertDaPassingStationCollection(daPassingStationCollection));
|
}
|
|
/**
|
* 修改产品过站采集
|
*/
|
@PreAuthorize("@ss.hasPermi('da:passingStationCollection:edit')")
|
@Log(title = "产品过站采集", businessType = BusinessType.UPDATE)
|
@PutMapping
|
public AjaxResult edit(@RequestBody DaPassingStationCollection daPassingStationCollection)
|
{
|
daPassingStationCollection.setUpdateBy(getUsername());
|
daPassingStationCollection.setUpdateTime(DateUtils.getNowDate());
|
return toAjax(daPassingStationCollectionService.updateDaPassingStationCollection(daPassingStationCollection));
|
}
|
|
/**
|
* 删除产品过站采集
|
*/
|
@PreAuthorize("@ss.hasPermi('da:passingStationCollection:remove')")
|
@Log(title = "产品过站采集", businessType = BusinessType.DELETE)
|
@DeleteMapping("/{ids}")
|
public AjaxResult remove(@PathVariable Long[] ids)
|
{
|
return toAjax(daPassingStationCollectionService.deleteDaPassingStationCollectionByIds(ids));
|
}
|
}
|