zhangym 2 rokov pred
rodič
commit
4e3f7ea591

+ 1 - 1
pom.xml

@@ -6,7 +6,7 @@
 
     <groupId>org.example</groupId>
     <artifactId>antai-api</artifactId>
-    <version>1.0</version>
+    <version>2.4</version>
 
     <parent>
         <groupId>org.springframework.boot</groupId>

+ 47 - 16
src/main/java/com/steerinfo/dil/controller/EMSController.java

@@ -43,16 +43,17 @@ public class EMSController extends BaseRESTfulController {
     @ApiImplicitParam(name = "map", value = "JSON格式数据", required = true, dataType = "Map<String, Object>")
     @LogAround(foreignKeys = {"settlementId"}, foreignKeyTypes = {"新增详单明细"})
     @PostMapping("/emsdetailsordersAdd")
-    public Map<String, Object> emsdetailsordersAdd(@RequestBody(required = false) Map<String, Object> map){
+    public Map<String, Object> emsdetailsordersAdd(@RequestBody(required = false) Map<String, Object> map) {
 
         return emsFeign.emsdetailsordersAdd(map);
     }
 
+
     @ApiOperation(value = "新增账单明细")
     @ApiImplicitParam(name = "map", value = "JSON格式数据", required = true, dataType = "Map<String, Object>")
     @LogAround(foreignKeys = {"settlementId"}, foreignKeyTypes = {"新增详单明细"})
     @PostMapping("/emssettlementordersAdd")
-    public Map<String, Object> emssettlementordersAdd(@RequestBody Map<String, Object> map){
+    public Map<String, Object> emssettlementordersAdd(@RequestBody Map<String, Object> map) {
         return emsFeign.emssettlementordersAdd(map);
     }
 
@@ -60,18 +61,18 @@ public class EMSController extends BaseRESTfulController {
     @ApiImplicitParam(name = "map", value = "JSON格式数据", required = true, dataType = "Map<String, Object>")
     @LogAround(foreignKeys = {"settlementId"}, foreignKeyTypes = {"新增详单明细"})
     @PutMapping("/emsdetailsordersupdate/{id}")
-    public Map<String, Object> emsdetailsordersupdate(@PathVariable BigDecimal id,@RequestBody(required = false) Map<String, Object> map){
+    public Map<String, Object> emsdetailsordersupdate(@PathVariable BigDecimal id, @RequestBody(required = false) Map<String, Object> map) {
         map.put("updateUsername", map.get("userName").toString());
-        return emsFeign.emsdetailsordersdelete(id,map);
+        return emsFeign.emsdetailsordersupdate(id, map);
     }
 
     @ApiOperation(value = "更新详单状态")
     @ApiImplicitParam(name = "map", value = "JSON格式数据", required = true, dataType = "Map<String, Object>")
     @LogAround(foreignKeys = {"settlementId"}, foreignKeyTypes = {"新增详单明细"})
     @PutMapping("/emsdetailsordersdelete/{id}")
-    public Map<String, Object> emsdetailsordersdelete(@PathVariable BigDecimal id,@RequestBody(required = false) Map<String, Object> map){
+    public Map<String, Object> emsdetailsordersdelete(@PathVariable BigDecimal id, @RequestBody(required = false) Map<String, Object> map) {
         map.put("updateUsername", map.get("userName").toString());
-        return emsFeign.emsdetailsordersupdate(id,map);
+        return emsFeign.emsdetailsordersdelete(id, map);
     }
 
     @ApiOperation(value = "展示账单详情")
@@ -83,9 +84,9 @@ public class EMSController extends BaseRESTfulController {
     })
     @PostMapping(value = "/emssettlementordersList")
     Map<String, Object> emssettlementordersList(@RequestBody(required = false) Map<String, Object> mapValue,
-                                             Integer apiId,
-                                             Integer pageNum,
-                                             Integer pageSize
+                                                Integer apiId,
+                                                Integer pageNum,
+                                                Integer pageSize
     ) {
         return emsFeign.emssettlementordersList(mapValue == null ? new HashMap<>() : mapValue, apiId, pageNum, pageSize);
     }
@@ -111,21 +112,51 @@ public class EMSController extends BaseRESTfulController {
     @ApiImplicitParam(name = "map", value = "JSON格式数据", required = true, dataType = "Map<String, Object>")
     @LogAround(foreignKeys = {"settlementId"}, foreignKeyTypes = {"账单详情更新"})
     @PutMapping("/emssettlementorderupdate/{id}")
-    public Map<String, Object> emssettlementorderupdate(@PathVariable BigDecimal id,@RequestBody(required = false) Map<String, Object> map) throws ParseException {
+    public Map<String, Object> emssettlementorderupdate(@PathVariable BigDecimal id, @RequestBody(required = false) Map<String, Object> map) throws ParseException {
         SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
-        Date settlementStartDate = simpleDateFormat.parse(map.get("settlementStartDate").toString());
-        Date settlementEndDate = simpleDateFormat.parse(map.get("settlementEndDate").toString());
-        map.put("settlementStartDate",settlementStartDate);
-        map.put("settlementEndDate",settlementEndDate);
-        return emsFeign.emssettlementorderupdate(id,map);
+        if (map.containsKey("settlementStartDate")) {
+            Date settlementStartDate = simpleDateFormat.parse(map.get("settlementStartDate").toString());
+            map.put("settlementStartDate", settlementStartDate);
+        }
+        if (map.containsKey("settlementEndDate")) {
+            Date settlementEndDate = simpleDateFormat.parse(map.get("settlementEndDate").toString());
+
+            map.put("settlementEndDate", settlementEndDate);
+        }
+
+
+        return emsFeign.emssettlementorderupdate(id, map);
     }
 
     @ApiOperation(value = "异常处理")
     @ApiImplicitParam(name = "map", value = "JSON格式数据", required = true, dataType = "Map<String, Object>")
     @LogAround(foreignKeys = {"settlementId"}, foreignKeyTypes = {"异常处理"})
     @PostMapping("/abnormal")
-    public Map<String, Object> abnormal(@RequestBody(required = false) Map<String, Object> map){
+    public Map<String, Object> abnormal(@RequestBody(required = false) Map<String, Object> map) {
         return emsFeign.abnormal(map);
     }
+    @ApiOperation(value = "展示工资绩效")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "mapValue", value = "参数", required = false, dataType = "map"),
+            @ApiImplicitParam(name = "apiId()", value = "动态表头", required = false, dataType = "Integer"),
+            @ApiImplicitParam(name = "pageNum", value = "页码", required = false, dataType = "Integer"),
+            @ApiImplicitParam(name = "pageSize", value = "页", required = false, dataType = "Integer"),
+    })
+    @PostMapping(value = "/emssalarydetailsList")
+    Map<String, Object> emssalarydetailsList(@RequestBody(required = false) Map<String, Object> mapValue,
+                                             Integer apiId,
+                                             Integer pageNum,
+                                             Integer pageSize
+    ) {
+        return emsFeign.emsdetailsordersList(mapValue == null ? new HashMap<>() : mapValue, apiId, pageNum, pageSize);
+    }
+
+    @ApiOperation(value = "新增详单明细")
+    @ApiImplicitParam(name = "map", value = "JSON格式数据", required = true, dataType = "Map<String, Object>")
+    @LogAround(foreignKeys = {"settlementId"}, foreignKeyTypes = {"新增详单明细"})
+    @PostMapping("/emsdetailsordersAdd2")
+    public Map<String, Object> emsdetailsordersAdd2(@RequestBody(required = false) Map<String, Object> map) {
 
+        return emsFeign.emsdetailsordersAdd2(map);
+    }
 }

+ 44 - 13
src/main/java/com/steerinfo/dil/controller/SystemFileController.java

@@ -1,6 +1,7 @@
 package com.steerinfo.dil.controller;
 
 import com.google.common.collect.Iterators;
+import com.steerinfo.dil.mapper.SystemFileMapper;
 import com.steerinfo.dil.util.FtpFileUtil;
 import com.steerinfo.dil.util.IDutils;
 import com.steerinfo.framework.controller.BaseRESTfulController;
@@ -46,9 +47,13 @@ public class SystemFileController extends BaseRESTfulController {
     @Autowired
     ISystemFileService systemFileService;
 
+    @Autowired
+    SystemFileMapper systemFileMapper;
+
     @Autowired
     private FtpFileUtil ftpFileUtil;
-//同一个信息包含多个上传文件信息
+
+    //同一个信息包含多个上传文件信息
     @PostMapping("/insertFile")
     public RESTfulResult insertFile(String fileuuid, @ModelAttribute MultipartFile[] file) {
         String filenames = "";
@@ -97,12 +102,14 @@ public class SystemFileController extends BaseRESTfulController {
     }
 
     @PostMapping("/insertFiles2")
-    public RESTfulResult insertFiles2(String[] fileuuid, @ModelAttribute MultipartFile[] file) {
+    public RESTfulResult insertFiles2(String fileuuid, @ModelAttribute MultipartFile[] file) {
         String filenames = "";
         for (int i = 0; i < file.length; i++) {
             filenames += file[i].getOriginalFilename() + ";";
         }
         String filesid = "";
+
+        String[] fileuuids = fileuuid.split(",");
         if (file != null) {
             for (int i = 0; i < file.length; i++) {
                 try {
@@ -123,7 +130,7 @@ public class SystemFileController extends BaseRESTfulController {
                         SystemFile uploadFile = new SystemFile();
                         uploadFile.setFilename(oldName);
                         uploadFile.setFilepath(filePath + "/" + newName);
-                        uploadFile.setId(fileuuid[i]);
+                        uploadFile.setId(fileuuids[i]);
                         SystemFile modela = systemFileService.add(uploadFile);
                         if (modela != null) {
                             filesid += "," + modela.getId();
@@ -142,12 +149,13 @@ public class SystemFileController extends BaseRESTfulController {
         }
 
     }
+
     @PostMapping("/insertFiles")
-    public RESTfulResult insertFiles(String[] fileUuids,String[] fileNames,String[]fileTypes, Map<Object,MultipartFile>FileList, MultipartRequest request) throws Exception {
+    public RESTfulResult insertFiles(String[] fileUuids, String[] fileNames, String[] fileTypes, Map<Object, MultipartFile> FileList, MultipartRequest request) throws Exception {
 
-        List<MultipartFile> files  = new ArrayList<>();
-        int index=-1;
-        for(int i=0;i<21;i++) {
+        List<MultipartFile> files = new ArrayList<>();
+        int index = -1;
+        for (int i = 0; i < 21; i++) {
             MultipartFile file = request.getFile("file" + i);
             if (file != null) {
                 files.add(file);
@@ -166,11 +174,11 @@ public class SystemFileController extends BaseRESTfulController {
             String newName = IDutils.getImageName();
             //重新命名文件
 
-            String filePath = simpleDateFormat.format(new Date())+"/"+fileTypes[i].toString();
+            String filePath = simpleDateFormat.format(new Date()) + "/" + fileTypes[i].toString();
             //获取输入流
             String fileTypeName = files.get(i).getOriginalFilename();
-            fileTypeName=fileTypeName.substring(fileTypeName.lastIndexOf(".")) ;
-            newName = oldName+"("+newName+")" +fileTypeName;
+            fileTypeName = fileTypeName.substring(fileTypeName.lastIndexOf("."));
+            newName = oldName + "(" + newName + ")" + fileTypeName;
             InputStream inputStream = files.get(i).getInputStream();
             boolean result = ftpFileUtil.uploadToFtp(inputStream, filePath, newName, false);
             inputStream.close();
@@ -188,7 +196,7 @@ public class SystemFileController extends BaseRESTfulController {
             }
         }
 
-       return success();
+        return success();
 
     }
 
@@ -196,10 +204,10 @@ public class SystemFileController extends BaseRESTfulController {
     public RESTfulResult previewfile(@RequestBody HashMap parmas) {
         String filename = parmas.get("filename").toString();
         String filepath = parmas.get("filepath").toString();
-        if (filename == null ||filename.isEmpty()) {
+        if (filename == null || filename.isEmpty()) {
             return failed("该图片不存在!");
         }
-        if (filepath == null ||filepath.isEmpty()) {
+        if (filepath == null || filepath.isEmpty()) {
             return failed("该图片地址不存在!");
         }
         try {
@@ -212,6 +220,29 @@ public class SystemFileController extends BaseRESTfulController {
 
     }
 
+    @PostMapping("/previewfile2")
+    public RESTfulResult previewfile2(@RequestBody HashMap parmas) {
+
+        SystemFile value = systemFileMapper.selectByPrimaryKey(parmas.get("id").toString());
+
+            String fileName = value.getFilename();
+            String filepath = value.getFilepath();
+            if (fileName == null || fileName.isEmpty()) {
+                return failed("该图片不存在!");
+            }
+            if (filepath == null || filepath.isEmpty()) {
+                return failed("该图片地址不存在!");
+            }
+
+            try {
+                String result = ftpFileUtil.downloadFile(fileName, filepath);
+                return success(result);
+            } catch (IOException e) {
+                e.getMessage();
+                return failed();
+            }
+
+    }
 
     @PostMapping("/updateFile")
     public RESTfulResult updateFile(String alternateFields1, @ModelAttribute MultipartFile[] file) {

+ 1 - 8
src/main/java/com/steerinfo/dil/controller/TMSController.java

@@ -159,11 +159,8 @@ public class TMSController extends BaseRESTfulController {
         return tmsFeign.syncWeightResult(map);
     }
 
-<<<<<<< HEAD
-    @ApiOperation(value = "计时")
-=======
+
     @ApiOperation(value="计时")
->>>>>>> 1ae397577949f50ad9b020e41b0742172116bf79
     @ApiImplicitParam(name = "map", value = "JSON格式数据", required = true, dataType = "Map<String, Object>")
     @RequestLimit()
     @PostMapping(value = "/startend")
@@ -184,11 +181,7 @@ public class TMSController extends BaseRESTfulController {
     @ApiOperation(value = "修改计时")
     @ApiImplicitParam(name = "map", value = "JSON格式数据", required = true, dataType = "Map<String, Object>")
     @PostMapping(value = "/tmstimingresultsUpdate")
-<<<<<<< HEAD
     @LogAround(foreignKeys = {"resultId"}, foreignKeyTypes = {"修改计时"})
-=======
-    @LogAround(foreignKeys = {"resultId"},foreignKeyTypes = {"修改计时"})
->>>>>>> 1ae397577949f50ad9b020e41b0742172116bf79
     public Map<String, Object> tmstimingresultsUpdate(@RequestBody(required = false) Map<String, Object> map) {
         return tmsFeign.tmstimingresultsUpdate(map);
     }

+ 9 - 0
src/main/java/com/steerinfo/dil/feign/EmsFeign.java

@@ -47,6 +47,15 @@ public interface EmsFeign {
                                              @RequestParam Integer pageNum,
                                              @RequestParam Integer pageSize
     );
+    @PostMapping("api/v1/ems/emssalarydetailss/emssalarydetailsList")
+    Map<String, Object> emssalarydetailsList(@RequestBody(required = false) Map<String, Object> mapValue,
+                                             @RequestParam Integer apiId,
+                                             @RequestParam Integer pageNum,
+                                             @RequestParam Integer pageSize
+    );
+
+    @PostMapping("api/v1/ems/emsdetailsorders/emsdetailsordersAdd2")
+    Map<String, Object> emsdetailsordersAdd2(@RequestBody(required = false) Map<String, Object> map);
 }
 
 

+ 1 - 20
src/main/java/com/steerinfo/dil/feign/TmsFeign.java

@@ -74,36 +74,20 @@ public interface TmsFeign {
 
 
     @PostMapping("api/v1/tms/tmstimingresults/tmstimingresultsList")
-<<<<<<< HEAD
+
     Map<String, Object> tmstimingresultsList(@RequestBody(required = false) Map<String, Object> map,
                                              @RequestParam Integer apiId,
                                              @RequestParam Integer pageNum,
                                              @RequestParam Integer pageSize);
-=======
-    Map<String, Object> tmstimingresultsList(@RequestBody(required = false) Map<String, Object> map,@RequestParam  Integer apiId,
-                                             @RequestParam  Integer pageNum,
-                                             @RequestParam  Integer pageSize);
-
->>>>>>> 1ae397577949f50ad9b020e41b0742172116bf79
-
     @PostMapping("api/v1/tms/omstransorders/saleDispatchOrder")
     Map<String, Object> saleDispatchOrder(@RequestBody(required = false) Map<String, Object> map);
 
     @PostMapping("api/v1/tms/omstransorders/getSaleTransOrderList")
     Map<String, Object> getSaleTransOrderList(@RequestBody(required = false) Map<String, Object> map,
-<<<<<<< HEAD
                                               @RequestParam Integer apiId,
                                               @RequestParam Integer pageNum,
                                               @RequestParam Integer pageSize);
 
-
-=======
-                                          @RequestParam  Integer apiId,
-                                          @RequestParam  Integer pageNum,
-                                          @RequestParam  Integer pageSize);
-
-
->>>>>>> 1ae397577949f50ad9b020e41b0742172116bf79
     @PostMapping("api/v1/tms/tmsqualityresults/syncQualityResult")
     Map<String, Object> syncQualityResult(Map<String, Object> map);
 
@@ -208,10 +192,7 @@ public interface TmsFeign {
 
     @PostMapping("api/v1/tms/omstransorders/changeSaleTransOrder")
     Map<String, Object> changeSaleTransOrder(Map<String, Object> map);
-<<<<<<< HEAD
 
-=======
->>>>>>> 1ae397577949f50ad9b020e41b0742172116bf79
 }