package thyyxxk.webserver.controller.technologyArchives;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import thyyxxk.webserver.entity.ResultVo;
import thyyxxk.webserver.entity.technologyArchives.*;
import thyyxxk.webserver.service.technologyArchives.HLTechnologyArchivesService;

import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;

/**
 * @ClassName HLtechnologyArchivesController
 * @Author XU
 * @Date 2025/4/2
 * @Version 1.0
 * @Description 护理技术档案管理
 **/
@RestController
@RequestMapping("/hltechnologyArchives")
public class HLTechnologyArchivesController {

    private final HLTechnologyArchivesService hlservice;

    @Autowired
    public HLTechnologyArchivesController(HLTechnologyArchivesService hlservice) {
        this.hlservice = hlservice;
    }

    @GetMapping("/selectDictInfo")
    public ResultVo<Map<String, Object>> selectDictInfo(){
        return hlservice.selectDictInfo();
    }

    @PostMapping("/saveTechnologyArchivesHLMain")
    public ResultVo<Map<String, Object>> saveTechnologyArchivesHLMain(@RequestBody @Validated TechnologyArchivesHLMain hltam){
        return hlservice.saveTechnologyArchivesHLMain(hltam);
    }

    @GetMapping("/selectHLEmployeeInfo")
    public ResultVo<TechnologyArchivesHLMain> selectHLEmployeeInfo(@RequestParam("text") String text){
        return hlservice.selectHLEmployeeInfo(text);
    }

    @PostMapping("/putPersonalImage")
    public ResultVo<Map<String, Object>> putPersonalImage(@RequestBody MultipartFile file) {
        return hlservice.putPersonalImage(file);
    }

    @GetMapping("/selectHLImage1")
    public ResultVo<Map<String, Object>> selectHLImage1(@RequestParam("socialNo") String socialNo){
        return  hlservice.selectHLImage1(socialNo);
    }
    @GetMapping("/setHLImage")
    public ResultVo<Map<String, Object>> setHLImage( String url, @RequestParam("socialNo") String socialNo) {
        return hlservice.setHLImage(url, socialNo);
    }

    @GetMapping("/selectTechnologyArchivesHLMainDict")
    public ResultVo<List<Map<String, Object>>> selectTechnologyArchivesHLMainDict(){
        return hlservice.selectTechnologyArchivesHLMainDict();
    }

    @GetMapping("/selectTechnologyArchivesHL1")
    public ResultVo<List<TechnologyArchivesHL1>> selectTechnologyArchivesHL1(){
        return hlservice.selectTechnologyArchivesHL1();
    }

    @GetMapping("/selectHL1Image")
    public ResultVo<Map<String, Object>> selectHL1Image(@RequestParam("socialNo") String socialNo, @RequestParam("getTime") String getTime){
        return hlservice.selectHL1Image(socialNo, getTime);
    }

    @PostMapping("/saveTechnologyArchivesHL1")
    public ResultVo<Map<String, Object>> saveTechnologyArchivesHL1(@RequestBody @Validated TechnologyArchivesHL1 HL1){
        return hlservice.saveTechnologyArchivesHL1(HL1);
    }

    //上传图片
    @PostMapping("/putHL1CertificateImage")
    public ResultVo<Map<String, Object>> putHL1CertificateImage(@RequestBody MultipartFile[] file,@RequestParam("title") String title) {
        return hlservice.putHL1CertificateImage(file,title);
    }
    @GetMapping("/setHL1Image")
    public ResultVo<Map<String, Object>> setHL1Image(@RequestParam("socialNo") String socialNo, @RequestParam("getTime") String getTime, String url) {
        return hlservice.setHL1Image(socialNo, getTime, url);
    }
    @GetMapping("/delTechnologyArchivesHL1ByCode")
    public ResultVo<Map<String, Object>> delTechnologyArchivesHL1ByCode(@RequestParam("socialNo") String socialNo, @RequestParam("getTime") String getTime){
        return hlservice.delTechnologyArchivesHL1ByCode(socialNo, getTime);
    }

    @GetMapping("/selectTechnologyArchivesHL2")
    public ResultVo<List<TechnologyArchivesHL2>> selectTechnologyArchivesHL2(){
        return hlservice.selectTechnologyArchivesHL2();
    }

    @PostMapping("/saveTechnologyArchivesHL2")
    public ResultVo<Map<String, Object>> saveTechnologyArchivesHL2(@RequestBody @Validated TechnologyArchivesHL2 HL2){
        return hlservice.saveTechnologyArchivesHL2(HL2);
    }

