Commit aef1f734 authored by hongguangwu's avatar hongguangwu

MVP1.5.1-收入证明等

parent a9a7cec5
...@@ -87,7 +87,7 @@ public class SalaryProveController { ...@@ -87,7 +87,7 @@ public class SalaryProveController {
@Operation(summary = "新增(tproveapply_add)") @Operation(summary = "新增(tproveapply_add)")
@PostMapping @PostMapping
@PreAuthorize("@pms.hasPermission('tproveapply_add')") @PreAuthorize("@pms.hasPermission('tproveapply_add')")
public R save(@Valid @RequestBody TProveApply tProveApply) { public R<Boolean> save(@Valid @RequestBody TProveApply tProveApply) {
return new R<>(tProveApplyService.save(tProveApply)); return new R<>(tProveApplyService.save(tProveApply));
} }
...@@ -101,7 +101,7 @@ public class SalaryProveController { ...@@ -101,7 +101,7 @@ public class SalaryProveController {
@SysLog("修改") @SysLog("修改")
@PutMapping @PutMapping
@PreAuthorize("@pms.hasPermission('tproveapply_edit')") @PreAuthorize("@pms.hasPermission('tproveapply_edit')")
public R update(@RequestBody TProveApply tProveApply) { public R<Boolean> update(@RequestBody TProveApply tProveApply) {
return new R<>(tProveApplyService.updateById(tProveApply)); return new R<>(tProveApplyService.updateById(tProveApply));
} }
...@@ -115,7 +115,7 @@ public class SalaryProveController { ...@@ -115,7 +115,7 @@ public class SalaryProveController {
@SysLog("删除") @SysLog("删除")
@DeleteMapping("/{id}") @DeleteMapping("/{id}")
@PreAuthorize("@pms.hasPermission('tproveapply_del')") @PreAuthorize("@pms.hasPermission('tproveapply_del')")
public R removeById(@PathVariable String id) { public R<Boolean> removeById(@PathVariable String id) {
return new R<>(tProveApplyService.removeById(id)); return new R<>(tProveApplyService.removeById(id));
} }
...@@ -232,7 +232,7 @@ public class SalaryProveController { ...@@ -232,7 +232,7 @@ public class SalaryProveController {
*/ */
@Operation(summary = "打印次数加一") @Operation(summary = "打印次数加一")
@GetMapping(value = "/addone/{id}") @GetMapping(value = "/addone/{id}")
public R addone(@PathVariable String id) { public R<String> addone(@PathVariable String id) {
TProveRecord re = tProveRecordService.getById(id); TProveRecord re = tProveRecordService.getById(id);
if (null != re && null != re.getNumber()) { if (null != re && null != re.getNumber()) {
re.setNumber(re.getNumber() + 1); re.setNumber(re.getNumber() + 1);
...@@ -307,7 +307,7 @@ public class SalaryProveController { ...@@ -307,7 +307,7 @@ public class SalaryProveController {
@SysLog("收入证明修改作废状态") @SysLog("收入证明修改作废状态")
@PostMapping(value = "/updateStatus") @PostMapping(value = "/updateStatus")
@PreAuthorize("@pms.hasPermission('tproveapply_invalid')") @PreAuthorize("@pms.hasPermission('tproveapply_invalid')")
public R updateStatus(String id, String status, String invalidReason) { public R<String> updateStatus(String id, String status, String invalidReason) {
if (id != null) { if (id != null) {
if (Common.isEmpty(status)) { if (Common.isEmpty(status)) {
return R.failed("作废状态不能为空!"); return R.failed("作废状态不能为空!");
...@@ -353,7 +353,7 @@ public class SalaryProveController { ...@@ -353,7 +353,7 @@ public class SalaryProveController {
@Operation(summary = "新增证明申请(tproveapply_apply)") @Operation(summary = "新增证明申请(tproveapply_apply)")
@PostMapping(value = "/proveApply") @PostMapping(value = "/proveApply")
@PreAuthorize("@pms.hasPermission('tproveapply_apply')") @PreAuthorize("@pms.hasPermission('tproveapply_apply')")
public R proveApply(@Valid @RequestBody TProveApply proveApply, String[] attaIdArray) { public R<String> proveApply(@Valid @RequestBody TProveApply proveApply, String[] attaIdArray) {
TEmployeeProject em = employeeProjectService.getById(proveApply.getEmployeeInfo()); TEmployeeProject em = employeeProjectService.getById(proveApply.getEmployeeInfo());
if (null == em) { if (null == em) {
return R.failed("无此员工!"); return R.failed("无此员工!");
...@@ -388,7 +388,7 @@ public class SalaryProveController { ...@@ -388,7 +388,7 @@ public class SalaryProveController {
@Operation(summary = "证明申请详情查询") @Operation(summary = "证明申请详情查询")
@GetMapping("/lookApply/{id}") @GetMapping("/lookApply/{id}")
public R<TProveApply> lookApply(@PathVariable(value = "id", required = true) String id) { public R<TProveApply> lookApply(@PathVariable(value = "id", required = true) String id) {
return new R(tProveApplyService.getById(id)); return R.ok(tProveApplyService.getById(id));
} }
@Operation(summary = "证明申请附件查询") @Operation(summary = "证明申请附件查询")
...@@ -403,7 +403,7 @@ public class SalaryProveController { ...@@ -403,7 +403,7 @@ public class SalaryProveController {
@Operation(summary = "审核接口(tproveapply_audit) auditStatus:审核结果(1审核通过2审核不通过)") @Operation(summary = "审核接口(tproveapply_audit) auditStatus:审核结果(1审核通过2审核不通过)")
@GetMapping("/updateApplyStatus") @GetMapping("/updateApplyStatus")
@PreAuthorize("@pms.hasPermission('tproveapply_audit')") @PreAuthorize("@pms.hasPermission('tproveapply_audit')")
public R updateApplyStatus(@RequestParam String id, @RequestParam String auditStatus) { public R<String> updateApplyStatus(@RequestParam String id, @RequestParam String auditStatus) {
TProveApply pa = tProveApplyService.getById(id); TProveApply pa = tProveApplyService.getById(id);
if (pa != null) { if (pa != null) {
if (!CommonConstants.dingleDigitStrArray[1].equals(auditStatus) && !CommonConstants.dingleDigitStrArray[2].equals(auditStatus)) { if (!CommonConstants.dingleDigitStrArray[1].equals(auditStatus) && !CommonConstants.dingleDigitStrArray[2].equals(auditStatus)) {
......
...@@ -21,6 +21,6 @@ public interface TProveApplyService extends IService<TProveApply> { ...@@ -21,6 +21,6 @@ public interface TProveApplyService extends IService<TProveApply> {
IPage<TProveApply> getTProveApplyPage(Page<TProveApply> page, TProveApply tProveApply); IPage<TProveApply> getTProveApplyPage(Page<TProveApply> page, TProveApply tProveApply);
R validSave(TProveApply proveApply, String[] attaIdArray); R<String> validSave(TProveApply proveApply, String[] attaIdArray);
} }
...@@ -43,7 +43,7 @@ public class TProveApplyServiceImpl extends ServiceImpl<TProveApplyMapper, TProv ...@@ -43,7 +43,7 @@ public class TProveApplyServiceImpl extends ServiceImpl<TProveApplyMapper, TProv
} }
@Override @Override
public R validSave(TProveApply proveApply, String[] attaIdArray) { public R<String> validSave(TProveApply proveApply, String[] attaIdArray) {
YifuUser user = SecurityUtils.getUser(); YifuUser user = SecurityUtils.getUser();
//查重 //查重
long count = this.count(Wrappers.<TProveApply>lambdaQuery() long count = this.count(Wrappers.<TProveApply>lambdaQuery()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment