|
@@ -31,8 +31,7 @@ import com.ruoyi.framework.web.page.TableDataInfo;
|
|
|
*/
|
|
|
@RestController
|
|
|
@RequestMapping("/plant/ehsopenitem")
|
|
|
-public class TMtEhsopenitemController extends BaseController
|
|
|
-{
|
|
|
+public class TMtEhsopenitemController extends BaseController {
|
|
|
@Autowired
|
|
|
private ITMtEhsopenitemService tMtEhsopenitemService;
|
|
|
@Autowired
|
|
@@ -43,8 +42,7 @@ public class TMtEhsopenitemController extends BaseController
|
|
|
*/
|
|
|
@PreAuthorize("@ss.hasPermi('plant:meeting:list')")
|
|
|
@GetMapping("/list")
|
|
|
- public TableDataInfo list(TMtEhsopenitem tMtEhsopenitem)
|
|
|
- {
|
|
|
+ public TableDataInfo list(TMtEhsopenitem tMtEhsopenitem) {
|
|
|
startPage();
|
|
|
List<TMtEhsopenitem> list = tMtEhsopenitemService.selectTMtEhsopenitemList(tMtEhsopenitem);
|
|
|
return getDataTable(list);
|
|
@@ -55,8 +53,7 @@ public class TMtEhsopenitemController extends BaseController
|
|
|
*/
|
|
|
@PreAuthorize("@ss.hasPermi('plant:meeting:list')")
|
|
|
@GetMapping("/ehsData")
|
|
|
- public List<TMtEhsopenitem> ehsData(TMtEhsopenitem tMtEhsopenitem)
|
|
|
- {
|
|
|
+ public List<TMtEhsopenitem> ehsData(TMtEhsopenitem tMtEhsopenitem) {
|
|
|
List<TMtEhsopenitem> list = tMtEhsopenitemService.selectTMtEhsopenitemList(tMtEhsopenitem);
|
|
|
return list;
|
|
|
}
|
|
@@ -68,8 +65,7 @@ public class TMtEhsopenitemController extends BaseController
|
|
|
@PreAuthorize("@ss.hasPermi('plant:meeting:export')")
|
|
|
@Log(title = "EHS开项跟踪", businessType = BusinessType.EXPORT)
|
|
|
@GetMapping("/export")
|
|
|
- public AjaxResult export(TMtEhsopenitem tMtEhsopenitem)
|
|
|
- {
|
|
|
+ public AjaxResult export(TMtEhsopenitem tMtEhsopenitem) {
|
|
|
List<TMtEhsopenitem> list = tMtEhsopenitemService.selectTMtEhsopenitemList(tMtEhsopenitem);
|
|
|
ExcelUtil<TMtEhsopenitem> util = new ExcelUtil<TMtEhsopenitem>(TMtEhsopenitem.class);
|
|
|
return util.exportExcel(list, "ehsopenitem");
|
|
@@ -80,8 +76,7 @@ public class TMtEhsopenitemController extends BaseController
|
|
|
*/
|
|
|
@PreAuthorize("@ss.hasPermi('plant:meeting:query')")
|
|
|
@GetMapping(value = "/{id}")
|
|
|
- public AjaxResult getInfo(@PathVariable("id") Long id)
|
|
|
- {
|
|
|
+ public AjaxResult getInfo(@PathVariable("id") Long id) {
|
|
|
return AjaxResult.success(tMtEhsopenitemService.selectTMtEhsopenitemById(id));
|
|
|
}
|
|
|
|
|
@@ -91,13 +86,13 @@ public class TMtEhsopenitemController extends BaseController
|
|
|
@PreAuthorize("@ss.hasPermi('plant:meeting:add')")
|
|
|
@Log(title = "EHS开项跟踪", businessType = BusinessType.INSERT)
|
|
|
@PostMapping
|
|
|
- public AjaxResult add(@RequestBody TMtEhsopenitem tMtEhsopenitem)
|
|
|
- {
|
|
|
+ public AjaxResult add(@RequestBody TMtEhsopenitem tMtEhsopenitem) {
|
|
|
tMtEhsopenitem.setUpdatedate(new Date());
|
|
|
tMtEhsopenitem.setUpdaterCode(getUserId() + "");
|
|
|
tMtEhsopenitem.setCreaterCode(getUserId() + "");
|
|
|
- if (tMtEhsopenitem.getIsHis() == 1) {
|
|
|
- tMtMeetingController.getReport(null,tMtEhsopenitem.getMeetingId());
|
|
|
+ if (tMtEhsopenitem.getIsHis() != null && tMtEhsopenitem.getIsHis() == 1) {
|
|
|
+
|
|
|
+ tMtMeetingController.getReport(null, tMtEhsopenitem.getMeetingId());
|
|
|
}
|
|
|
return toAjax(tMtEhsopenitemService.insertTMtEhsopenitem(tMtEhsopenitem));
|
|
|
}
|
|
@@ -108,12 +103,12 @@ public class TMtEhsopenitemController extends BaseController
|
|
|
@PreAuthorize("@ss.hasPermi('plant:meeting:edit')")
|
|
|
@Log(title = "EHS开项跟踪", businessType = BusinessType.UPDATE)
|
|
|
@PutMapping
|
|
|
- public AjaxResult edit(@RequestBody TMtEhsopenitem tMtEhsopenitem)
|
|
|
- {
|
|
|
+ public AjaxResult edit(@RequestBody TMtEhsopenitem tMtEhsopenitem) {
|
|
|
tMtEhsopenitem.setUpdatedate(new Date());
|
|
|
tMtEhsopenitem.setUpdaterCode(getUserId() + "");
|
|
|
- if (tMtEhsopenitem.getIsHis() == 1) {
|
|
|
- tMtMeetingController.getReport(null,tMtEhsopenitem.getMeetingId());
|
|
|
+ if (tMtEhsopenitem.getIsHis() != null && tMtEhsopenitem.getIsHis() == 1) {
|
|
|
+
|
|
|
+ tMtMeetingController.getReport(null, tMtEhsopenitem.getMeetingId());
|
|
|
}
|
|
|
return toAjax(tMtEhsopenitemService.updateTMtEhsopenitem(tMtEhsopenitem));
|
|
|
}
|
|
@@ -123,9 +118,8 @@ public class TMtEhsopenitemController extends BaseController
|
|
|
*/
|
|
|
@PreAuthorize("@ss.hasPermi('plant:meeting:remove')")
|
|
|
@Log(title = "EHS开项跟踪", businessType = BusinessType.DELETE)
|
|
|
- @DeleteMapping("/{ids}")
|
|
|
- public AjaxResult remove(@PathVariable Long[] ids)
|
|
|
- {
|
|
|
+ @DeleteMapping("/{ids}")
|
|
|
+ public AjaxResult remove(@PathVariable Long[] ids) {
|
|
|
return toAjax(tMtEhsopenitemService.deleteTMtEhsopenitemByIds(ids));
|
|
|
}
|
|
|
}
|