    @GetMapping("/delTechnologyArchivesHL2ByCode")
    public ResultVo<Map<String, Object>> delTechnologyArchivesHL2ByCode(@RequestParam("socialNo") String socialNo, @RequestParam("id") Integer id){
        return hlservice.delTechnologyArchivesHL2ByCode(socialNo, id);
    }

    @GetMapping("/selectTechnologyArchivesHL3")
    public ResultVo<List<TechnologyArchivesHL3>> selectTechnologyArchivesHL3(){
        return hlservice.selectTechnologyArchivesHL3();
    }

    @PostMapping("/saveTechnologyArchivesHL3")
    public ResultVo<Map<String, Object>> saveTechnologyArchivesHL3(@RequestBody @Validated TechnologyArchivesHL3 HL3){
        return hlservice.saveTechnologyArchivesHL3(HL3);
    }

    @GetMapping("/delTechnologyArchivesHL3ByCode")
    public ResultVo<Map<String, Object>> delTechnologyArchivesHL3ByCode(@RequestParam("socialNo") String socialNo, @RequestParam("id") Integer id){
        return hlservice.delTechnologyArchivesHL3ByCode(socialNo, id);
    }

    @GetMapping("/selectTechnologyArchivesHL4")
    public ResultVo<List<TechnologyArchivesHL4>> selectTechnologyArchivesHL4(){
        return hlservice.selectTechnologyArchivesHL4();
    }

    @GetMapping("/selectHL4Image")
    public ResultVo<Map<String, Object>> selectHL4Image(@RequestParam("socialNo") String socialNo, @RequestParam("id") Integer id){
        return  hlservice.selectHL4Image(socialNo, id);
    }

    //上传图片
    @PostMapping("/putHL4CertificateImage")
    public ResultVo<Map<String, Object>> putHL4CertificateImage(@RequestBody MultipartFile[] file,@RequestParam("name") String name) {
        return hlservice.putHL4CertificateImage(file,name);
    }
    @GetMapping("/setHL4Image")
    public ResultVo<Map<String, Object>> setHL4Image(@RequestParam("socialNo") String socialNo, @RequestParam("beginTime") String beginTime, String url) {
        return hlservice.setHL4Image(socialNo, beginTime, url);
    }
    @PostMapping("/saveTechnologyArchivesHL4")
    public ResultVo<Map<String, Object>> saveTechnologyArchivesHL4(@RequestBody @Validated TechnologyArchivesHL4 HL4){
        return hlservice.saveTechnologyArchivesHL4(HL4);
    }

    @GetMapping("/delTechnologyArchivesHL4ByCode")
    public ResultVo<Map<String, Object>> delTechnologyArchivesHL4ByCode(@RequestParam("socialNo") String socialNo, @RequestParam("id") Integer id){
        return hlservice.delTechnologyArchivesHL4ByCode(socialNo, id);
    }

    @GetMapping("/selectTechnologyArchivesHL5")
    public ResultVo<List<TechnologyArchivesHL5>> selectTechnologyArchivesHL5(){
        return hlservice.selectTechnologyArchivesHL5();
    }

    @PostMapping("/saveTechnologyArchivesHL5")
    public ResultVo<Map<String, Object>> saveTechnologyArchivesHL5(@RequestBody @Validated TechnologyArchivesHL5 HL5){
        return hlservice.saveTechnologyArchivesHL5(HL5);
    }

    @GetMapping("/delTechnologyArchivesHL5ByCode")
    public ResultVo<Map<String, Object>> delTechnologyArchivesHL5ByCode(@RequestParam("socialNo") String socialNo, @RequestParam("id") Integer id){
        return hlservice.delTechnologyArchivesHL5ByCode(socialNo, id);
    }

    @GetMapping("/selectTechnologyArchivesHL6")
    public ResultVo<List<TechnologyArchivesHL6>> selectTechnologyArchivesHL6(){
        return hlservice.selectTechnologyArchivesHL6();
    }

    @PostMapping("/saveTechnologyArchivesHL6")
    public ResultVo<Map<String, Object>> saveTechnologyArchivesHL6(@RequestBody @Validated TechnologyArchivesHL6 HL6){
        return hlservice.saveTechnologyArchivesHL6(HL6);
    }

    @GetMapping("/delTechnologyArchivesHL6ByCode")
    public ResultVo<Map<String, Object>> delTechnologyArchivesHL6ByCode(@RequestParam("socialNo") String socialNo, @RequestParam("id") Integer id){
        return hlservice.delTechnologyArchivesHL6ByCode(socialNo, id);
    }

