From f1ec60de737efb5108c177e1618573be2a53f51f Mon Sep 17 00:00:00 2001
From: qushaowei <qushaowei@163.com>
Date: 星期二, 21 十一月 2023 10:04:30 +0800
Subject: [PATCH] 签审
---
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/controller/MdcShiftSubController.java | 27 +++++++++++++++++----------
1 files changed, 17 insertions(+), 10 deletions(-)
diff --git a/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/controller/MdcShiftSubController.java b/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/controller/MdcShiftSubController.java
index 8fb3426..1de3bf9 100644
--- a/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/controller/MdcShiftSubController.java
+++ b/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/controller/MdcShiftSubController.java
@@ -7,6 +7,7 @@
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.system.base.controller.JeecgController;
@@ -34,6 +35,7 @@
/**
* 鐝琛�(娆¤〃)-鍒嗛〉鏌ヨ
+ *
* @param shiftId
* @param pageNo
* @param pageSize
@@ -43,8 +45,8 @@
@ApiOperation(value = "鐝琛�(娆¤〃)-鍒嗛〉鏌ヨ", notes = "鐝琛�(娆¤〃)-鍒嗛〉鏌ヨ")
@GetMapping("/queryPageList")
public Result<?> queryPageList(@RequestParam String shiftId,
- @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
- @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize){
+ @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
+ @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
Page page = new Page<>(pageNo, pageSize);
IPage<MdcShiftSub> mdcShiftSubIPage = mdcShiftSubService.queryPageList(shiftId, page);
return Result.OK(mdcShiftSubIPage);
@@ -52,63 +54,68 @@
/**
* 鐝琛�(娆¤〃)-鏂板
- * @param jsonbject
+ *
+ * @param mdcShiftSub
* @return
*/
@AutoLog(value = "鐝琛�(娆¤〃)-鏂板")
@ApiOperation(value = "鐝琛�(娆¤〃)-鏂板", notes = "鐝琛�(娆¤〃)-鏂板")
@PostMapping("/addShiftSub")
- public Result<?> addShiftSub(@RequestBody JSONObject jsonbject) {
+ public Result<?> addShiftSub(@RequestBody MdcShiftSub mdcShiftSub) {
//澶勭悊鏄惁瀛樺湪绌哄��
- if (jsonbject.getDate("sleepStartDate") != null || jsonbject.getDate("sleepEndDate") != null ) {
- if (jsonbject.getDate("sleepEndDate") == null || jsonbject.getDate("sleepStartDate") == null) {
+ if (StringUtils.isNotEmpty(mdcShiftSub.getSleepStartDate()) || StringUtils.isNotEmpty(mdcShiftSub.getSleepEndDate())) {
+ if (StringUtils.isEmpty(mdcShiftSub.getSleepEndDate()) || StringUtils.isEmpty(mdcShiftSub.getSleepStartDate())) {
return Result.error("鏂板澶辫触锛屼紤鎭椂闂撮�夋嫨涓嶅");
}
}
- MdcShiftSub result = mdcShiftSubService.addMdcShiftSub(jsonbject);
+ MdcShiftSub result = mdcShiftSubService.addMdcShiftSub(mdcShiftSub);
return Result.OK(result);
}
/**
* 鐝琛�(娆¤〃)-淇敼
+ *
* @param mdcShiftSub
* @return
*/
@AutoLog(value = "鐝琛�(娆¤〃)-淇敼")
@ApiOperation(value = "鐝琛�(娆¤〃)-淇敼", notes = "鐝琛�(娆¤〃)-淇敼")
@PutMapping("/editMdcShiftSub")
- public Result<?> editShiftSub(@RequestBody MdcShiftSub mdcShiftSub){
+ public Result<?> editShiftSub(@RequestBody MdcShiftSub mdcShiftSub) {
Boolean flag = mdcShiftSubService.editMdcShiftSub(mdcShiftSub);
return flag ? Result.OK("淇敼鎴愬姛") : Result.error("淇敼澶辫触");
}
/**
* 鐝琛�(娆¤〃)-鏍规嵁id淇敼瀛愯〃鐘舵��
+ *
* @param jsonObject
* @return
*/
@AutoLog(value = "鐝琛�(娆¤〃)-鏍规嵁id淇敼瀛愯〃鐘舵��")
@ApiOperation(value = "鐝琛�(娆¤〃)-鏍规嵁id淇敼瀛愯〃鐘舵��", notes = "鏍规嵁id淇敼瀛愯〃鐘舵��")
@PutMapping("/updateSubStatusById")
- public Result<?> updateSubStatusById(@RequestBody JSONObject jsonObject){
+ public Result<?> updateSubStatusById(@RequestBody JSONObject jsonObject) {
Boolean flag = mdcShiftSubService.updateSubStatusById(jsonObject);
return flag ? Result.OK("淇敼鎴愬姛") : Result.error("淇敼澶辫触");
}
/**
* 鐝琛�(娆¤〃)-鏍规嵁id鍒犻櫎
+ *
* @param id
* @return
*/
@AutoLog(value = "鐝琛�(娆¤〃)-鏍规嵁id鍒犻櫎")
@ApiOperation(value = "鐝琛�(娆¤〃)-鏍规嵁id鍒犻櫎", notes = "鐝琛�(娆¤〃)-鏍规嵁id鍒犻櫎")
@DeleteMapping("/deleteMdcShiftSub")
- public Result<?> deleteMdcShiftSub(@RequestParam String id){
+ public Result<?> deleteMdcShiftSub(@RequestParam String id) {
return mdcShiftSubService.deleteMdcShiftSub(id);
}
/**
* 鐝琛�(娆¤〃)-鏍规嵁id鍒犻櫎
+ *
* @param shiftId
* @return
*/
--
Gitblit v1.9.3