licailing 4 anni fa
parent
commit
d47ac62ddd

+ 0 - 70
src/main/java/com/izouma/wenlvju/domain/PerformanceApply.java

@@ -1,70 +0,0 @@
-package com.izouma.wenlvju.domain;
-
-import com.izouma.wenlvju.enums.ApplyStatus;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.AllArgsConstructor;
-import lombok.Builder;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-
-import javax.persistence.Entity;
-import javax.persistence.EnumType;
-import javax.persistence.Enumerated;
-import javax.persistence.Transient;
-import java.time.LocalDateTime;
-
-@Data
-@AllArgsConstructor
-@NoArgsConstructor
-@Builder
-@Entity
-@ApiModel(value = "展演报名")
-public class PerformanceApply extends BaseEntity {
-    private Long performanceId;
-
-    private Long organizationId;
-
-    @ApiModelProperty(value = "作品名称")
-    private String composition;
-
-    @ApiModelProperty(value = "专业")
-    private Long artTypeId;
-
-    @ApiModelProperty(value = "指导老师")
-    private String teacher;
-
-    @ApiModelProperty(value = "联系人")
-    private String contact;
-
-    @ApiModelProperty(value = "联系电话")
-    private String phone;
-
-    @Enumerated(EnumType.STRING)
-    @ApiModelProperty(value = "状态")
-    private ApplyStatus status;
-
-    @ApiModelProperty(value = "表演开始时间")
-    private LocalDateTime showStartTime;
-
-    @ApiModelProperty(value = "表演结束时间")
-    private LocalDateTime showEndTime;
-
-    @ApiModelProperty(value = "奖项")
-    private String awards;
-
-    private Double score;
-
-    @ApiModelProperty(value = "签到时间")
-    private LocalDateTime signInAt;
-
-    @ApiModelProperty(value = "签到人")
-    private Long signInBy;
-
-    @Transient
-    private String artType;
-
-    @Transient
-    private String organizer;
-
-}

+ 0 - 24
src/main/java/com/izouma/wenlvju/domain/PerformanceScore.java

@@ -1,24 +0,0 @@
-package com.izouma.wenlvju.domain;
-
-import lombok.AllArgsConstructor;
-import lombok.Builder;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-import org.hibernate.annotations.Where;
-
-import javax.persistence.Entity;
-
-@Data
-@AllArgsConstructor
-@NoArgsConstructor
-@Builder
-@Entity
-@Where(clause = "del = 0")
-public class PerformanceScore extends BaseEntity {
-    private Long performanceApplyId;
-
-    private double score;
-
-    private Long userId;
-
-}

+ 0 - 21
src/main/java/com/izouma/wenlvju/domain/Person.java

@@ -1,21 +0,0 @@
-package com.izouma.wenlvju.domain;
-
-import io.swagger.annotations.ApiModel;
-import lombok.AllArgsConstructor;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-
-import javax.persistence.Entity;
-
-@Data
-@AllArgsConstructor
-@NoArgsConstructor
-@ApiModel(value = "参演人员")
-@Entity
-public class Person extends BaseEntity {
-    private Long performanceApplyId;
-
-    private String name;
-
-    private String phone;
-}

+ 0 - 27
src/main/java/com/izouma/wenlvju/repo/PerformanceApplyRepo.java

@@ -1,27 +0,0 @@
-package com.izouma.wenlvju.repo;
-
-import com.izouma.wenlvju.domain.PerformanceApply;
-import com.izouma.wenlvju.enums.ApplyStatus;
-import org.springframework.data.jpa.repository.JpaRepository;
-import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
-import org.springframework.data.jpa.repository.Modifying;
-import org.springframework.data.jpa.repository.Query;
-
-import javax.transaction.Transactional;
-import java.util.List;
-
-public interface PerformanceApplyRepo extends JpaRepository<PerformanceApply, Long>, JpaSpecificationExecutor<PerformanceApply> {
-    @Query("update PerformanceApply t set t.del = true where t.id = ?1")
-    @Modifying
-    @Transactional
-    void softDelete(Long id);
-
-    @Query("update PerformanceApply t set t.del = true where t.performanceId = ?1")
-    @Modifying
-    @Transactional
-    void softDeleteByPerformanceId(Long performanceId);
-
-    List<PerformanceApply> findAllByStatusAndPerformanceId(ApplyStatus status, Long performanceId);
-
-//    List<PerformanceApply> findAllByShowTimeIsNotNullAndPerformanceId(Long performanceId);
-}

+ 0 - 21
src/main/java/com/izouma/wenlvju/repo/PerformanceScoreRepo.java

@@ -1,21 +0,0 @@
-package com.izouma.wenlvju.repo;
-
-import com.izouma.wenlvju.domain.PerformanceScore;
-import org.springframework.data.jpa.repository.JpaRepository;
-import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
-import org.springframework.data.jpa.repository.Modifying;
-import org.springframework.data.jpa.repository.Query;
-
-import javax.transaction.Transactional;
-import java.util.List;
-
-public interface PerformanceScoreRepo extends JpaRepository<PerformanceScore, Long>, JpaSpecificationExecutor<PerformanceScore> {
-    @Query("update PerformanceScore t set t.del = true where t.id = ?1")
-    @Modifying
-    @Transactional
-    void softDelete(Long id);
-
-    List<PerformanceScore> findAllByPerformanceApplyId(Long performanceApplyId);
-
-    PerformanceScore findByPerformanceApplyIdAndUserId(Long performanceApplyId,Long userId);
-}

+ 0 - 19
src/main/java/com/izouma/wenlvju/repo/PersonRepo.java

@@ -1,19 +0,0 @@
-package com.izouma.wenlvju.repo;
-
-import com.izouma.wenlvju.domain.Person;
-import org.springframework.data.jpa.repository.JpaRepository;
-import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
-import org.springframework.data.jpa.repository.Modifying;
-import org.springframework.data.jpa.repository.Query;
-
-import javax.transaction.Transactional;
-import java.util.List;
-
-public interface PersonRepo extends JpaRepository<Person, Long>, JpaSpecificationExecutor<Person> {
-    @Query("update Person t set t.del = true where t.id = ?1")
-    @Modifying
-    @Transactional
-    void softDelete(Long id);
-
-    List<Person> findAllByPerformanceApplyId(Long performanceApplyId);
-}

+ 0 - 261
src/main/java/com/izouma/wenlvju/service/PerformanceApplyService.java

