|
@@ -104,6 +104,7 @@ public class WmScorePackageController {
|
|
|
private final SysDeptRechargeRecordMapper sysDeptRechargeRecordMapper;
|
|
|
private final SysDeptRechargeMapper sysDeptRechargeMapper;
|
|
|
private final StringRedisTemplate redisTemplate;
|
|
|
+ private final WmPkgQuizRelationService pkgQuizRelationService;
|
|
|
private final Sequence pkgSequence;
|
|
|
|
|
|
/**
|
|
@@ -1342,11 +1343,11 @@ public class WmScorePackageController {
|
|
|
*/
|
|
|
@GetMapping("/selectWmScorePackageLists")
|
|
|
public R<?> selectWmScorePackageList(@RequestParam(value = "current") Integer current,
|
|
|
- @RequestParam(value = "size") Integer size,
|
|
|
- @RequestParam(value = "scorePackageName", required = false) String scorePackageName,
|
|
|
- @RequestParam(value = "acceptSug", required = false) String acceptSug,
|
|
|
- @RequestParam(value = "allocationDate", required = false) LocalDate allocationDate,
|
|
|
- @RequestParam(value = "endLabelDate", required = false) LocalDate endLabelDate) {
|
|
|
+ @RequestParam(value = "size") Integer size,
|
|
|
+ @RequestParam(value = "scorePackageName", required = false) String scorePackageName,
|
|
|
+ @RequestParam(value = "acceptSug", required = false) String acceptSug,
|
|
|
+ @RequestParam(value = "allocationDate", required = false) LocalDate allocationDate,
|
|
|
+ @RequestParam(value = "endLabelDate", required = false) LocalDate endLabelDate) {
|
|
|
|
|
|
Page<WmScorePackage> pageAnswer = wmScorePackageService.selectWmScorePackageLists(new Page<>(current, size),
|
|
|
scorePackageName, acceptSug, allocationDate, endLabelDate);
|
|
@@ -1862,6 +1863,16 @@ public class WmScorePackageController {
|
|
|
sysDeptRechargeRecordMapper.insert(rechargeRecord);
|
|
|
}
|
|
|
|
|
|
+ // 保存关联的试卷
|
|
|
+ if (CollUtil.isNotEmpty(wmScorePackage.getQuizIds())) {
|
|
|
+ pkgQuizRelationService.createPkgQuizzes(wmScorePackage.getQuizIds(), Integer.parseInt(wmScorePackage.getId()));
|
|
|
+ }
|
|
|
+
|
|
|
+ // 判断是否有关联关系
|
|
|
+ if (CollUtil.isNotEmpty(wmScorePackage.getQuizRelationIds())) {
|
|
|
+ pkgQuizRelationService.copyQuizRelations(wmScorePackage.getQuizRelationIds(), Integer.parseInt(wmScorePackage.getId()));
|
|
|
+ }
|
|
|
+
|
|
|
return R.ok();
|
|
|
}
|
|
|
|
|
@@ -2517,14 +2528,14 @@ public class WmScorePackageController {
|
|
|
@ApiOperation(value = "分页查询", notes = "分页查询")
|
|
|
@GetMapping("/page-settle-package")
|
|
|
public R<?> pageSettlePackage(@RequestParam(value = "current") Integer current,
|
|
|
- @RequestParam(value = "size") Integer size,
|
|
|
- @RequestParam(value = "packageType1") String packageType1,
|
|
|
- @RequestParam(value = "packageType2") Integer packageType2,
|
|
|
- @RequestParam(value = "scorePackageName", required = false) String scorePackageName,
|
|
|
- @RequestParam(value = "scorePackageStatus", required = false) Integer scorePackageStatus,
|
|
|
- @RequestParam(value = "typeid", required = false) String typeId,
|
|
|
- @RequestParam(value = "monthStart", required = false) String monthStart,
|
|
|
- @RequestParam(value = "monthEnd", required = false) String monthEnd
|
|
|
+ @RequestParam(value = "size") Integer size,
|
|
|
+ @RequestParam(value = "packageType1") String packageType1,
|
|
|
+ @RequestParam(value = "packageType2") Integer packageType2,
|
|
|
+ @RequestParam(value = "scorePackageName", required = false) String scorePackageName,
|
|
|
+ @RequestParam(value = "scorePackageStatus", required = false) Integer scorePackageStatus,
|
|
|
+ @RequestParam(value = "typeid", required = false) String typeId,
|
|
|
+ @RequestParam(value = "monthStart", required = false) String monthStart,
|
|
|
+ @RequestParam(value = "monthEnd", required = false) String monthEnd
|
|
|
) {
|
|
|
|
|
|
Integer sendDeptId = SecurityUtils.getUser().getDeptId();
|
|
@@ -2719,7 +2730,6 @@ public class WmScorePackageController {
|
|
|
* @param wmScorePackage 积分包
|
|
|
* @return R
|
|
|
*/
|
|
|
- @ApiOperation(value = "新增积分包", notes = "新增积分包")
|
|
|
@SysLog("新增积分包(小包)")
|
|
|
@PostMapping("/addWmScorePackage")
|
|
|
public R<?> addWmScorePackage(@RequestBody WmScorePackage wmScorePackage) {
|
|
@@ -2741,7 +2751,6 @@ public class WmScorePackageController {
|
|
|
wmScorePackage.setSubType(String.valueOf(location.getGigType().getCode()));
|
|
|
}
|
|
|
|
|
|
-
|
|
|
return wmScorePackageService.addWmScorePackage(wmScorePackage);
|
|
|
}
|
|
|
|