|
@@ -165,6 +165,15 @@ public class BizCollectionController extends BaseController {
|
|
|
return getDataTable(list);
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ @ApiOperation("修改收款状态")
|
|
|
+ @Log(title = "修改收款状态", businessType = BusinessType.UPDATE)
|
|
|
+ @PutMapping("/setCollectionStatus")
|
|
|
+ public AjaxResult setCollectionStatus(@RequestBody BizArchiveInput conditions) throws NoSuchFieldException, IllegalAccessException {
|
|
|
+
|
|
|
+ return success(archiveInputService.updateById(conditions));
|
|
|
+ }
|
|
|
+
|
|
|
@ApiOperation("获取对应合同的收款单")
|
|
|
@GetMapping("/getCollectionByContract")
|
|
|
@PreAuthorize("@ss.hasPermi('business:collection:add')")
|
|
@@ -239,6 +248,13 @@ public class BizCollectionController extends BaseController {
|
|
|
public AjaxResult verified(@RequestBody BizCollection collection) {
|
|
|
try {
|
|
|
collection.setVerifyDate(collection.getVerifyDate() == null ? DateTime.now().toTimestamp() : collection.getVerifyDate());
|
|
|
+ BizArchiveInput contract = archiveInputService.getById(collection.getContractId());
|
|
|
+ if (contract != null) {
|
|
|
+ if(collection.getVerifyDate()!= null){
|
|
|
+ contract.setCollectionStatus((byte) (collection.getStatus()==1?2:3));
|
|
|
+ archiveInputService.saveOrUpdate(contract);
|
|
|
+ }
|
|
|
+ }
|
|
|
return collectionService.saveOrUpdate(collection) ? success(collection) : error();
|
|
|
|
|
|
} catch (Exception e) {
|