    @GetMapping("/selectTechnologyArchivesHL7")
    public ResultVo<List<TechnologyArchivesHL7>> selectTechnologyArchivesHL7(){
        return hlservice.selectTechnologyArchivesHL7();
    }

    @GetMapping("/selectHL7Image")
    public ResultVo<Map<String, Object>> selectHL7Image(@RequestParam("socialNo") String socialNo, @RequestParam("id") Integer id){
        return  hlservice.selectHL7Image(socialNo, id);
    }

    //上传图片
    @PostMapping("/putHL7CertificateImage")
    public ResultVo<Map<String, Object>> putHL7CertificateImage(@RequestBody MultipartFile[] file, @RequestParam("approvalTime") String approvalTime) {
        return hlservice.putHL7CertificateImage(file, approvalTime);
    }
    @GetMapping("/setHL7Image")
    public ResultVo<Map<String, Object>> setHL7Image(@RequestParam("socialNo") String socialNo, @RequestParam("approvalTime") String approvalTime, String url) {
        return hlservice.setHL7Image(socialNo, approvalTime, url);
    }
    @PostMapping("/saveTechnologyArchivesHL7")
    public ResultVo<Map<String, Object>> saveTechnologyArchivesHL7(@RequestBody @Validated TechnologyArchivesHL7 HL7){
        return hlservice.saveTechnologyArchivesHL7(HL7);
    }

    @GetMapping("/delTechnologyArchivesHL7ByCode")
    public ResultVo<Map<String, Object>> delTechnologyArchivesHL7ByCode(@RequestParam("socialNo") String socialNo, @RequestParam("approvalTime") String approvalTime){
        return hlservice.delTechnologyArchivesHL7ByCode(socialNo, approvalTime);
    }

    @GetMapping("/selectTechnologyArchivesHL9")
    public ResultVo<List<TechnologyArchivesHL9>> selectTechnologyArchivesHL9(){
        return hlservice.selectTechnologyArchivesHL9();
    }

    @PostMapping("/saveTechnologyArchivesHL9")
    public ResultVo<Map<String, Object>> saveTechnologyArchives9(@RequestBody @Validated TechnologyArchivesHL9 HL9){
        return hlservice.saveTechnologyArchivesHL9(HL9);
    }

    @GetMapping("/delTechnologyArchivesHL9ByCode")
    public ResultVo<Map<String, Object>> delTechnologyArchives9ByCode(@RequestParam("socialNo") String socialNo, @RequestParam("id") Integer id){
        return hlservice.delTechnologyArchivesHL9ByCode(socialNo, id);
    }

    @GetMapping("/selectTechnologyArchives5")
    public ResultVo<List<TechnologyArchives5>> selectTechnologyArchives5(){
        return hlservice.selectTechnologyArchives5();
    }

    @PostMapping("/saveTechnologyArchives5")
    public ResultVo<Map<String, Object>> saveTechnologyArchives5(@RequestBody @Validated TechnologyArchives5 fifth){
        return hlservice.saveTechnologyArchives5(fifth);
    }

    @GetMapping("/delTechnologyArchives5ByCode")
    public ResultVo<Map<String, Object>> delTechnologyArchives5ByCode(@RequestParam("socialNo") String socialNo, @RequestParam("time") String time){
        return hlservice.delTechnologyArchives5ByCode(socialNo, time);
    }

    @GetMapping("/selectTechnologyArchives7")
    public ResultVo<List<TechnologyArchives7>> selectTechnologyArchives7(){
        return hlservice.selectTechnologyArchives7();
    }

    @PostMapping("/saveTechnologyArchives7")
    public ResultVo<Map<String, Object>> saveTechnologyArchives7(@RequestBody @Validated TechnologyArchives7 seventh){
        return hlservice.saveTechnologyArchives7(seventh);
    }

    @GetMapping("/delTechnologyArchives7ByCode")
    public ResultVo<Map<String, Object>> delTechnologyArchives7ByCode(@RequestParam("socialNo") String socialNo, @RequestParam("id") Integer id){
        return hlservice.delTechnologyArchives7ByCode(socialNo, id);
    }

    @GetMapping("/selectTechnologyArchives10")
    public ResultVo<List<TechnologyArchives10>> selectTechnologyArchives10(){
        return hlservice.selectTechnologyArchives10();
    }

