|
|
@ -4,6 +4,7 @@ import java.util.List;
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
|
|
|
|
|
|
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
|
|
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
|
|
|
|
|
|
|
import com.op.common.security.utils.SecurityUtils;
|
|
|
|
import com.op.system.api.domain.SysDictType;
|
|
|
|
import com.op.system.api.domain.SysDictType;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
@ -36,11 +37,11 @@ public class MesBoxController extends BaseController {
|
|
|
|
@Autowired
|
|
|
|
@Autowired
|
|
|
|
private IMesBoxService mesBoxService;
|
|
|
|
private IMesBoxService mesBoxService;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 查询箱体类型列表
|
|
|
|
* 查询箱体类型列表
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@RequiresPermissions("mes:mesBox:list")
|
|
|
|
@RequiresPermissions("mes:mesBox:list")
|
|
|
|
@GetMapping("/list")
|
|
|
|
@GetMapping("/list")
|
|
|
|
public TableDataInfo list(MesBox mesBox) {
|
|
|
|
public TableDataInfo list(MesBox mesBox) {
|
|
|
|
startPage();
|
|
|
|
startPage();
|
|
|
|
List<MesBox> list = mesBoxService.selectMesBoxList(mesBox);
|
|
|
|
List<MesBox> list = mesBoxService.selectMesBoxList(mesBox);
|
|
|
@ -55,7 +56,7 @@ public class MesBoxController extends BaseController {
|
|
|
|
@PostMapping("/export")
|
|
|
|
@PostMapping("/export")
|
|
|
|
public void export(HttpServletResponse response, MesBox mesBox) {
|
|
|
|
public void export(HttpServletResponse response, MesBox mesBox) {
|
|
|
|
List<MesBox> list = mesBoxService.selectMesBoxList(mesBox);
|
|
|
|
List<MesBox> list = mesBoxService.selectMesBoxList(mesBox);
|
|
|
|
ExcelUtil<MesBox> util = new ExcelUtil<MesBox>(MesBox. class);
|
|
|
|
ExcelUtil<MesBox> util = new ExcelUtil<MesBox>(MesBox.class);
|
|
|
|
util.exportExcel(response, list, "箱体类型数据");
|
|
|
|
util.exportExcel(response, list, "箱体类型数据");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -75,6 +76,9 @@ public class MesBoxController extends BaseController {
|
|
|
|
@Log(title = "箱体类型", businessType = BusinessType.INSERT)
|
|
|
|
@Log(title = "箱体类型", businessType = BusinessType.INSERT)
|
|
|
|
@PostMapping
|
|
|
|
@PostMapping
|
|
|
|
public AjaxResult add(@RequestBody MesBox mesBox) {
|
|
|
|
public AjaxResult add(@RequestBody MesBox mesBox) {
|
|
|
|
|
|
|
|
if (!mesBoxService.checkBoxTypeUnique(mesBox)) {
|
|
|
|
|
|
|
|
return error("新增箱型'" + mesBox.getBoxName() + "'失败,箱体类型已存在");
|
|
|
|
|
|
|
|
}
|
|
|
|
return toAjax(mesBoxService.insertMesBox(mesBox));
|
|
|
|
return toAjax(mesBoxService.insertMesBox(mesBox));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -85,6 +89,9 @@ public class MesBoxController extends BaseController {
|
|
|
|
@Log(title = "箱体类型", businessType = BusinessType.UPDATE)
|
|
|
|
@Log(title = "箱体类型", businessType = BusinessType.UPDATE)
|
|
|
|
@PutMapping
|
|
|
|
@PutMapping
|
|
|
|
public AjaxResult edit(@RequestBody MesBox mesBox) {
|
|
|
|
public AjaxResult edit(@RequestBody MesBox mesBox) {
|
|
|
|
|
|
|
|
if (!mesBoxService.checkBoxTypeUnique(mesBox)) {
|
|
|
|
|
|
|
|
return error("修改箱型'" + mesBox.getBoxName() + "'失败,箱体类型已存在");
|
|
|
|
|
|
|
|
}
|
|
|
|
return toAjax(mesBoxService.updateMesBox(mesBox));
|
|
|
|
return toAjax(mesBoxService.updateMesBox(mesBox));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|