|
@@ -52,7 +52,7 @@ import java.util.concurrent.TimeUnit;
|
|
|
@Slf4j
|
|
|
@RestController
|
|
|
@AllArgsConstructor
|
|
|
-@RequestMapping("/settle" )
|
|
|
+@RequestMapping("/settle")
|
|
|
@Api(value = "settle", tags = "结算管理")
|
|
|
public class WmPayOffController {
|
|
|
|
|
@@ -60,12 +60,16 @@ public class WmPayOffController {
|
|
|
private final WmScorePackageService wmScorePackageService;
|
|
|
private final RedisTemplate<String, Object> redisTemplate;
|
|
|
|
|
|
-
|
|
|
+ /**
|
|
|
+ * 财务回退操作
|
|
|
+ * @param input 操作参数
|
|
|
+ * @return 回退结果
|
|
|
+ */
|
|
|
@ApiOperation(value = "结算回退", notes = "提交结算")
|
|
|
- @SysLog("提交结算" )
|
|
|
+ @SysLog("提交结算")
|
|
|
@PostMapping("/settleBack")
|
|
|
public R settleBack(@RequestBody WmScorePackageSettleInput input) {
|
|
|
- if(StringUtils.isEmpty(input.getId())){
|
|
|
+ if (StringUtils.isEmpty(input.getId())) {
|
|
|
return R.failed("数据异常");
|
|
|
}
|
|
|
return wmPayOffService.settleBack(input);
|
|
@@ -88,7 +92,7 @@ public class WmPayOffController {
|
|
|
final String token = String.format("%d:order_batch:%d:token", finaAdmin.getTenantId(), finaAdmin.getId());
|
|
|
|
|
|
// 返回缓存生成好的
|
|
|
- if (Boolean.TRUE.equals(redisTemplate.hasKey(token))){
|
|
|
+ if (Boolean.TRUE.equals(redisTemplate.hasKey(token))) {
|
|
|
return (String) redisTemplate.opsForValue().get(token);
|
|
|
}
|
|
|
|
|
@@ -130,17 +134,17 @@ public class WmPayOffController {
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "保存结算", notes = "保存结算")
|
|
|
- @SysLog("保存结算" )
|
|
|
+ @SysLog("保存结算")
|
|
|
@PostMapping("/settleSave")
|
|
|
public R settleSave(@RequestBody WmScorePackageSettleInput input) {
|
|
|
- if(CollectionUtils.isEmpty(input.getNotes())){
|
|
|
+ if (CollectionUtils.isEmpty(input.getNotes())) {
|
|
|
return R.failed("数据异常");
|
|
|
}
|
|
|
|
|
|
- if(StringUtils.isEmpty(input.getId())){
|
|
|
+ if (StringUtils.isEmpty(input.getId())) {
|
|
|
return R.failed("数据异常");
|
|
|
}
|
|
|
- if(null == input.getInvoiceCategory()){
|
|
|
+ if (null == input.getInvoiceCategory()) {
|
|
|
return R.failed("数据异常");
|
|
|
}
|
|
|
|
|
@@ -149,26 +153,27 @@ public class WmPayOffController {
|
|
|
|
|
|
/**
|
|
|
* 弃用
|
|
|
+ *
|
|
|
* @Modify: start
|
|
|
* @Version: v2021.4.16
|
|
|
* @Author: ryz
|
|
|
* @Date: 2021/4/28
|
|
|
- */
|
|
|
+ */
|
|
|
@Deprecated
|
|
|
@ApiOperation(value = "结算", notes = "结算")
|
|
|
- @SysLog("结算" )
|
|
|
+ @SysLog("结算")
|
|
|
@PostMapping("/settleIssue")
|
|
|
public R settleIssue(@RequestBody WmScorePackageSettleInput input) {
|
|
|
- if(StringUtils.isEmpty(input.getId())){
|
|
|
+ if (StringUtils.isEmpty(input.getId())) {
|
|
|
return R.failed("数据异常");
|
|
|
}
|
|
|
- if(CollectionUtils.isEmpty(input.getNotes())){
|
|
|
+ if (CollectionUtils.isEmpty(input.getNotes())) {
|
|
|
return R.failed("数据异常");
|
|
|
}
|
|
|
- if(null == input.getInvoiceCategory()){
|
|
|
+ if (null == input.getInvoiceCategory()) {
|
|
|
return R.failed("数据异常");
|
|
|
}
|
|
|
- if(StringUtils.isEmpty(input.getScorePackageName())){
|
|
|
+ if (StringUtils.isEmpty(input.getScorePackageName())) {
|
|
|
return R.failed("数据异常");
|
|
|
}
|
|
|
|
|
@@ -176,10 +181,10 @@ public class WmPayOffController {
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "重新结算", notes = "重新结算")
|
|
|
- @SysLog("重新结算" )
|
|
|
+ @SysLog("重新结算")
|
|
|
@PostMapping("/settleReIssue")
|
|
|
public R settleReIssue(@RequestBody WmScorePackageSettleInput input) {
|
|
|
- if(StringUtils.isEmpty(input.getId())){
|
|
|
+ if (StringUtils.isEmpty(input.getId())) {
|
|
|
return R.failed("数据异常");
|
|
|
}
|
|
|
|
|
@@ -187,8 +192,14 @@ public class WmPayOffController {
|
|
|
return wmPayOffService.settleReIssueBySubType(input);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 发起结算
|
|
|
+ *
|
|
|
+ * @param input 提交参数
|
|
|
+ * @return 提交结果
|
|
|
+ */
|
|
|
@ApiOperation(value = "结算", notes = "结算")
|
|
|
- @SysLog("结算" )
|
|
|
+ @SysLog("结算")
|
|
|
@PostMapping("/settleById")
|
|
|
public R settleById(@RequestBody WmScorePackageSettleInput input) {
|
|
|
|
|
@@ -196,12 +207,19 @@ public class WmPayOffController {
|
|
|
}
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
+ * 财务审核页面
|
|
|
+ *
|
|
|
+ * @param page 分页信息
|
|
|
+ * @param input 参数
|
|
|
+ * @return
|
|
|
+ */
|
|
|
@ApiOperation(value = "分页查询结算", notes = "分页查询结算")
|
|
|
- @SysLog("分页查询结算" )
|
|
|
+ @SysLog("分页查询结算")
|
|
|
@GetMapping("/listPackageSettleList")
|
|
|
public R listPackageSettleList(Page page, WmScorePackageSettleInput input) {
|
|
|
|
|
|
- input.setSendPackageDeptId(SecurityUtils.getUser().getDeptId() +"");
|
|
|
+ input.setSendPackageDeptId(SecurityUtils.getUser().getDeptId() + "");
|
|
|
input.setPackageFinishStatus("1");
|
|
|
input.setTypeid("4");
|
|
|
input.setSettleFlag("1");
|
|
@@ -217,10 +235,10 @@ public class WmPayOffController {
|
|
|
*/
|
|
|
@ApiOperation(value = "积分包结算导出", notes = "积分包结算导出")
|
|
|
@ResponseExcel(name = "exportPackageSettle", sheet = "积分包结算数据")
|
|
|
- @SysLog("积分包结算导出" )
|
|
|
+ @SysLog("积分包结算导出")
|
|
|
@GetMapping("/exportPackageSettle")
|
|
|
public List<WmScorePackageSettleExcelModel> exportPackageSettle(WmScorePackageSettleInput input) {
|
|
|
- input.setSendPackageDeptId(SecurityUtils.getUser().getDeptId() +"");
|
|
|
+ input.setSendPackageDeptId(SecurityUtils.getUser().getDeptId() + "");
|
|
|
input.setPackageFinishStatus("1");
|
|
|
input.setTypeid("4");
|
|
|
input.setSettleFlag("1");
|
|
@@ -243,7 +261,7 @@ public class WmPayOffController {
|
|
|
|
|
|
SubjectTypeEnum subjectTypeEnum = SubjectTypeEnum.resolve(settleOutput.getSubType());
|
|
|
export.setSubType(subjectTypeEnum.getDesc());
|
|
|
- switch (subjectTypeEnum){
|
|
|
+ switch (subjectTypeEnum) {
|
|
|
case TYPE_RENLIJIA:
|
|
|
export.setInvoiceCategory(WmScorePackageSettleExcelModel.DingCategoryEnum.resolve(settleOutput.getInvoiceCategory()).getDesc());
|
|
|
break;
|
|
@@ -265,15 +283,15 @@ public class WmPayOffController {
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "结算", notes = "结算")
|
|
|
- @SysLog("结算" )
|
|
|
+ @SysLog("结算")
|
|
|
@PostMapping("/saveSettleInfo")
|
|
|
- public R saveSettleInfo(@RequestBody List<WmScorePackage> wsList){
|
|
|
- if(CollectionUtils.isEmpty(wsList)) {
|
|
|
+ public R saveSettleInfo(@RequestBody List<WmScorePackage> wsList) {
|
|
|
+ if (CollectionUtils.isEmpty(wsList)) {
|
|
|
return R.failed("请选择数据");
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
for (WmScorePackage wmScorePackage : wsList) {
|
|
|
- if(StringUtils.isEmpty(wmScorePackage.getId())){
|
|
|
- return R.failed("数据异常,请联系管理员:"+wmScorePackage.getScoreName());
|
|
|
+ if (StringUtils.isEmpty(wmScorePackage.getId())) {
|
|
|
+ return R.failed("数据异常,请联系管理员:" + wmScorePackage.getScoreName());
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -286,23 +304,23 @@ public class WmPayOffController {
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "结算-自由选择渠道", notes = "结算-自由选择渠道")
|
|
|
- @SysLog("结算-自由选择渠道" )
|
|
|
+ @SysLog("结算-自由选择渠道")
|
|
|
@PostMapping("/settleIssueBySubType")
|
|
|
public R settleIssueBySubType(@RequestBody WmScorePackageSettleInput input) {
|
|
|
- if(StringUtils.isEmpty(input.getId())){
|
|
|
+ if (StringUtils.isEmpty(input.getId())) {
|
|
|
return R.failed("数据异常");
|
|
|
}
|
|
|
- if(StringUtils.isEmpty(input.getSubType())){
|
|
|
+ if (StringUtils.isEmpty(input.getSubType())) {
|
|
|
return R.failed("数据异常");
|
|
|
}
|
|
|
- if(CollectionUtils.isEmpty(input.getNotes())){
|
|
|
+ if (CollectionUtils.isEmpty(input.getNotes())) {
|
|
|
return R.failed("数据异常");
|
|
|
}
|
|
|
- if(null == input.getInvoiceCategory()){
|
|
|
+ if (null == input.getInvoiceCategory()) {
|
|
|
return R.failed("数据异常");
|
|
|
}
|
|
|
|
|
|
- if(StringUtils.isEmpty(input.getScorePackageName())){
|
|
|
+ if (StringUtils.isEmpty(input.getScorePackageName())) {
|
|
|
return R.failed("数据异常");
|
|
|
}
|
|
|
|
|
@@ -315,7 +333,7 @@ public class WmPayOffController {
|
|
|
* @param inputList
|
|
|
* @return
|
|
|
*/
|
|
|
- @SysLog("批量财务结算" )
|
|
|
+ @SysLog("批量财务结算")
|
|
|
@PostMapping("/batch-financial-settle")
|
|
|
public R<?> batchFinancialSettle(@RequestBody List<WmScorePackageSettleInput> inputList) {
|
|
|
if (CollectionUtil.isEmpty(inputList)) {
|
|
@@ -323,8 +341,8 @@ public class WmPayOffController {
|
|
|
}
|
|
|
List<Map<String, String>> msgList = new ArrayList<>();
|
|
|
for (WmScorePackageSettleInput input : inputList) {
|
|
|
- if(StringUtils.isEmpty(input.getId()) || StringUtils.isEmpty(input.getSubType())
|
|
|
- || null == input.getInvoiceCategory() || StringUtils.isEmpty(input.getScorePackageName())) {
|
|
|
+ if (StringUtils.isEmpty(input.getId()) || StringUtils.isEmpty(input.getSubType())
|
|
|
+ || null == input.getInvoiceCategory() || StringUtils.isEmpty(input.getScorePackageName())) {
|
|
|
return R.failed("数据异常");
|
|
|
}
|
|
|
// 查询结算详情(用于拼接notes数据)
|