    @PostMapping("/saveTechnologyArchives10")
    public ResultVo<Map<String, Object>> saveTechnologyArchives10(@RequestBody @Validated TechnologyArchives10 tenth){
        return hlservice.saveTechnologyArchives10(tenth);
    }

    @GetMapping("/delTechnologyArchives10ByCode")
    public ResultVo<Map<String, Object>> delTechnologyArchives10ByCode(@RequestParam("socialNo") String socialNo, @RequestParam("id") Integer id){
        return hlservice.delTechnologyArchives10ByCode(socialNo, id);
    }

    @GetMapping("/selectTechnologyArchives12")
    public ResultVo<List<TechnologyArchives12>> selectTechnologyArchives12(){
        return hlservice.selectTechnologyArchives12();
    }

    @PostMapping("/saveTechnologyArchives12")
    public ResultVo<Map<String, Object>> saveTechnologyArchives12(@RequestBody @Validated TechnologyArchives12 twelfth){
        return hlservice.saveTechnologyArchives12(twelfth);
    }

    @GetMapping("/delTechnologyArchives12ByCode")
    public ResultVo<Map<String, Object>> delTechnologyArchives12ByCode(@RequestParam("socialNo") String socialNo, @RequestParam("id") Integer id){
        return hlservice.delTechnologyArchives12ByCode(socialNo, id);
    }

    @GetMapping("/selectTechnologyArchives13")
    public ResultVo<List<TechnologyArchives13>> selectTechnologyArchives13(){
        return hlservice.selectTechnologyArchives13();
    }

    @GetMapping("/selectAppointmentImage")
    public ResultVo<Map<String, Object>> selectAppointmentImage(@RequestParam("socialNo") String socialNo, @RequestParam("name") String name) {
        return hlservice.selectAppointmentImage(socialNo, name);
    }
    @PostMapping("/putAppointmentImage")
    public ResultVo<Map<String, Object>> putAppointmentImage(@RequestBody MultipartFile[] file, @RequestParam("name") String name) {
        return hlservice.putAppointmentImage(file, name);
    }
    @GetMapping("/setAppointmentImage")
    public ResultVo<Map<String, Object>> setAppointmentImage(@RequestParam("socialNo") String socialNo, @RequestParam("name") String name, String url) {
        return hlservice.setAppointmentImage(socialNo, name, url);
    }

    @PostMapping("/saveTechnologyArchives13")
    public ResultVo<Map<String, Object>> saveTechnologyArchives13(@RequestBody @Validated TechnologyArchives13 thirteenth){
        return hlservice.saveTechnologyArchives13(thirteenth);
    }

    @GetMapping("/delTechnologyArchives13ByCode")
    public ResultVo<Map<String, Object>> delTechnologyArchives13ByCode(@RequestParam("socialNo") String socialNo, @RequestParam("id") Integer id){
        return hlservice.delTechnologyArchives13ByCode(socialNo, id);
    }

    @GetMapping("/selectTechnologyArchives14")
    public ResultVo<List<TechnologyArchives14>> selectTechnologyArchives14(){
        return hlservice.selectTechnologyArchives14();
    }

    @PostMapping("/saveTechnologyArchives14")
    public ResultVo<Map<String, Object>> saveTechnologyArchives14(@RequestBody @Validated TechnologyArchives14 fourteenth){
        return hlservice.saveTechnologyArchives14(fourteenth);
    }

    @GetMapping("/delTechnologyArchives14ByCode")
    public ResultVo<Map<String, Object>> delTechnologyArchives14ByCode(@RequestParam("socialNo") String socialNo, @RequestParam("id") Integer id){
        return hlservice.delTechnologyArchives14ByCode(socialNo, id);
    }

    @GetMapping("/selectTechnologyArchivesHLType")
    public ResultVo<Map<String, Object>> selectTechnologyArchivesHLType(@RequestParam("type") String type){
        return hlservice.selectTechnologyArchivesHLType(type);
    }

    @PostMapping("/selectTechnologyArchivesHLInfo")
    public ResultVo<Map<String, Object>> selectTechnologyArchivesHLInfo(@RequestBody @Validated TechnologyArchivesVo vo){
        return hlservice.selectHLTechnologyArchivesInfo(vo);
    }

    @PostMapping("/exportMultiTechnologyArchives")
    public ResultVo<Map<String, Object>> exportMultiTechnologyArchives(HttpServletResponse response, @RequestBody @Validated TechnologyArchivesMultiVo vo){
        return hlservice.exportMultiTechnologyArchives(response, vo);
    }
}
