|
@@ -10,6 +10,7 @@ import com.zd.bottle.vo.UsegasApplyTabVo;
|
|
|
import com.zd.bottle.vo.UsegasApplyVo;
|
|
import com.zd.bottle.vo.UsegasApplyVo;
|
|
|
import com.zd.common.core.domain.per.PerFun;
|
|
import com.zd.common.core.domain.per.PerFun;
|
|
|
import com.zd.common.core.domain.per.PerPrefix;
|
|
import com.zd.common.core.domain.per.PerPrefix;
|
|
|
|
|
+import com.zd.common.core.utils.DateUtils;
|
|
|
import com.zd.common.core.utils.SecurityUtils;
|
|
import com.zd.common.core.utils.SecurityUtils;
|
|
|
import com.zd.common.core.web.controller.BaseController;
|
|
import com.zd.common.core.web.controller.BaseController;
|
|
|
import com.zd.common.core.web.page.TableDataInfo;
|
|
import com.zd.common.core.web.page.TableDataInfo;
|
|
@@ -107,7 +108,10 @@ public class UsegasApplyController extends BaseController<UsegasApply> {
|
|
|
startPage();
|
|
startPage();
|
|
|
QueryWrapper<UsegasApply> wrapper = new QueryWrapper();
|
|
QueryWrapper<UsegasApply> wrapper = new QueryWrapper();
|
|
|
wrapper.eq("user_id", SecurityUtils.getUserId());
|
|
wrapper.eq("user_id", SecurityUtils.getUserId());
|
|
|
- wrapper.eq("lead_audit_staus", usegasApply.getLeadAuditStaus());
|
|
|
|
|
|
|
+ if(usegasApply.getLeadAuditStaus() != null){
|
|
|
|
|
+ wrapper.eq("lead_audit_staus", usegasApply.getLeadAuditStaus());
|
|
|
|
|
+ }
|
|
|
|
|
+ wrapper.orderByDesc("create_time");
|
|
|
List<UsegasApply> list = usegasApplyService.list(wrapper);
|
|
List<UsegasApply> list = usegasApplyService.list(wrapper);
|
|
|
return getDataTable(list);
|
|
return getDataTable(list);
|
|
|
}
|
|
}
|
|
@@ -115,14 +119,21 @@ public class UsegasApplyController extends BaseController<UsegasApply> {
|
|
|
@ApiOperation(value = "个人提交申请")
|
|
@ApiOperation(value = "个人提交申请")
|
|
|
@PostMapping("/addByUser")
|
|
@PostMapping("/addByUser")
|
|
|
public ResultData<UsegasApplyTabVo> addApplyByUser(@RequestBody @Valid UsegasApply usegasApply){
|
|
public ResultData<UsegasApplyTabVo> addApplyByUser(@RequestBody @Valid UsegasApply usegasApply){
|
|
|
- if(usegasApply.getUserId() == null || !usegasApply.getUserId().equals(SecurityUtils.getUserId())){
|
|
|
|
|
- return ResultData.fail("参数异常!");
|
|
|
|
|
- }
|
|
|
|
|
SaveUtil.setCommonAttr(usegasApply);
|
|
SaveUtil.setCommonAttr(usegasApply);
|
|
|
usegasApplyService.save(usegasApply);
|
|
usegasApplyService.save(usegasApply);
|
|
|
return ResultData.success();
|
|
return ResultData.success();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @ApiOperation(value = "个人重新申请")
|
|
|
|
|
+ @PostMapping("/updateByUser")
|
|
|
|
|
+ public ResultData<UsegasApplyTabVo> updateApplyByUser(@RequestBody @Valid UsegasApply usegasApply){
|
|
|
|
|
+ usegasApply.setUpdateBy(SecurityUtils.getUsername());
|
|
|
|
|
+ usegasApply.setUpdateTime(DateUtils.getNowDate());
|
|
|
|
|
+ usegasApply.setLeadAuditStaus((short) 0);
|
|
|
|
|
+ usegasApplyService.updateById(usegasApply);
|
|
|
|
|
+ return ResultData.success();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
@ApiOperation(value = "申请详情")
|
|
@ApiOperation(value = "申请详情")
|
|
|
@PostMapping("/detail")
|
|
@PostMapping("/detail")
|
|
|
public ResultData<UsegasApplyDetailVo> queryApplyDetail(@RequestBody UsegasApply usegasApply){
|
|
public ResultData<UsegasApplyDetailVo> queryApplyDetail(@RequestBody UsegasApply usegasApply){
|