@@ -1,261 +0,0 @@
-package com.izouma.wenlvju.service;
-
-import cn.hutool.core.util.ObjectUtil;
-import cn.hutool.core.util.StrUtil;
-import com.alibaba.fastjson.JSONObject;
-import com.izouma.wenlvju.domain.*;
-import com.izouma.wenlvju.domain.performance.Performance;
-import com.izouma.wenlvju.dto.PageQuery;
-import com.izouma.wenlvju.enums.ApplyStatus;
-import com.izouma.wenlvju.enums.AuthorityName;
-import com.izouma.wenlvju.exception.BusinessException;
-import com.izouma.wenlvju.repo.*;
-import com.izouma.wenlvju.repo.performance.PerformanceRepo;
-import com.izouma.wenlvju.security.Authority;
-import com.izouma.wenlvju.security.JwtTokenUtil;
-import com.izouma.wenlvju.security.JwtUserFactory;
-import com.izouma.wenlvju.utils.JpaUtils;
-import com.izouma.wenlvju.utils.ObjUtils;
-import lombok.AllArgsConstructor;
-import org.springframework.data.domain.Page;
-import org.springframework.stereotype.Service;
-
-import java.time.LocalDate;
-import java.time.LocalDateTime;
-import java.util.*;
-import java.util.stream.Collectors;
-
-@Service
-@AllArgsConstructor
-public class PerformanceApplyService {
-
-    private final PerformanceApplyRepo performanceApplyRepo;
-    private final PerformanceRepo      performanceRepo;
-    private final ArtTypeRepo          artTypeRepo;
-    private final OrganizationRepo     organizationRepo;
-    private final PersonRepo           personRepo;
-    private final UserRepo             userRepo;
-    private final JwtTokenUtil         jwtTokenUtil;
-    private final PerformanceScoreRepo performanceScoreRepo;
-
-    public Page<PerformanceApply> all(PageQuery pageQuery) {
-        Page<PerformanceApply> all = performanceApplyRepo.findAll(JpaUtils.toSpecification(pageQuery, PerformanceApply.class), JpaUtils
-                .toPageRequest(pageQuery));
-        Set<Long> artTypeId = new HashSet<>();
-        Set<Long> organizationId = new HashSet<>();
-        all.forEach(apply -> {
-            artTypeId.add(apply.getArtTypeId());
-            organizationId.add(apply.getOrganizationId());
-        });
-
-        Map<Long, String> artMap = artTypeRepo.findAllById(artTypeId)
-                .stream()
-                .collect(Collectors.toMap(ArtType::getId, ArtType::getName));
-        Map<Long, String> organzationMap = organizationRepo.findAllById(organizationId)
-                .stream()
-                .collect(Collectors.toMap(Organization::getId, Organization::getName));
-
-        return all.map(apply -> {
-            apply.setArtType(artMap.get(apply.getArtTypeId()));
-            apply.setOrganizer(organzationMap.get(apply.getOrganizationId()));
-            return apply;
-        });
-
-    }
-
-    public void audit(Long id, Boolean pass) {
-        PerformanceApply apply = performanceApplyRepo.findById(id).orElseThrow(new BusinessException("无此展演申请"));
-        if (pass) {
-            apply.setStatus(ApplyStatus.PASS);
-        } else {
-            apply.setStatus(ApplyStatus.DENY);
-        }
-        performanceApplyRepo.save(apply);
-    }
-
-    public List<PerformanceApply> autoArrangement1(Long performanceId) {
-        Performance performance = performanceRepo.findById(performanceId).orElseThrow(new BusinessException("无记录"));
-        if (LocalDate.now().isBefore(performance.getEndDate())) {
-            throw new BusinessException("报名结束后才可以自动编排");
-        }
-
-        // 只编排通过的
-        List<PerformanceApply> applyList =
-                performanceApplyRepo.findAllByStatusAndPerformanceId(ApplyStatus.PASS, performanceId);
-//        LocalDate startDate = performance.getEventStartDate();
-//        LocalDate endDate = performance.getEndDate();
-//        LocalTime dayStart = performance.getMorningStartTime();
-//        LocalTime dayEnd = performance.getMorningEndTime();
-//        Long length = performance.getProgrammeLength();
-
-//        LocalTime dayChange = dayStart;
-//        for (PerformanceApply apply : applyList) {
-//            if (start.isAfter(endDate)) {
-//                throw new BusinessException("展示时间过短,请编辑展演结束时间。");
-//            }
-//            if (dayChange.isAfter(dayEnd)) {
-//                dayChange = performance.getAfternoonStartTime();
-//            }
-//            apply.setShowStartTime(LocalDateTime.of(startDate, dayChange));
-//            dayChange = dayChange.plusMinutes(30);
-//            apply.setShowEndTime(LocalDateTime.of(startDate, dayChange));
-//        }
-
-
-        Set<Long> artTypeId = new HashSet<>();
-        Set<Long> organizationId = new HashSet<>();
-        applyList.forEach(apply -> {
-            artTypeId.add(apply.getArtTypeId());
-            organizationId.add(apply.getOrganizationId());
-        });
-
-        Map<Long, String> artMap = artTypeRepo.findAllById(artTypeId)
-                .stream()
-                .collect(Collectors.toMap(ArtType::getId, ArtType::getName));
-        Map<Long, String> organzationMap = organizationRepo.findAllById(organizationId)
-                .stream()
-                .collect(Collectors.toMap(Organization::getId, Organization::getName));
-        applyList.forEach(apply -> {
-            apply.setArtType(artMap.get(apply.getArtTypeId()));
-            apply.setOrganizer(organzationMap.get(apply.getOrganizationId()));
-        });
-        return applyList;
-    }
-
-
-    public void saveArrangement(String applies) {
-        if (StrUtil.isEmpty(applies)) {
-            return;
-        }
-        List<PerformanceApply> applyList = JSONObject.parseArray(applies, PerformanceApply.class);
-        List<Long> ids = applyList.stream().map(PerformanceApply::getId).collect(Collectors.toList());
-        Map<Long, PerformanceApply> applyMap = performanceApplyRepo.findAllById(ids)
-                .stream()
-                .collect(Collectors.toMap(PerformanceApply::getId, apply -> apply));
-
-        applyList.forEach(list -> {
-            PerformanceApply apply = applyMap.get(list.getId());
-            if (ObjectUtil.isNotNull(apply)) {
-                ObjUtils.merge(apply, list);
-                performanceApplyRepo.save(apply);
-            }
-        });
-    }
-
-    /*
-    自动评奖
-     */
-    public void autoAwards(Long performanceId) {
-//        List<PerformanceApply> applies = performanceApplyRepo.findAllByShowTimeIsNotNullAndPerformanceId(performanceId);
-//        if (CollUtil.isEmpty(applies)) {
-//            return;
-//        }
-//        applies.forEach(apply -> {
-//            apply.setAwards("一等奖");
-//            apply.setScore(100);
-//            performanceApplyRepo.save(apply);
-//        });
-    }
-
-    /**
-     * 签到
-     * 由管理人员先登陆,进行签到
-     */
-    public PerformanceApply signIn(Long id, Long userId) {
-        PerformanceApply performanceApply = performanceApplyRepo.findById(id)
-                .orElseThrow(new BusinessException("无此表演"));
-
-        if (ObjectUtil.isNotNull(performanceApply.getSignInAt()) && ObjectUtil.isNotNull(performanceApply.getSignInBy())) {
-            throw new BusinessException("已签到");
-        }
-
-        performanceApply.setSignInAt(LocalDateTime.now());
-        performanceApply.setSignInBy(userId);
-
-        return performanceApplyRepo.save(performanceApply);
-    }
-
-    /**
-     * 扫描作品二维码,通过手机号获取身份
-     */
-    public Map<String, String> getAuth(Long id, String phone, String pPhone) {
-
-        Map<String, String> map = new HashMap<>();
-
-        if (phone.equals(pPhone)) {
-            map.put("phone", phone);
-            return map;
-        }
-
-        List<String> phones = personRepo.findAllByPerformanceApplyId(id)
-                .stream()
-                .map(Person::getPhone)
-                .collect(Collectors.toList());
-        if (phones.contains(phone)) {
-            map.put("phone", phone);
-            return map;
-        }
-
-        User user = userRepo.findByPhoneAndDelFalse(phone);
-        if (ObjectUtil.isNull(user)) {
-            throw new BusinessException("手机号错误");
-        }
-        if (!user.getAuthorities().contains(Authority.get(AuthorityName.ROLE_ADMIN))) {
-            throw new BusinessException("无权限");
-        }
-        String token = jwtTokenUtil.generateToken(JwtUserFactory.create(user));
-        map.put("phone", phone);
-        map.put("token", token);
-        return map;
-    }
-
-    /**
-     * 评分
-     */
-    public void score(Long id, double score, Long userId) {
-        PerformanceApply apply = performanceApplyRepo.findById(id).orElseThrow(new BusinessException("无此表演"));
-        if (!ApplyStatus.PASS.equals(apply.getStatus())) {
-            throw new BusinessException("此节目未通过审核");
-        }
-        if (ObjectUtil.isNull(apply.getShowStartTime())) {
-            throw new BusinessException("无表演时间");
-        }
-        if (LocalDateTime.now().isBefore(apply.getShowStartTime())) {
-            throw new BusinessException("节目暂未开始");
-        }
-        PerformanceScore score1 = performanceScoreRepo.findByPerformanceApplyIdAndUserId(id, userId);
-        if (ObjectUtil.isNotNull(score1)) {
-            throw new BusinessException("已打分");
-        }
-
-        PerformanceScore performanceScore = PerformanceScore.builder()
-                .performanceApplyId(id)
-                .score(score)
-                .userId(userId)
-                .build();
-        performanceScoreRepo.save(performanceScore);
-
-        double scores = performanceScoreRepo.findAllByPerformanceApplyId(id)
-                .stream()
-                .mapToDouble(PerformanceScore::getScore)
-                .average()
-                .orElse(0.0);
-
-        double scores1 = (double) Math.round(scores * 10) / 10;
-        apply.setScore(scores1);
-        performanceApplyRepo.save(apply);
-    }
-
-    /**
-     * 获取相关
-     */
-    public List<PerformanceApply> related(Long id) {
-        PerformanceApply apply = performanceApplyRepo.findById(id).orElseThrow(new BusinessException("无记录"));
-        List<PerformanceApply> applies = performanceApplyRepo.findAllByStatusAndPerformanceId(ApplyStatus.PASS, apply
-                .getPerformanceId());
-        return applies.stream()
-                .filter(app -> app.getShowStartTime().isAfter(apply.getShowStartTime()))
-                .sorted(Comparator.comparing(PerformanceApply::getShowStartTime))
-                .collect(Collectors.toList());
-    }
-}

+ 0 - 22
src/main/java/com/izouma/wenlvju/service/PerformanceScoreService.java

@@ -1,22 +0,0 @@
-package com.izouma.wenlvju.service;
-
-import com.izouma.wenlvju.domain.PerformanceScore;
-import com.izouma.wenlvju.dto.PageQuery;
-import com.izouma.wenlvju.repo.PerformanceScoreRepo;
-import com.izouma.wenlvju.utils.JpaUtils;
-import lombok.AllArgsConstructor;
-import org.springframework.data.domain.Page;
-import org.springframework.stereotype.Service;
-
-import java.util.List;
-
-@Service
-@AllArgsConstructor
-public class PerformanceScoreService {
-
-    private final PerformanceScoreRepo performanceScoreRepo;
-
-    public Page<PerformanceScore> all(PageQuery pageQuery) {
-        return performanceScoreRepo.findAll(JpaUtils.toSpecification(pageQuery, PerformanceScore.class), JpaUtils.toPageRequest(pageQuery));
-    }
-}

+ 0 - 20
src/main/java/com/izouma/wenlvju/service/PersonService.java

