fix:密品设备维修提交

pg_adapter
wangxy 8 months ago
parent 8bbf54d40b
commit e23e00d964

@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.ruoyi.common.utils.uuid.Seq; import com.ruoyi.common.utils.uuid.Seq;
import com.ruoyi.system.domain.TdPropertyInfo; import com.ruoyi.system.domain.TdPropertyInfo;
import com.ruoyi.system.service.ITdPropertyInfoService; import com.ruoyi.system.service.ITdPropertyInfoService;
import com.ruoyi.system.service.TdPropertyEmentService;
import com.ruoyi.web.controller.manager.SysAreaManager; import com.ruoyi.web.controller.manager.SysAreaManager;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -36,8 +37,7 @@ import javax.annotation.Resource;
*/ */
@Controller @Controller
@RequestMapping("/system/property") @RequestMapping("/system/property")
public class TdPropertyManagerController extends BaseController public class TdPropertyManagerController extends BaseController {
{
private String prefix = "system/property/property"; private String prefix = "system/property/property";
@Autowired @Autowired
@ -45,13 +45,15 @@ public class TdPropertyManagerController extends BaseController
@Autowired @Autowired
private ITdPropertyInfoService tdPropertyInfoService; private ITdPropertyInfoService tdPropertyInfoService;
@Resource
private TdPropertyEmentService tdPropertyEmentService;
@Resource @Resource
private SysAreaManager sysAreaManager; private SysAreaManager sysAreaManager;
@RequiresPermissions("system:property:view") @RequiresPermissions("system:property:view")
@GetMapping() @GetMapping()
public String property() public String property() {
{
return prefix + "/property"; return prefix + "/property";
} }
@ -61,8 +63,7 @@ public class TdPropertyManagerController extends BaseController
@RequiresPermissions("system:property:list") @RequiresPermissions("system:property:list")
@PostMapping("/list") @PostMapping("/list")
@ResponseBody @ResponseBody
public TableDataInfo list(TdPropertyManager tdPropertyManager) public TableDataInfo list(TdPropertyManager tdPropertyManager) {
{
startPage(); startPage();
List<TdPropertyManager> list = tdPropertyManagerService.selectTdPropertyManagerList(tdPropertyManager); List<TdPropertyManager> list = tdPropertyManagerService.selectTdPropertyManagerList(tdPropertyManager);
return getDataTable(list); return getDataTable(list);
@ -75,8 +76,7 @@ public class TdPropertyManagerController extends BaseController
@Log(title = "密品登记", businessType = BusinessType.EXPORT) @Log(title = "密品登记", businessType = BusinessType.EXPORT)
@PostMapping("/export") @PostMapping("/export")
@ResponseBody @ResponseBody
public AjaxResult export(TdPropertyManager tdPropertyManager) public AjaxResult export(TdPropertyManager tdPropertyManager) {
{
List<TdPropertyManager> list = tdPropertyManagerService.selectTdPropertyManagerList(tdPropertyManager); List<TdPropertyManager> list = tdPropertyManagerService.selectTdPropertyManagerList(tdPropertyManager);
list.forEach(tdPropertyManager1 -> { list.forEach(tdPropertyManager1 -> {
tdPropertyManager1.setPart(sysAreaManager.getAreaName(tdPropertyManager1.getPart())); tdPropertyManager1.setPart(sysAreaManager.getAreaName(tdPropertyManager1.getPart()));
@ -90,8 +90,7 @@ public class TdPropertyManagerController extends BaseController
* *
*/ */
@GetMapping("/add") @GetMapping("/add")
public String add(ModelMap mmap) public String add(ModelMap mmap) {
{
mmap.put("sysuser", getSysUser()); mmap.put("sysuser", getSysUser());
return prefix + "/add"; return prefix + "/add";
} }
@ -103,8 +102,7 @@ public class TdPropertyManagerController extends BaseController
@Log(title = "密品登记", businessType = BusinessType.INSERT) @Log(title = "密品登记", businessType = BusinessType.INSERT)
@PostMapping("/add") @PostMapping("/add")
@ResponseBody @ResponseBody
public AjaxResult addSave(TdPropertyManager tdPropertyManager) public AjaxResult addSave(TdPropertyManager tdPropertyManager) {
{
tdPropertyManager.setUseId("Property_" + Seq.getId(Seq.commSeqType)); tdPropertyManager.setUseId("Property_" + Seq.getId(Seq.commSeqType));
return toAjax(tdPropertyManagerService.insertTdPropertyManager(tdPropertyManager)); return toAjax(tdPropertyManagerService.insertTdPropertyManager(tdPropertyManager));
} }
@ -114,8 +112,7 @@ public class TdPropertyManagerController extends BaseController
*/ */
@RequiresPermissions("system:property:edit") @RequiresPermissions("system:property:edit")
@GetMapping("/edit/{useId}") @GetMapping("/edit/{useId}")
public String edit(@PathVariable("useId") String useId, ModelMap mmap) public String edit(@PathVariable("useId") String useId, ModelMap mmap) {
{
TdPropertyManager tdPropertyManager = tdPropertyManagerService.selectTdPropertyManagerByUseId(useId); TdPropertyManager tdPropertyManager = tdPropertyManagerService.selectTdPropertyManagerByUseId(useId);
mmap.put("tdPropertyManager", tdPropertyManager); mmap.put("tdPropertyManager", tdPropertyManager);
return prefix + "/edit"; return prefix + "/edit";
@ -128,8 +125,7 @@ public class TdPropertyManagerController extends BaseController
@Log(title = "密品登记", businessType = BusinessType.UPDATE) @Log(title = "密品登记", businessType = BusinessType.UPDATE)
@PostMapping("/edit") @PostMapping("/edit")
@ResponseBody @ResponseBody
public AjaxResult editSave(TdPropertyManager tdPropertyManager) public AjaxResult editSave(TdPropertyManager tdPropertyManager) {
{
return toAjax(tdPropertyManagerService.updateTdPropertyManager(tdPropertyManager)); return toAjax(tdPropertyManagerService.updateTdPropertyManager(tdPropertyManager));
} }
@ -140,11 +136,11 @@ public class TdPropertyManagerController extends BaseController
@Log(title = "密品登记", businessType = BusinessType.DELETE) @Log(title = "密品登记", businessType = BusinessType.DELETE)
@PostMapping("/remove") @PostMapping("/remove")
@ResponseBody @ResponseBody
public AjaxResult remove(String ids) public AjaxResult remove(String ids) {
{
QueryWrapper queryWrapper = new QueryWrapper(); QueryWrapper queryWrapper = new QueryWrapper();
queryWrapper.in("use_id", ids.split(",")); queryWrapper.in("use_id", ids.split(","));
tdPropertyInfoService.remove(queryWrapper); tdPropertyInfoService.remove(queryWrapper);
tdPropertyEmentService.remove(queryWrapper);
return toAjax(tdPropertyManagerService.deleteTdPropertyManagerByUseIds(ids)); return toAjax(tdPropertyManagerService.deleteTdPropertyManagerByUseIds(ids));
} }
@ -153,8 +149,7 @@ public class TdPropertyManagerController extends BaseController
*/ */
@RequiresPermissions("system:property:list") @RequiresPermissions("system:property:list")
@GetMapping("/detail/{useId}") @GetMapping("/detail/{useId}")
public String detail(@PathVariable("useId") String useId, ModelMap mmap) public String detail(@PathVariable("useId") String useId, ModelMap mmap) {
{
mmap.put("useId", useId); mmap.put("useId", useId);
return "system/property/data/propertyinfo"; return "system/property/data/propertyinfo";
} }

Loading…
Cancel
Save