@@ -1,20 +0,0 @@
-package com.izouma.wenlvju.service;
-
-import com.izouma.wenlvju.domain.Person;
-import com.izouma.wenlvju.dto.PageQuery;
-import com.izouma.wenlvju.repo.PersonRepo;
-import com.izouma.wenlvju.utils.JpaUtils;
-import lombok.AllArgsConstructor;
-import org.springframework.data.domain.Page;
-import org.springframework.stereotype.Service;
-
-@Service
-@AllArgsConstructor
-public class PersonService {
-
-    private PersonRepo personRepo;
-
-    public Page<Person> all(PageQuery pageQuery) {
-        return personRepo.findAll(JpaUtils.toSpecification(pageQuery, Person.class), JpaUtils.toPageRequest(pageQuery));
-    }
-}

+ 0 - 135
src/main/java/com/izouma/wenlvju/web/PerformanceApplyController.java

@@ -1,135 +0,0 @@
-package com.izouma.wenlvju.web;
-
-import cn.hutool.core.util.ObjectUtil;
-import com.izouma.wenlvju.domain.ArtType;
-import com.izouma.wenlvju.domain.PerformanceApply;
-import com.izouma.wenlvju.dto.PageQuery;
-import com.izouma.wenlvju.enums.ApplyStatus;
-import com.izouma.wenlvju.exception.BusinessException;
-import com.izouma.wenlvju.repo.ArtTypeRepo;
-import com.izouma.wenlvju.repo.PerformanceApplyRepo;
-import com.izouma.wenlvju.service.PerformanceApplyService;
-import com.izouma.wenlvju.utils.ObjUtils;
-import com.izouma.wenlvju.utils.SecurityUtils;
-import com.izouma.wenlvju.utils.excel.ExcelUtils;
-import io.swagger.annotations.ApiOperation;
-import lombok.AllArgsConstructor;
-import org.springframework.data.domain.Page;
-import org.springframework.web.bind.annotation.*;
-
-import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
-import java.util.List;
-import java.util.Map;
-import java.util.stream.Collectors;
-
-@RestController
-@RequestMapping("/performanceApply")
-@AllArgsConstructor
-public class PerformanceApplyController extends BaseController {
-    private final PerformanceApplyService performanceApplyService;
-    private final PerformanceApplyRepo    performanceApplyRepo;
-    private final ArtTypeRepo             artTypeRepo;
-
-    //@PreAuthorize("hasRole('ADMIN')")
-    @PostMapping("/save")
-    public PerformanceApply save(@RequestBody PerformanceApply record) {
-        if (record.getId() != null) {
-            PerformanceApply orig = performanceApplyRepo.findById(record.getId())
-                    .orElseThrow(new BusinessException("无记录"));
-            ObjUtils.merge(orig, record);
-            return performanceApplyRepo.save(orig);
-        }
-        return performanceApplyRepo.save(record);
-    }
-
-
-    //@PreAuthorize("hasRole('ADMIN')")
-    @PostMapping("/all")
-    public Page<PerformanceApply> all(@RequestBody PageQuery pageQuery) {
-        return performanceApplyService.all(pageQuery);
-    }
-
-    @GetMapping("/get/{id}")
-    public PerformanceApply get(@PathVariable Long id, String phone) {
-        PerformanceApply apply = performanceApplyRepo.findById(id).orElseThrow(new BusinessException("无记录"));
-        if (ObjectUtil.isNotNull(apply.getArtTypeId())) {
-            ArtType artType = artTypeRepo.findById(apply.getArtTypeId()).orElseThrow(new BusinessException("无此专业"));
-            apply.setArtType(artType.getName());
-        }
-        performanceApplyService.getAuth(id, phone, apply.getPhone());
-        return apply;
-    }
-
-    @PostMapping("/del/{id}")
-    public void del(@PathVariable Long id) {
-        performanceApplyRepo.softDelete(id);
-    }
-
-    @GetMapping("/excel")
-    @ResponseBody
-    public void excel(HttpServletResponse response, PageQuery pageQuery) throws IOException {
-        List<PerformanceApply> data = all(pageQuery).getContent();
-        ExcelUtils.export(response, data);
-    }
-
-    @PostMapping("/audit")
-    @ApiOperation("提现审核")
-    public void audit(Long id, Boolean pass) {
-        performanceApplyService.audit(id, pass);
-    }
-
-    @PostMapping("/autoArrangement")
-    @ApiOperation("自动编排")
-    public List<PerformanceApply> autoArrangement(@RequestParam Long performanceId) {
-        return performanceApplyService.autoArrangement1(performanceId);
-    }
-
-    @PostMapping("/saveArrangement")
-    @ApiOperation("保存编排")
-    public void saveArrangement(String applies) {
-        performanceApplyService.saveArrangement(applies);
-    }
-
-    @PostMapping("/autoAwards")
-    @ApiOperation("自动评奖")
-    public void autoAwards(@RequestParam Long performanceId) {
-        performanceApplyService.autoAwards(performanceId);
-    }
-
-    @PostMapping("/score")
-    @ApiOperation("打分")
-    public void score(@RequestParam Long id, @RequestParam int score) {
-        performanceApplyService.score(id, score, SecurityUtils.getAuthenticatedUser().getId());
-    }
-
-    @ApiOperation("签到")
-    @PostMapping("/signIn")
-    public PerformanceApply signIn(@RequestParam Long id) {
-        return performanceApplyService.signIn(id, SecurityUtils.getAuthenticatedUser().getId());
-    }
-
-    @ApiOperation("获取手机号/token")
-    @PostMapping("/getAuth")
-    public Map<String, String> getAuth(@RequestParam Long id, @RequestParam String phone) {
-        PerformanceApply performanceApply = performanceApplyRepo.findById(id)
-                .orElseThrow(new BusinessException("无此表演"));
-        return performanceApplyService.getAuth(id, phone, performanceApply.getPhone());
-    }
-
-    @ApiOperation("获取当前节目后续列表")
-    @PostMapping("/related")
-    public List<PerformanceApply> related(Long id) {
-        return performanceApplyService.related(id);
-    }
-
-    @ApiOperation("获取当前活动列表")
-    @PostMapping("/relatedByPer")
-    public List<PerformanceApply> relatedByPer(@RequestParam Long performanceId) {
-        return performanceApplyRepo.findAllByStatusAndPerformanceId(ApplyStatus.PASS, performanceId)
-                .stream()
-                .filter(apply -> ObjectUtil.isNotNull(apply.getSignInAt()) && ObjectUtil.isNotNull(apply.getSignInBy()))
-                .collect(Collectors.toList());
-    }
-}
-

+ 0 - 83
src/main/java/com/izouma/wenlvju/web/PerformanceScoreController.java

@@ -1,83 +0,0 @@
-package com.izouma.wenlvju.web;
-
-import cn.hutool.core.util.ObjectUtil;
-import com.izouma.wenlvju.domain.PerformanceScore;
-import com.izouma.wenlvju.domain.User;
-import com.izouma.wenlvju.service.PerformanceScoreService;
-import com.izouma.wenlvju.dto.PageQuery;
-import com.izouma.wenlvju.exception.BusinessException;
-import com.izouma.wenlvju.repo.PerformanceScoreRepo;
-import com.izouma.wenlvju.utils.ObjUtils;
-import com.izouma.wenlvju.utils.SecurityUtils;
-import com.izouma.wenlvju.utils.excel.ExcelUtils;
-import io.swagger.annotations.ApiOperation;
-import lombok.AllArgsConstructor;
-import org.springframework.data.domain.Page;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.web.bind.annotation.*;
-
-import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
-import java.util.List;
-
-@RestController
-@RequestMapping("/performanceScore")
-@AllArgsConstructor
-public class PerformanceScoreController extends BaseController {
-    private final PerformanceScoreService performanceScoreService;
-    private final PerformanceScoreRepo    performanceScoreRepo;
-
-    //@PreAuthorize("hasRole('ADMIN')")
-    @PostMapping("/save")
-    public PerformanceScore save(@RequestBody PerformanceScore record) {
-        if (record.getId() != null) {
-            PerformanceScore orig = performanceScoreRepo.findById(record.getId())
-                    .orElseThrow(new BusinessException("无记录"));
-            ObjUtils.merge(orig, record);
-            return performanceScoreRepo.save(orig);
-        }
-        return performanceScoreRepo.save(record);
-    }
-
-
-    //@PreAuthorize("hasRole('ADMIN')")
-    @PostMapping("/all")
-    public Page<PerformanceScore> all(@RequestBody PageQuery pageQuery) {
-        return performanceScoreService.all(pageQuery);
-    }
-
-    @GetMapping("/get/{id}")
-    public PerformanceScore get(@PathVariable Long id) {
-        return performanceScoreRepo.findById(id).orElseThrow(new BusinessException("无记录"));
-    }
-
-    @PostMapping("/del/{id}")
-    public void del(@PathVariable Long id) {
-        performanceScoreRepo.softDelete(id);
-    }
-
-    @GetMapping("/excel")
-    @ResponseBody
-    public void excel(HttpServletResponse response, PageQuery pageQuery) throws IOException {
-        List<PerformanceScore> data = all(pageQuery).getContent();
-        ExcelUtils.export(response, data);
-    }
-
-    @ApiOperation("打分细则")
-    @PostMapping("/breakdown")
-    public List<PerformanceScore> breakdown(@RequestParam Long performanceApplyId) {
-
-        return performanceScoreRepo.findAllByPerformanceApplyId(performanceApplyId);
-    }
-
-    @ApiOperation("评分此节目打分")
-    @PostMapping("/myScore")
-    public PerformanceScore myScore(@RequestParam Long performanceApplyId) {
-        User user = SecurityUtils.getAuthenticatedUser();
-        if (ObjectUtil.isNull(user)) {
-            return null;
-        }
-        return performanceScoreRepo.findByPerformanceApplyIdAndUserId(performanceApplyId, user.getId());
-    }
-}
-

+ 0 - 66
src/main/java/com/izouma/wenlvju/web/PersonController.java

@@ -1,66 +0,0 @@
-package com.izouma.wenlvju.web;
-
-import com.izouma.wenlvju.domain.Person;
-import com.izouma.wenlvju.service.PersonService;
-import com.izouma.wenlvju.dto.PageQuery;
-import com.izouma.wenlvju.exception.BusinessException;
-import com.izouma.wenlvju.repo.PersonRepo;
-import com.izouma.wenlvju.utils.ObjUtils;
-import com.izouma.wenlvju.utils.excel.ExcelUtils;
-import lombok.AllArgsConstructor;
-import org.springframework.data.domain.Page;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.web.bind.annotation.*;
-
-import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
-import java.util.List;
-
-@RestController
-@RequestMapping("/person")
-@AllArgsConstructor
-public class PersonController extends BaseController {
-    private PersonService personService;
-    private PersonRepo    personRepo;
-
-    //@PreAuthorize("hasRole('ADMIN')")
-    @PostMapping("/save")
-    public Person save(@RequestBody Person record) {
-        if (record.getId() != null) {
-            Person orig = personRepo.findById(record.getId()).orElseThrow(new BusinessException("无记录"));
-            ObjUtils.merge(orig, record);
-            return personRepo.save(orig);
-        }
-        return personRepo.save(record);
-    }
-
-
-    //@PreAuthorize("hasRole('ADMIN')")
-    @PostMapping("/all")
-    public Page<Person> all(@RequestBody PageQuery pageQuery) {
-        return personService.all(pageQuery);
-    }
-
-    @GetMapping("/get/{id}")
-    public Person get(@PathVariable Long id) {
-        return personRepo.findById(id).orElseThrow(new BusinessException("无记录"));
-    }
-
-    @PostMapping("/del/{id}")
-    public void del(@PathVariable Long id) {
-        personRepo.softDelete(id);
-    }
-
-    @GetMapping("/excel")
-    @ResponseBody
-    public void excel(HttpServletResponse response, PageQuery pageQuery) throws IOException {
-        List<Person> data = all(pageQuery).getContent();
-        ExcelUtils.export(response, data);
-    }
-
-    @PostMapping("/byPerApplyId")
-    public List<Person> byPerApplyId(@RequestParam Long perApplyId) {
-        return personRepo.findAllByPerformanceApplyId(perApplyId);
-    }
-}
-

+ 0 - 43
src/main/vue/src/router.js

@@ -312,49 +312,6 @@ const router = new Router({
                         title: '展演详情'
                     }
                 },
-                {
-                    path: '/performanceApplyEdit',
-                    name: 'PerformanceApplyEdit',
-                    component: () =>
-                        import(/* webpackChunkName: "performanceApplyEdit" */ '@/views/PerformanceApplyEdit.vue'),
-                    meta: {
-                        title: '展演报名编辑'
-                    }
-                },
-                {
-                    path: '/performanceApplyList',
-                    name: 'PerformanceApplyList',
-                    component: () =>
-                        import(/* webpackChunkName: "performanceApplyList" */ '@/views/PerformanceApplyList.vue'),
-                    meta: {
-                        title: '展演报名'
-                    }
-                },
-                {
-                    path: '/performanceApplyList2',
-                    name: 'PerformanceApplyList2',
-                    component: () =>
-                        import(/* webpackChunkName: "performanceApplyList" */ '@/views/PerformanceApplyList2.vue'),
-                    meta: {
-                        title: '展演报名'
-                    }
-                },
-                {
-                    path: '/personEdit',
-                    name: 'PersonEdit',
-                    component: () => import(/* webpackChunkName: "personEdit" */ '@/views/PersonEdit.vue'),
-                    meta: {
-                        title: '参演人员编辑'
-                    }
-                },
-                {
-                    path: '/personList',
-                    name: 'PersonList',
-                    component: () => import(/* webpackChunkName: "personList" */ '@/views/PersonList.vue'),
-                    meta: {
-                        title: '参演人员'
-                    }
-                },
                 {
                     path: '/rateEdit',
                     name: 'RateEdit',

+ 0 - 174
src/main/vue/src/views/PerformanceApplyEdit.vue

@@ -1,174 +0,0 @@
-<template>
-    <div class="edit-view">
-        <el-form
-            :model="formData"
-            :rules="rules"
-            ref="form"
-            label-width="80px"
-            label-position="right"
-            size="small"
-            style="max-width: 500px;"
-        >
-            <!-- <el-form-item prop="agency" label="选送机构">
-                <el-input v-model="formData.agency"></el-input>
-            </el-form-item> -->
-            <el-form-item prop="composition" label="作品名称">
-                <el-input v-model="formData.composition" :readonly="!organization"></el-input>
-            </el-form-item>
-            <el-form-item prop="artTypeId" label="专业">
-                <el-cascader
-                    ref="artCascader"
-                    style="width: 100%"
-                    v-model="formData.artTypeId"
-                    :props="optionProps"
-                    :options="artTypes"
-                    :show-all-levels="false"
-                    placeholder="请选择专业"
-                    :disabled="!organization"
-                >
-                </el-cascader>
-            </el-form-item>
-            <el-form-item prop="teacher" label="指导老师">
-                <el-input v-model="formData.teacher" :readonly="!organization"></el-input>
-            </el-form-item>
-            <el-form-item prop="contact" label="联系人">
-                <el-input v-model="formData.contact" :readonly="!organization"></el-input>
-            </el-form-item>
-            <el-form-item prop="phone" label="联系电话">
-                <el-input v-model="formData.phone" :readonly="!organization"></el-input>
-            </el-form-item>
-            <!-- <el-form-item prop="status" label="状态">
-                <el-select v-model="formData.status" clearable filterable placeholder="请选择">
-                    <el-option v-for="item in statusOptions" :key="item.value" :label="item.label" :value="item.value">
-                    </el-option>
-                </el-select>
-            </el-form-item> -->
-            <!-- <el-form-item prop="showTime" label="表演时间">
-                <el-date-picker
-                    v-model="formData.showTime"
-                    type="datetime"
-                    value-format="yyyy-MM-dd HH:mm:ss"
-                    placeholder="选择日期时间"
-                >
-                </el-date-picker>
-            </el-form-item> -->
-            <el-form-item>
-                <el-button @click="onSave" :loading="saving" type="primary" v-if="organization">保存</el-button>
-                <el-button @click="onDelete" :loading="saving" type="danger" v-if="formData.id">删除 </el-button>
-                <el-button @click="$router.go(-1)">取消</el-button>
-            </el-form-item>
-        </el-form>
-    </div>
-</template>
-<script>
-import { mapState } from 'vuex';
-import delChild from '@/mixins/delChild';
-export default {
-    name: 'PerformanceApplyEdit',
-    mixins: [delChild],
-    created() {
-        if (this.$route.query.id) {
-            this.$http
-                .get('performanceApply/get/' + this.$route.query.id)
-                .then(res => {
-                    this.formData = res;
-                })
-                .catch(e => {
-                    console.log(e);
-                    this.$message.error(e.error);
-                });
-        }
-        this.$http
-            .post('/artType/allList')
-            .then(res => {
-                this.artTypes = this.delChild(res);
-            })
-            .catch(e => {
-                console.log(e);
-            });
-    },
-    computed: {
-        ...mapState(['organization'])
-    },
-    data() {
-        return {
-            saving: false,
-            formData: {},
-            rules: {
-                phone: {
-                    pattern: /^1[3-9]\d{9}$/,
-                    message: '请输入正确的手机号',
-                    trigger: 'blur'
-                }
-            },
-            statusOptions: [
-                { label: '审核中', value: 'PENDING' },
-                { label: '通过', value: 'PASS' },
-                { label: '拒绝', value: 'DENY' }
-            ],
-            optionProps: {
-                value: 'id',
-                label: 'name',
-                children: 'children',
-                multiple: false,
-                emitPath: false,
-                checkStrictly: true,
-                expandTrigger: 'hover'
-            },
-            artTypes: []
-        };
-    },
-    methods: {
-        onSave() {
-            this.$refs.form.validate(valid => {
-                if (valid) {
-                    this.submit();
-                } else {
-                    return false;
-                }
-            });
-        },
-        submit() {
-            let data = { ...this.formData };
-            data.performanceId = Number(this.$route.query.perforId);
-            data.organizationId = this.organization.id;
-            data.status = 'PENDING';
-            this.saving = true;
-            this.$http
-                .post('/performanceApply/save', data, { body: 'json' })
-                .then(res => {
-                    this.saving = false;
-                    this.$message.success('成功');
-                    this.$router.go(-1);
-                })
-                .catch(e => {
-                    console.log(e);
-                    this.saving = false;
-                    this.$message.error(e.error);
-                });
-        },
-        onDelete() {
-            this.$alert('删除将无法恢复,确认要删除么?', '警告', { type: 'error' })
-                .then(() => {
-                    return this.$http.post(`/performanceApply/del/${this.formData.id}`);
-                })
-                .then(() => {
-                    this.$message.success('删除成功');
-                    this.$router.go(-1);
-                })
-                .catch(e => {
-                    if (e !== 'cancel') {
-                        console.log(e);
-                        this.$message.error((e || {}).error || '删除失败');
-                    }
-                });
-        }
-    }
-};
-</script>
-<style lang="less" scoped>
-/deep/ .el-input.is-disabled .el-input__inner {
-    background-color: #ffffff;
-    color: #606266;
-}
-</style>

+ 0 - 348
src/main/vue/src/views/PerformanceApplyList.vue

@@ -1,348 +0,0 @@
-<template>
-    <div class="list-view">
-        <div class="filters-container">
-            <!-- <el-input placeholder="输入关键字" v-model="search" clearable class="filter-item"></el-input>
-            <el-button @click="getData" type="primary" icon="el-icon-search" class="filter-item">搜索 </el-button> -->
-            <el-button @click="addRow" type="primary" icon="el-icon-plus" class="filter-item" v-if="canSign"
-                >添加报名
-            </el-button>
-            <!-- <el-button
-                @click="download"
-                type="primary"
-                icon="el-icon-download"
-                :loading="downloading"
-                class="filter-item"
-                >导出EXCEL
-            </el-button> -->
-        </div>
-        <el-table
-            :data="tableData"
-            row-key="id"
-            ref="table"
-            header-row-class-name="table-header-row"
-            header-cell-class-name="table-header-cell"
-            row-class-name="table-row"
-            cell-class-name="table-cell"
-            :height="tableHeight"
-        >
-            <el-table-column v-if="multipleMode" align="center" type="selection" width="50"> </el-table-column>
-            <!-- <el-table-column prop="id" label="ID" width="100"> </el-table-column> -->
-            <el-table-column prop="composition" label="作品名称"> </el-table-column>
-            <el-table-column prop="artType" label="专业"> </el-table-column>
-            <el-table-column prop="teacher" label="指导老师"> </el-table-column>
-            <el-table-column prop="organizer" label="选送机构"> </el-table-column>
-            <el-table-column prop="contact" label="联系人"> </el-table-column>
-            <el-table-column prop="phone" label="联系电话"> </el-table-column>
-            <el-table-column prop="status" label="状态" :formatter="statusFormatter"> </el-table-column>
-            <el-table-column prop="showTime" label="表演时间" min-width="140" show-overflow-tooltip
-                ><template slot-scope="{ row }">
-                    <span v-if="row.showStartTime">{{ row.showStartTime }} 至 {{ row.showEndTime }}</span>
-                    <span v-else>暂无</span>
-                </template></el-table-column
-            >
-            <el-table-column label="操作" align="left" fixed="right" min-width="220">
-                <template slot-scope="{ row }">
-                    <!-- <el-button @click="deleteRow(row)" type="danger" size="mini" plain>删除</el-button> -->
-                    <el-button @click="showDialog(row)" type="primary" size="mini" plain>参演人员维护</el-button>
-                    <el-button @click="editRow(row)" type="primary" size="mini" plain v-if="row.status != 'PASS'">
-                        编辑
-                    </el-button>
-                    <el-button @click="showCode(row)" type="primary" size="mini" plain v-if="row.status == 'PASS'">
-                        二维码
-                    </el-button>
-                </template>
-            </el-table-column>
-        </el-table>
-        <div class="pagination-wrapper">
-            <!-- <div class="multiple-mode-wrapper">
-                <el-button v-if="!multipleMode" @click="toggleMultipleMode(true)">批量编辑</el-button>
-                <el-button-group v-else>
-                    <el-button @click="operation1">批量操作1</el-button>
-                    <el-button @click="operation2">批量操作2</el-button>
-                    <el-button @click="toggleMultipleMode(false)">取消</el-button>
-                </el-button-group>
-            </div> -->
-            <el-pagination
-                background
-                @size-change="onSizeChange"
-                @current-change="onCurrentChange"
-                :current-page="page"
-                :page-sizes="[10, 20, 30, 40, 50]"
-                :page-size="pageSize"
-                layout="total, sizes, prev, pager, next, jumper"
-                :total="totalElements"
-            >
-            </el-pagination>
-        </div>
-
-        <el-dialog title="参演人员" :visible.sync="dialogVisible" width="500px" center>
-            <div>
-                <!-- <span class="span-size">姓名</span> <span class="span-size">手机号</span>
-                <div v-for="item in person" :key="item.id" style="padding: 10px 10px 10px 100px">
-                    <span class="span-size">{{ item.name }}</span> <span class="span-size">{{ item.phone }}</span>
-                </div> -->
-                <el-table :data="person">
-                    <el-table-column prop="name" label="姓名" align="center"></el-table-column>
-                    <el-table-column prop="phone" label="手机号" align="center"></el-table-column>
-                    <el-table-column label="操作" align="center"
-                        ><template slot-scope="{ row }">
-                            <el-link style="font-size: 13px;" @click="deletePerson(row)" type="danger" size="mini" plain
-                                >删除</el-link
-                            >
-                        </template></el-table-column
-                    >
-                </el-table>
-                <div style="margin: 10px 170px 0">
-                    <el-button class="dia-mar" type="primary" @click="add = true" v-if="!add" size="mini"
-                        >添加人员</el-button
-                    >
-                </div>
-                <div v-if="add">
-                    <el-form :model="form" ref="form" size="small">
-                        <el-input
-                            class="dia-mar"
-                            v-model="form.name"
-                            placeholder="请输入姓名"
-                            style="width: 130px"
-                        ></el-input>
-                        <el-input
-                            class="dia-mar"
-                            v-model="form.phone"
-                            placeholder="请输入手机号"
-                            style="width: 160px"
-                        ></el-input>
-                        <el-button class="dia-mar" size="mini" @click="onSave">确定</el-button>
-                        <el-button class="dia-mar" size="mini" @click="add = false">取消</el-button>
-                    </el-form>
-                </div>
-            </div>
-        </el-dialog>
-        <el-dialog title="二维码" :visible.sync="dialogCode" width="400px" center>
-            <div style="margin-left: 70px;">
-                <qrcode-vue :value="dialogUrl" :size="200" level="H" />
-            </div>
-        </el-dialog>
-        <el-dialog title="自动编排" :visible.sync="dialogArrangement" width="400px" center>
-            <div style="margin-left: 70px;">
-                <img style="width: 200px; heght: 200px;" src="@/assets/arrangement.png" />
-            </div>
-        </el-dialog>
-    </div>
-</template>
-<script>
-import { mapState } from 'vuex';
-import pageableTable from '@/mixins/pageableTable';
-import QrcodeVue from 'qrcode.vue';
-
-export default {
-    name: 'PerformanceApplyList',
-    mixins: [pageableTable],
-    data() {
-        return {
-            multipleMode: false,
-            search: '',
-            url: '/performanceApply/all',
-            downloading: false,
-            statusOptions: [
-                { label: '审核中', value: 'PENDING' },
-                { label: '通过', value: 'PASS' },
-                { label: '拒绝', value: 'DENY' }
-            ],
-            dialogVisible: false,
-            person: [],
-            form: {
-                performanceApplyId: '',
-                name: '',
-                value: ''
-            },
-            add: false,
-            dialogCode: false,
-            canSign: false,
-            applyId: '',
-            dialogArrangement: false,
-            dialogUrl: ''
-        };
-    },
-    created() {
-        if (this.$route.query.perforStatus === 'APPLY') {
-            this.canSign = true;
-        }
-    },
-    components: {
-        QrcodeVue
-    },
-    computed: {
-        selection() {
-            return this.$refs.table.selection.map(i => i.id);
-        }
-    },
-    methods: {
-        showCode(row) {
-            this.dialogCode = true;
-            this.dialogUrl =
-                'http://wljtest.izouma.com/h5/home?performanceId=' +
-                row.performanceId +
-                '&performanceApplyId=' +
-                row.id;
-        },
-        statusFormatter(row, column, cellValue, index) {
-            let selectedOption = this.statusOptions.find(i => i.value === cellValue);
-            if (selectedOption) {
-                return selectedOption.label;
-            }
-            return '';
-        },
-        beforeGetData() {
-            return {
-                search: this.search,
-                query: {
-                    performanceId: Number(this.$route.query.perforId)
-                }
-            };
-        },
-        toggleMultipleMode(multipleMode) {
-            this.multipleMode = multipleMode;
-            if (!multipleMode) {
-                this.$refs.table.clearSelection();
-            }
-        },
-        addRow() {
-            this.$router.push({
-                path: '/performanceApplyEdit',
-                query: {
-                    ...this.$route.query
-                }
-            });
-        },
-        editRow(row) {
-            this.$router.push({
-                path: '/performanceApplyEdit',
-                query: {
-                    id: row.id
-                }
-            });
-        },
-        download() {
-            this.downloading = true;
-            this.$axios
-                .get('/performanceApply/excel', {
-                    responseType: 'blob',
-                    params: { size: 10000 }
-                })
-                .then(res => {
-                    console.log(res);
-                    this.downloading = false;
-                    const downloadUrl = window.URL.createObjectURL(new Blob([res.data]));
-                    const link = document.createElement('a');
-                    link.href = downloadUrl;
-                    link.setAttribute('download', res.headers['content-disposition'].split('filename=')[1]);
-                    document.body.appendChild(link);
-                    link.click();
-                    link.remove();
-                })
-                .catch(e => {
-                    console.log(e);
-                    this.downloading = false;
-                    this.$message.error(e.error);
-                });
-        },
-        operation1() {
-            this.$notify({
-                title: '提示',
-                message: this.selection
-            });
-        },
-        operation2() {
-            this.$message('操作2');
-        },
-        deleteRow(row) {
-            this.$alert('删除将无法恢复,确认要删除么?', '警告', { type: 'error' })
-                .then(() => {
-                    return this.$http.post(`/performanceApply/del/${row.id}`);
-                })
-                .then(() => {
-                    this.$message.success('删除成功');
-                    this.getData();
-                })
-                .catch(e => {
-                    if (e !== 'cancel') {
-                        this.$message.error(e.error);
-                    }
-                });
-        },
-        showDialog(row) {
-            this.dialogVisible = true;
-            this.applyId = row.id;
-            this.form.performanceApplyId = row.id;
-            this.getPerson(row.id);
-        },
-        getPerson(id) {
-            this.$http
-                .post('/person/all', { size: 100, query: { del: false, performanceApplyId: id } }, { body: 'json' })
-                .then(res => {
-                    this.person = res.content;
-                    this.form.performanceApplyId = id;
-                })
-                .catch(e => {
-                    console.log(e);
-                    this.$message.error(e.error);
-                });
-        },
-        onSave() {
-            this.$refs.form.validate(valid => {
-                if (valid) {
-                    let data = { ...this.form };
-                    this.saving = true;
-                    this.$http
-                        .post('/person/save', data, { body: 'json' })
-                        .then(res => {
-                            this.saving = false;
-                            this.$message.success('成功');
-                            this.form = {
-                                name: '',
-                                phone: ''
-                            };
-                            this.add = false;
-                            this.getPerson(this.applyId);
-                            // this.$router.go(-1);
-                        })
-                        .catch(e => {
-                            console.log(e);
-                            this.saving = false;
-                            this.$message.error(e.error);
-                        });
-                } else {
-                    return false;
-                }
-            });
-        },
-        deletePerson(row) {
-            this.$alert('删除将无法恢复,确认要删除么?', '警告', { type: 'error' })
-                .then(() => {
-                    return this.$http.post(`/person/del/${row.id}`);
-                })
-                .then(() => {
-                    this.$message.success('删除成功');
-                    this.getPerson(this.applyId);
-                })
-                .catch(e => {
-                    if (e !== 'cancel') {
-                        this.$message.error(e.error);
-                    }
-                });
-        }
-    }
-};
-</script>
-<style lang="less" scoped>
-.dia-mar {
-    margin: 8px 6px;
-}
-.span-size {
-    margin: 20px;
-    font-size: 15px;
-}
-.right {
-    margin-right: 60px;
-}
-</style>

+ 0 - 482
src/main/vue/src/views/PerformanceApplyList2.vue

@@ -1,482 +0,0 @@
-<template>
-    <div class="list-view">
-        <div class="filters-container">
-            <!-- <el-input placeholder="输入关键字" v-model="search" clearable class="filter-item"></el-input>
-            <el-button @click="getData" type="primary" icon="el-icon-search" class="filter-item">搜索 </el-button> -->
-            <el-button
-                @click="openArrangement"
-                type="primary"
-                class="filter-item"
-                :loading="loading"
-                v-if="totalElements > 0"
-                >自动编排
-            </el-button>
-            <el-button @click="distribute('已成功通知')" type="primary" class="filter-item">一键通知 </el-button>
-            <!-- <el-button @click="autoAwards()" type="primary" class="filter-item">自动评奖 </el-button> -->
-            <!-- <el-button @click="distribute('已生成证书')" type="primary" class="filter-item">生成证书 </el-button> -->
-            <!-- <el-button
-                @click="download"
-                type="primary"
-                icon="el-icon-download"
-                :loading="downloading"
-                class="filter-item"
-                >导出EXCEL
-            </el-button> -->
-        </div>
-        <el-table
-            :data="tableData"
-            row-key="id"
-            ref="table"
-            header-row-class-name="table-header-row"
-            header-cell-class-name="table-header-cell"
-            row-class-name="table-row"
-            cell-class-name="table-cell"
-            :height="tableHeight"
-        >
-            <el-table-column v-if="multipleMode" align="center" type="selection" width="50"> </el-table-column>
-            <!-- <el-table-column prop="id" label="ID" width="100"> </el-table-column> -->
-            <el-table-column prop="composition" label="作品名称"> </el-table-column>
-            <el-table-column prop="artType" label="专业"> </el-table-column>
-            <el-table-column prop="teacher" label="指导老师"> </el-table-column>
-            <el-table-column prop="organizer" label="选送机构"> </el-table-column>
-            <el-table-column prop="contact" label="联系人"> </el-table-column>
-            <el-table-column prop="phone" label="联系电话"> </el-table-column>
-            <el-table-column prop="status" label="状态" :formatter="statusFormatter"> </el-table-column>
-            <el-table-column label="表演时间" min-width="140">
-                <template slot-scope="{ row }">
-                    <span v-if="row.showStartTime">{{ row.showStartTime }} 至 {{ row.showEndTime }}</span>
-                    <span v-else>暂无</span>
-                </template>
-            </el-table-column>
-            <el-table-column prop="awards" label="奖项">
-                <template slot-scope="{ row }">
-                    <span v-if="row.awards != null"> {{ row.awards }} </span>
-                    <span v-else>暂无</span>
-                </template>
-            </el-table-column>
-            <el-table-column prop="score" label="得分">
-                <template slot-scope="{ row }">
-                    <el-link v-if="row.score != null" @click="breakdown(row)"> {{ row.score }} </el-link>
-                    <span v-else>暂无</span>
-                </template>
-            </el-table-column>
-            <el-table-column label="操作" align="right" fixed="right" min-width="200">
-                <template slot-scope="{ row }">
-                    <el-button
-                        v-if="row.status === 'PENDING'"
-                        :loading="row.loading"
-                        @click="audit(row, true)"
-                        type="success"
-                        size="mini"
-                        plain
-                    >
-                        通过
-                    </el-button>
-                    <el-button
-                        v-if="row.status === 'PENDING'"
-                        :loading="row.loading"
-                        @click="audit(row, false)"
-                        type="warning"
-                        size="mini"
-                        plain
-                    >
-                        拒绝
-                    </el-button>
-                    <el-button @click="editRow(row)" type="primary" size="mini" plain>查看</el-button>
-                    <!-- <el-button @click="deleteRow(row)" type="danger" size="mini" plain>删除</el-button> -->
-                    <!-- <el-button @click="showDialog(row)" type="primary" size="mini" plain>参演人员维护</el-button>
-                    <el-button @click="editRow(row)" type="primary" size="mini" plain>二维码</el-button> -->
-                </template>
-            </el-table-column>
-        </el-table>
-        <div class="pagination-wrapper">
-            <!-- <div class="multiple-mode-wrapper">
-                <el-button v-if="!multipleMode" @click="toggleMultipleMode(true)">批量编辑</el-button>
-                <el-button-group v-else>
-                    <el-button @click="operation1">批量操作1</el-button>
-                    <el-button @click="operation2">批量操作2</el-button>
-                    <el-button @click="toggleMultipleMode(false)">取消</el-button>
-                </el-button-group>
-            </div> -->
-            <el-pagination
-                background
-                @size-change="onSizeChange"
-                @current-change="onCurrentChange"
-                :current-page="page"
-                :page-sizes="[10, 20, 30, 40, 50]"
-                :page-size="pageSize"
-                layout="total, sizes, prev, pager, next, jumper"
-                :total="totalElements"
-            >
-            </el-pagination>
-        </div>
-
-        <el-dialog title="参演人员" :visible.sync="dialogVisible" width="500px" center>
-            <div>
-                <div v-for="item in person" :key="item.id" style="padding: 10px 10px 10px 100px">
-                    <span class="span-size">{{ item.name }}</span> <span class="span-size">{{ item.phone }}</span>
-                </div>
-                <div style="margin: 10px 170px 0">
-                    <el-button class="dia-mar" type="primary" @click="add = true" v-if="!add" size="mini"
-                        >添加人员</el-button
-                    >
-                </div>
-                <div v-if="add">
-                    <el-form :model="form" ref="form" size="small">
-                        <el-input
-                            class="dia-mar"
-                            v-model="form.name"
-                            placeholder="请输入姓名"
-                            style="width: 130px"
-                        ></el-input>
-                        <el-input
-                            class="dia-mar"
-                            v-model="form.phone"
-                            placeholder="请输入手机号"
-                            style="width: 160px"
-                        ></el-input>
-                        <el-button class="dia-mar" size="mini" @click="onSave">确定</el-button>
-                        <el-button class="dia-mar" size="mini" @click="add = false">取消</el-button>
-                    </el-form>
-                </div>
-            </div>
-        </el-dialog>
-        <el-dialog title="自动编排" :visible.sync="dialogArrangement" width="1000px" center>
-            <div style="margin-left: 20px;">
-                <!-- <img style="width: 500px; heght: 400px;" src="@/assets/arrangement.png" /> -->
-                <el-table :data="timeList">
-                    <el-table-column prop="composition" label="作品名称" min-width="100"> </el-table-column>
-                    <el-table-column prop="artType" label="专业" min-width="100"> </el-table-column>
-                    <el-table-column prop="organizer" label="选送机构" min-width="150"> </el-table-column>
-                    <el-table-column label="表演时间" show-overflow-tooltip min-width="180">
-                        <template slot-scope="{ row }"> {{ row.showStartTime }} 至 {{ row.showEndTime }} </template>
-                    </el-table-column>
-                    <el-table-column label="操作">
-                        <template slot-scope="{ $index }">
-                            <el-button
-                                icon="el-icon-top"
-                                :disabled="$index == 0"
-                                circle
-                                @click="move($index, -1)"
-                            ></el-button>
-                            <el-button
-                                icon="el-icon-bottom"
-                                :disabled="$index == timeList.length - 1"
-                                @click="move($index, 1)"
-                                circle
-                            ></el-button>
-                        </template>
-                    </el-table-column>
-                </el-table>
-                <div style="margin-top: 20px; margin-left: 445px;">
-                    <el-button type="primary" @click="autoArrangement()">确定</el-button>
-                </div>
-            </div>
-        </el-dialog>
-        <el-dialog title="得分详细" :visible.sync="dialogScore" width="450px" center>
-            <el-table :data="scoreList">
-                <el-table-column prop="createdAt" label="评分时间" min-width="100" align="center"> </el-table-column>
-                <el-table-column prop="score" label="分数" min-width="100" align="center"> </el-table-column>
-            </el-table>
-        </el-dialog>
-    </div>
-</template>
-<script>
-import { mapState } from 'vuex';
-import pageableTable from '@/mixins/pageableTable';
-
-export default {
-    name: 'PerformanceApplyList',
-    mixins: [pageableTable],
-    data() {
-        return {
-            multipleMode: false,
-            search: '',
-            url: '/performanceApply/all',
-            downloading: false,
-            statusOptions: [
-                { label: '审核中', value: 'PENDING' },
-                { label: '通过', value: 'PASS' },
-                { label: '拒绝', value: 'DENY' }
-            ],
-            dialogVisible: false,
-            person: [],
-            form: {
-                performanceApplyId: '',
-                name: '',
-                value: ''
-            },
-            add: false,
-            loading: false,
-            dialogArrangement: false,
-            timeList: [],
-            dialogScore: false,
-            scoreList: []
-        };
-    },
-    computed: {
-        selection() {
-            return this.$refs.table.selection.map(i => i.id);
-        },
-        saveOtherJson() {
-            const timeList = [...this.timeList].filter(item => {
-                return !!item.composition || !!item.showStartTime || !!item.showEndTime || !!item.organizationId;
-            });
-
-            return JSON.stringify(timeList);
-        }
-    },
-    methods: {
-        statusFormatter(row, column, cellValue, index) {
-            let selectedOption = this.statusOptions.find(i => i.value === cellValue);
-            if (selectedOption) {
-                return selectedOption.label;
-            }
-            return '';
-        },
-        beforeGetData() {
-            return {
-                search: this.search,
-                query: {
-                    performanceId: Number(this.$route.query.perforId)
-                }
-            };
-        },
-        toggleMultipleMode(multipleMode) {
-            this.multipleMode = multipleMode;
-            if (!multipleMode) {
-                this.$refs.table.clearSelection();
-            }
-        },
-        addRow() {
-            this.$router.push({
-                path: '/performanceApplyEdit',
-                query: {
-                    ...this.$route.query
-                }
-            });
-        },
-        editRow(row) {
-            this.$router.push({
-                path: '/performanceApplyEdit',
-                query: {
-                    id: row.id
-                }
-            });
-        },
-        download() {
-            this.downloading = true;
-            this.$axios
-                .get('/performanceApply/excel', {
-                    responseType: 'blob',
-                    params: { size: 10000 }
-                })
-                .then(res => {
-                    console.log(res);
-                    this.downloading = false;
-                    const downloadUrl = window.URL.createObjectURL(new Blob([res.data]));
-                    const link = document.createElement('a');
-                    link.href = downloadUrl;
-                    link.setAttribute('download', res.headers['content-disposition'].split('filename=')[1]);
-                    document.body.appendChild(link);
-                    link.click();
-                    link.remove();
-                })
-                .catch(e => {
-                    console.log(e);
-                    this.downloading = false;
-                    this.$message.error(e.error);
-                });
-        },
-        operation1() {
-            this.$notify({
-                title: '提示',
-                message: this.selection
-            });
-        },
-        operation2() {
-            this.$message('操作2');
-        },
-        deleteRow(row) {
-            this.$alert('删除将无法恢复,确认要删除么?', '警告', { type: 'error' })
-                .then(() => {
-                    return this.$http.post(`/performanceApply/del/${row.id}`);
-                })
-                .then(() => {
-                    this.$message.success('删除成功');
-                    this.getData();
-                })
-                .catch(e => {
-                    if (e !== 'cancel') {
-                        this.$message.error(e.error);
-                    }
-                });
-        },
-        showDialog(row) {
-            this.dialogVisible = true;
-            this.form.performanceApplyId = row.id;
-            this.getPerson(row.id);
-        },
-        getPerson(id) {
-            this.$http
-                .post('/person/all', { size: 100, query: { del: false, performanceApplyId: id } }, { body: 'json' })
-                .then(res => {
-                    this.person = res.content;
-                })
-                .catch(e => {
-                    console.log(e);
-                    this.$message.error(e.error);
-                });
-        },
-        audit(row, pass) {
-            this.$set(row, 'loading', true);
-            this.$http
-                .post('/performanceApply/audit', {
-                    id: row.id,
-                    pass: pass
-                })
-                .then(res => {
-                    this.$set(row, 'loading', false);
-                    this.$message.success('OK');
-                    this.getData();
-                })
-                .catch(e => {
-                    console.log(e);
-                    this.$set(row, 'loading', false);
-                    this.$message.error(e.error);
-                });
-        },
-        distribute(content) {
-            this.$alert(content, '通知', {
-                confirmButtonText: '确定'
-            });
-        },
-        autoArrangement() {
-            this.loading = true;
-            this.$http
-                .post('/performanceApply/saveArrangement', {
-                    applies: this.saveOtherJson
-                })
-                .then(res => {
-                    this.loading = false;
-                    this.$message.success('自动编排成功');
-                    this.getData();
-                    this.dialogArrangement = false;
-                })
-                .catch(e => {
-                    console.log(e);
-                    this.loading = false;
-                    this.$message.error(e.error);
-                });
-        },
-        autoAwards() {
-            this.$confirm('是否进行自动评奖', '评奖', {
-                confirmButtonText: '确定',
-                cancelButtonText: '取消'
-            })
-                .then(() => {
-                    this.$http
-                        .post('/performanceApply/autoAwards', {
-                            performanceId: Number(this.$route.query.perforId)
-                        })
-                        .then(res => {
-                            this.loading = false;
-                            this.$message.success('OK');
-                            this.getData();
-                        })
-                        .catch(e => {
-                            console.log(e);
-                            this.loading = false;
-                            this.$message.error(e.error);
-                        });
-                })
-                .catch(() => {
-                    this.$message({
-                        type: 'info',
-                        message: '已取消删除'
-                    });
-                });
-        },
-        getArrangement() {
-            this.loading = true;
-            this.$http
-                .post('/performanceApply/autoArrangement', {
-                    performanceId: Number(this.$route.query.perforId)
-                })
-                .then(res => {
-                    this.loading = false;
-                    this.timeList = res;
-                })
-                .catch(e => {
-                    console.log(e);
-                    this.loading = false;
-                    this.$message.error(e.error);
-                });
-        },
-        openArrangement() {
-            this.dialogArrangement = true;
-            this.getArrangement();
-        },
-        move(index, direction) {
-            let timeList = [...this.timeList];
-            const start = index;
-            const end = direction + index;
-
-            const startInfo = {
-                showStartTime: timeList[end].showStartTime,
-                showEndTime: timeList[end].showEndTime
-            };
-            const endInfo = {
-                showStartTime: timeList[start].showStartTime,
-                showEndTime: timeList[start].showEndTime
-            };
-
-            timeList[start] = {
-                ...timeList[start],
-                ...startInfo
-            };
-
-            timeList[end] = {
-                ...timeList[end],
-                ...endInfo
-            };
-
-            this.timeList = this.sortByKey(timeList);
-        },
-        sortByKey(array) {
-            return array.sort(function(a, b) {
-                var x = a['showStartTime'];
-                var y = b['showStartTime'];
-                return x < y ? -1 : x > y ? 1 : 0;
-            });
-        },
-        // 打分明细
-        breakdown(row) {
-            this.dialogScore = true;
-            this.$http
-                .post('/performanceScore/breakdown', {
-                    performanceApplyId: row.id
-                })
-                .then(res => {
-                    this.scoreList = res;
-                })
-                .catch(e => {
-                    console.log(e);
-                    this.$message.error(e.error);
-                });
-        }
-    }
-};
-</script>
-<style lang="less" scoped>
-.dia-mar {
-    margin: 8px 6px;
-}
-.span-size {
-    margin: 20px;
-    font-size: 15px;
-}
-.right {
-    margin-right: 60px;
-}
-</style>

+ 0 - 95
src/main/vue/src/views/PersonEdit.vue

@@ -1,95 +0,0 @@
-<template>
-    <div class="edit-view">
-        <el-form
-            :model="formData"
-            :rules="rules"
-            ref="form"
-            label-width="52px"
-            label-position="right"
-            size="small"
-            style="max-width: 500px;"
-        >
-            <el-form-item prop="name" label="姓名">
-                <el-input v-model="formData.name"></el-input>
-            </el-form-item>
-            <el-form-item prop="phone" label="电话">
-                <el-input v-model="formData.phone"></el-input>
-            </el-form-item>
-            <el-form-item>
-                <el-button @click="onSave" :loading="saving" type="primary">保存</el-button>
-                <el-button @click="onDelete" :loading="saving" type="danger" v-if="formData.id">删除 </el-button>
-                <el-button @click="$router.go(-1)">取消</el-button>
-            </el-form-item>
-        </el-form>
-    </div>
-</template>
-<script>
-export default {
-    name: 'PersonEdit',
-    created() {
-        if (this.$route.query.id) {
-            this.$http
-                .get('person/get/' + this.$route.query.id)
-                .then(res => {
-                    this.formData = res;
-                })
-                .catch(e => {
-                    console.log(e);
-                    this.$message.error(e.error);
-                });
-        }
-    },
-    data() {
-        return {
-            saving: false,
-            formData: {},
-            rules: {}
-        };
-    },
-    methods: {
-        onSave() {
-            this.$refs.form.validate(valid => {
-                if (valid) {
-                    this.submit();
-                } else {
-                    return false;
-                }
-            });
-        },
-        submit() {
-            let data = { ...this.formData };
-
-            this.saving = true;
-            this.$http
-                .post('/person/save', data, { body: 'json' })
-                .then(res => {
-                    this.saving = false;
-                    this.$message.success('成功');
-                    this.$router.go(-1);
-                })
-                .catch(e => {
-                    console.log(e);
-                    this.saving = false;
-                    this.$message.error(e.error);
-                });
-        },
-        onDelete() {
-            this.$alert('删除将无法恢复,确认要删除么?', '警告', { type: 'error' })
-                .then(() => {
-                    return this.$http.post(`/person/del/${this.formData.id}`);
-                })
-                .then(() => {
-                    this.$message.success('删除成功');
-                    this.$router.go(-1);
-                })
-                .catch(e => {
-                    if (e !== 'cancel') {
-                        console.log(e);
-                        this.$message.error((e || {}).error || '删除失败');
-                    }
-                });
-        }
-    }
-};
-</script>
-<style lang="less" scoped></style>

+ 0 - 157
src/main/vue/src/views/PersonList.vue

@@ -1,157 +0,0 @@
-<template>
-    <div class="list-view">
-        <div class="filters-container">
-            <el-input placeholder="输入关键字" v-model="search" clearable class="filter-item"></el-input>
-            <el-button @click="getData" type="primary" icon="el-icon-search" class="filter-item">查询 </el-button>
-            <el-button @click="addRow" type="primary" icon="el-icon-plus" class="filter-item">添加 </el-button>
-            <el-button
-                @click="download"
-                type="primary"
-                icon="el-icon-download"
-                :loading="downloading"
-                class="filter-item"
-                >导出EXCEL
-            </el-button>
-        </div>
-        <el-table
-            :data="tableData"
-            row-key="id"
-            ref="table"
-            header-row-class-name="table-header-row"
-            header-cell-class-name="table-header-cell"
-            row-class-name="table-row"
-            cell-class-name="table-cell"
-            :height="tableHeight"
-        >
-            <el-table-column v-if="multipleMode" align="center" type="selection" width="50"> </el-table-column>
-            <el-table-column prop="id" label="ID" width="100"> </el-table-column>
-            <el-table-column prop="name" label="姓名"> </el-table-column>
-            <el-table-column prop="phone" label="电话"> </el-table-column>
-            <el-table-column label="操作" align="center" fixed="right" min-width="150">
-                <template slot-scope="{ row }">
-                    <el-button @click="editRow(row)" type="primary" size="mini" plain>编辑</el-button>
-                    <el-button @click="deleteRow(row)" type="danger" size="mini" plain>删除</el-button>
-                </template>
-            </el-table-column>
-        </el-table>
-        <div class="pagination-wrapper">
-            <!-- <div class="multiple-mode-wrapper">
-                <el-button v-if="!multipleMode" @click="toggleMultipleMode(true)">批量编辑</el-button>
-                <el-button-group v-else>
-                    <el-button @click="operation1">批量操作1</el-button>
-                    <el-button @click="operation2">批量操作2</el-button>
-                    <el-button @click="toggleMultipleMode(false)">取消</el-button>
-                </el-button-group>
-            </div> -->
-            <el-pagination
-                background
-                @size-change="onSizeChange"
-                @current-change="onCurrentChange"
-                :current-page="page"
-                :page-sizes="[10, 20, 30, 40, 50]"
-                :page-size="pageSize"
-                layout="total, sizes, prev, pager, next, jumper"
-                :total="totalElements"
-            >
-            </el-pagination>
-        </div>
-    </div>
-</template>
-<script>
-import { mapState } from 'vuex';
-import pageableTable from '@/mixins/pageableTable';
-
-export default {
-    name: 'PersonList',
-    mixins: [pageableTable],
-    data() {
-        return {
-            multipleMode: false,
-            search: '',
-            url: '/person/all',
-            downloading: false
-        };
-    },
-    computed: {
-        selection() {
-            return this.$refs.table.selection.map(i => i.id);
-        }
-    },
-    methods: {
-        beforeGetData() {
-            return { search: this.search };
-        },
-        toggleMultipleMode(multipleMode) {
-            this.multipleMode = multipleMode;
-            if (!multipleMode) {
-                this.$refs.table.clearSelection();
-            }
-        },
-        addRow() {
-            this.$router.push({
-                path: '/personEdit',
-                query: {
-                    ...this.$route.query
-                }
-            });
-        },
-        editRow(row) {
-            this.$router.push({
-                path: '/personEdit',
-                query: {
-                    id: row.id
-                }
-            });
-        },
-        download() {
-            this.downloading = true;
-            this.$axios
-                .get('/person/excel', {
-                    responseType: 'blob',
-                    params: { size: 10000 }
-                })
-                .then(res => {
-                    console.log(res);
-                    this.downloading = false;
-                    const downloadUrl = window.URL.createObjectURL(new Blob([res.data]));
-                    const link = document.createElement('a');
-                    link.href = downloadUrl;
-                    link.setAttribute('download', res.headers['content-disposition'].split('filename=')[1]);
-                    document.body.appendChild(link);
-                    link.click();
-                    link.remove();
-                })
-                .catch(e => {
-                    console.log(e);
-                    this.downloading = false;
-                    this.$message.error(e.error);
-                });
-        },
-        operation1() {
-            this.$notify({
-                title: '提示',
-                message: this.selection
-            });
-        },
-        operation2() {
-            this.$message('操作2');
-        },
-        deleteRow(row) {
-            this.$alert('删除将无法恢复,确认要删除么?', '警告', { type: 'error' })
-                .then(() => {
-                    return this.$http.post(`/person/del/${row.id}`);
-                })
-                .then(() => {
-                    this.$message.success('删除成功');
-                    this.getData();
-                })
-                .catch(e => {
-                    if (e !== 'cancel') {
-                        this.$message.error(e.error);
-                    }
-                });
-        }
-    }
-};
-</script>
-<style lang="less" scoped></style>

+ 0 - 36
src/test/java/com/izouma/wenlvju/service/PerformanceApplyServiceTest.java

@@ -1,36 +0,0 @@
-package com.izouma.wenlvju.service;
-
-
-import com.izouma.wenlvju.ApplicationTests;
-import com.izouma.wenlvju.domain.PerformanceApply;
-import com.izouma.wenlvju.exception.BusinessException;
-import com.izouma.wenlvju.repo.PerformanceApplyRepo;
-import org.junit.Test;
-import org.springframework.beans.factory.annotation.Autowired;
-
-public class PerformanceApplyServiceTest extends ApplicationTests {
-
-    @Autowired
-    private PerformanceApplyService performanceApplyService;
-    @Autowired
-    private PerformanceApplyRepo    performanceApplyRepo;
-
-    @Test
-    public void test() {
-        performanceApplyService.autoArrangement1(115L).forEach(System.out::println);
-
-    }
-
-    @Test
-    public void test1() {
-        performanceApplyService.score(14L, 79, 1L);
-    }
-
-    @Test
-    public void test2() {
-        PerformanceApply performanceApply = performanceApplyRepo.findById(895L)
-                .orElseThrow(new BusinessException("无此表演"));
-        System.out.println(performanceApplyService.getAuth(895L, "15150689190", performanceApply.getPhone()));
-    }
-
-}