Просмотр исходного кода

Merge branch 'master' of https://gitee.com/antai-wuliu/ANTAI-API

dengpan 1 год назад
Родитель
Сommit
8c06839fb7

+ 2 - 3
src/main/java/com/steerinfo/dil/controller/AMScontroller.java

@@ -336,15 +336,14 @@ public class AMScontroller  extends BaseRESTfulController {
     @ApiOperation(value = "新增承运合同")
     @ApiImplicitParam(name = "map", value = "JSON格式数据", required = true, dataType = "Map<String, Object>")
     @LogAround(foreignKeys = {"priceId"}, foreignKeyTypes = {"承运合同"})
-    @PostMapping("/")
+    @PostMapping("/addAmsTransPrice")
     public Map<String, Object> insertTransPrice(@RequestBody(required = false) Map<String, Object> map) throws ParseException {
         if (map.containsKey("priceDate")){
             SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
             Date priceDate = simpleDateFormat.parse(map.get("priceDate").toString());
             map.put("priceDate", priceDate);
         }
-
-        return amsFeign.add(map);
+        return amsFeign.addAmsTransPrice(map);
     }
 
     @ApiOperation(value = "修改承运合同")

+ 1 - 0
src/main/java/com/steerinfo/dil/controller/RMScontroller.java

@@ -656,6 +656,7 @@ public class RMScontroller extends BaseRESTfulController {
             item.put("personnelName",item.get("姓名"));
             item.put("personnelPhone",item.get("手机"));
             item.put("identityCard",item.get("身份证号"));
+            item.put("roleName",item.get("角色"));
         }
         map.put("userId",userId);
         map.put("userName",userName);

+ 9 - 0
src/main/java/com/steerinfo/dil/controller/ReportController.java

@@ -143,4 +143,13 @@ public class ReportController {
     Map<String, Object> dailySummary(@RequestBody(required=false) Map<String,Object> params) {
         return reportFeign.dailySummary(params);
     }
+
+    @ApiOperation(value="职工考勤数据管理")
+    @PostMapping(value = "/staffAttendanceList")
+    Map<String, Object> staffAttendanceList(@RequestBody(required=false) Map<String,Object> mapValue,
+                                            Integer apiId,
+                                            Integer pageNum,
+                                            Integer pageSize) {
+        return reportFeign.staffAttendanceList(mapValue, apiId, pageNum, pageSize);
+    }
 }

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

@@ -9,17 +9,21 @@ import com.steerinfo.dil.feign.TmsFeign;
 import com.steerinfo.dil.mapper.UniversalMapper;
 import com.steerinfo.dil.util.BaseRESTfulController;
 import com.steerinfo.dil.util.ExcelToolUtils;
+import com.steerinfo.dil.util.Util;
 import com.steerinfo.framework.controller.RESTfulResult;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;
 import oracle.jdbc.proxy.annotation.Post;
+import org.apache.commons.io.FilenameUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
 
 import java.io.File;
 import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.OutputStreamWriter;
 import java.math.BigDecimal;
 import java.text.DateFormat;
 import java.text.ParseException;
@@ -198,11 +202,18 @@ public class TMSController extends BaseRESTfulController {
     @ApiImplicitParam(name = "map", value = "JSON格式数据", required = true, dataType = "Map<String, Object>")
     @PostMapping(value = "/startend")
     @LogAround(foreignKeys = {"resultId"}, foreignKeyTypes = {"计时"})
-    @RequestLimit
     public Map<String, Object> start(@RequestBody(required = false) Map<String, Object> map) {
         return tmsFeign.startend(map);
     }
 
+
+    @ApiOperation(value="计时")
+    @PostMapping(value = "/updCountResult")
+    @LogAround(foreignKeys = {"transOrderId"}, foreignKeyTypes = {"计次"})
+    public Map<String, Object> updCountResult(@RequestBody(required = false) Map<String, Object> map) {
+        return tmsFeign.updCountResult(map);
+    }
+
     @ApiOperation(value = "查询计时")
     @PostMapping("/tmstimingresultsList")
     public Map<String, Object> tmstimingresultsList(@RequestBody(required = false) Map<String, Object> map,
@@ -944,6 +955,46 @@ public class TMSController extends BaseRESTfulController {
         return tmsFeign.delPleaseApprove(map);
     }
 
+    @PostMapping("/gatepostTransitManager")
+    public Map<String,Object> gatepostTransitManager(@RequestBody Map<String,Object> map) {
+        return tmsFeign.gatepostTransitManager(map);
+    }
+
+
+    @ApiOperation("导入宏瑞综合实绩")
+    @PostMapping("/importComprehensiveResult")
+    public Map<String, Object> importComprehensiveResult(@RequestBody MultipartFile file,
+                                                 String userId,
+                                                 String userName,
+                                                 String resultType) throws Exception {
+        Map<String, Object> map = new HashMap<>();
+        if (file.isEmpty()) {
+            return new HashMap<>();
+        }
+        // 获取源文件名称
+        String originalFilename = file.getOriginalFilename();
+        // 获取源文件后缀名
+        String extension = "." + FilenameUtils.getExtension(originalFilename);
+        // 定义新路径
+        String newPath = "/data/file/result/";
+        String newName = userName + "-" + originalFilename+ Util.RandomCreate(8) + ".xlsx";
+        File dataFile = new File(newPath);
+        if (!dataFile.exists()) {
+            dataFile.mkdirs();
+        }
+        FileOutputStream fileOutputStream = new FileOutputStream(newPath + newName);
+        fileOutputStream.write(file.getBytes());
+        fileOutputStream.flush();
+        fileOutputStream.close();
+        //获取Excel中包含的对象数组
+        List<Map<String, Object>> list = ExcelToolUtils.getExcelList(file, 0);
+        map.put("list", list);
+        map.put("userId", userId);
+        map.put("userName", userName);
+        map.put("resultType", resultType);
+        map.put("filePath",newPath + newName);
+        return tmsFeign.importComprehensiveResult(map);
+    }
     @ApiOperation(value = "火运大宗销售订单 删除销售运输订单")
     @PostMapping("/changeTransOrderH")
     public Map<String,Object> changeTransOrderH(@RequestBody Map<String,Object> map) {

+ 9 - 6
src/main/java/com/steerinfo/dil/controller/UniversalController.java

@@ -389,16 +389,19 @@ public class UniversalController extends BaseRESTfulController {
         }
         byte[] stream1 = exportExcelFile(columnMaps, listMap);
         SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
-        Random random = new Random();
-        String path = "/data/file/"+  map.get("userName") + "-" + simpleDateFormat.format(new Date()) + "-"
-                + map.get("exclename").toString()+ Util.RandomCreate(8) + ".xlsx";
-        FileOutputStream outputStream1 = new FileOutputStream(new File(path));
+        String path = "/data/file/exportExcel/" + simpleDateFormat.format(new Date()) + "/";
+        File datFile = new File(path);
+        if(!datFile.exists()) {
+            datFile.mkdirs();
+        }
+        String name = map.get("userName") + "-" + map.get("exclename").toString()+ Util.RandomCreate(8) + ".xlsx";
+        FileOutputStream outputStream1 = new FileOutputStream(new File(path + name));
         outputStream1.write(stream1);
         outputStream1.flush();
         outputStream1.close();
         Map<String, Object> response = new HashMap<>();
-        response.put("fileName",map.get("userName") + "-" + simpleDateFormat.format(new Date()) + "-" + map.get("exclename").toString() + ".xlsx");
-        response.put("filePath",path);
+        response.put("fileName",name);
+        response.put("filePath",path + name);
         return success(response);
     }
     @ApiModelProperty(value = "边输边查公司单位审批流程使用")

+ 2 - 2
src/main/java/com/steerinfo/dil/feign/AmsFeign.java

@@ -117,8 +117,8 @@ public interface AmsFeign {
                              @RequestParam Integer pageNum,
                              @RequestParam Integer pageSize);
 
-    @PostMapping("api/v1/ams/amstransprices/")
-    Map<String, Object> add(@RequestBody(required = false) Map<String, Object> map);
+    @PostMapping("api/v1/ams/amstransprices/addAmsTransPrice")
+    Map<String, Object> addAmsTransPrice(@RequestBody(required = false) Map<String, Object> map);
 
     @PutMapping("api/v1/ams/amstransprices/{id}")
     Map<String, Object> update(@PathVariable BigDecimal id, @RequestBody(required = false) Map<String, Object> map);

+ 6 - 0
src/main/java/com/steerinfo/dil/feign/ReportFeign.java

@@ -72,4 +72,10 @@ public interface ReportFeign {
 
     @PostMapping(value = "api/v1/report/dailySummary/dailySummary")
     Map<String, Object> dailySummary(Map<String, Object> map);
+
+    @PostMapping(value = "api/v1/report/productReports/staffAttendanceList")
+    Map<String, Object> staffAttendanceList(@RequestBody(required = false) Map<String, Object> map,
+                                            @RequestParam Integer apiId,
+                                            @RequestParam  Integer pageNum,
+                                            @RequestParam  Integer pageSize);
 }

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

@@ -722,7 +722,7 @@ public interface RmsFeign {
                                          @RequestParam Integer pageNum,
                                          @RequestParam Integer pageSize);
 
-    @PostMapping("api/v1/rms/rmsextractscales/add")
+    @PostMapping("api/v1/rms/rmsextractscales/addRmsExtractScale")
     Map<String, Object> addExtractscale(@RequestBody(required = false) Map<String, Object> map);
 
     @PutMapping("api/v1/rms/rmsextractscales/logicdelete")

+ 10 - 0
src/main/java/com/steerinfo/dil/feign/TmsFeign.java

@@ -82,6 +82,9 @@ public interface TmsFeign {
     @PostMapping("api/v1/tms/tmstimingresults/startend")
     Map<String, Object> startend(Map<String, Object> map);
 
+    @PostMapping("api/v1/tms/tmstimingresults/updCountResult")
+    Map<String, Object> updCountResult(Map<String, Object> map);
+
     @PostMapping("api/v1/tms/tmstimingresults/tmstimingresultsUpdate")
     Map<String, Object> tmstimingresultsUpdate(Map<String, Object> map);
 
@@ -330,11 +333,18 @@ public interface TmsFeign {
     @PostMapping(value = "api/v1/tms/tmspleaseapproves/delPleaseApprove")
     Map<String, Object> delPleaseApprove(Map<String, Object> map);
 
+    @PostMapping(value = "api/v1/tms/tmstransitorders/gatepostTransitManager")
+    Map<String, Object> gatepostTransitManager(Map<String, Object> map);
+
+    @PostMapping(value = "api/v1/tms/tmscomprehensiveresults/importComprehensiveResult")
+    Map<String, Object> importComprehensiveResult(Map<String, Object> map);
+
     @PostMapping(value = "api/v1/tms/omstransorders/changeTransOrderH")
     Map<String, Object> changeTransOrderH(Map<String, Object> map);
 
     @PostMapping(value = "api/v1/tms/omstransorders/updateCarNo")
     Map<String, Object> updateCarNo(Map<String, Object> map);
+
 }
 
 

+ 23 - 2
src/main/resources/com/steerinfo/dil/mapper/UniversalMapper.xml

@@ -332,6 +332,12 @@
             <if test="sourceFlag != null and sourceFlag !=''">
                 AND ALTERNATE_FIELDS1 = #{sourceFlag}
             </if>
+            <if test="gatepostCodeList != null and gatepostCodeList !='' and gatepostCodeList.size > 0">
+                AND OPERATION_POINT_CODE IN
+            <foreach collection="gatepostCodeList" open="(" close=")" separator="," item="item" index="index">
+                #{item}
+            </foreach>
+            </if>
         </where>
         order by alternate_fields3,LENGTH(OPERATION_POINT_NAME)
         FETCH NEXT 50 ROWS ONLY
@@ -653,7 +659,7 @@
         select * from (
         select * from (
         select * from (
-        select rownum id,t.* from (
+        select rownum rowno,t.* from (
         SELECT DISTINCT
         RCA .CAPACITY_ID "capacityId",
         RCA .CAPACITY_ID "id",
@@ -764,7 +770,7 @@
         <if test="id!=null and id.size>0">
             UNION
             SELECT DISTINCT
-            0 id,
+            0 rowno,
             RCA .CAPACITY_ID "capacityId",
             RCA .CAPACITY_ID "id",
             RCA .CAPACITY_ID "value",
@@ -1693,6 +1699,9 @@
         RP.PERSONNEL_ID "value",
         RP.PERSONNEL_NAME "label",
         RP.PERSONNEL_NAME "text",
+        <if test="driverCapacityId!=null and driverCapacityId!=''">
+            RCD.group_number "groupNumber",
+        </if>
         'personnelName' "prop"
         <if test="capacityId!=null and capacityId!=''">
             ,NVL(T ."countNumber",0) "countNumber"
@@ -1712,7 +1721,13 @@
             GROUP BY DRIVER_ID
             ) T ON T."driverId" = RP .PERSONNEL_ID
         </if>
+        <if test="driverCapacityId!=null and driverCapacityId!=''">
+            LEFT JOIN RMS_CAPACITY_DRIVER RCD on rcd.personnel_id = RP.personnel_id
+        </if>
         WHERE RP.DELETED != -1
+        <if test="driverCapacityId!=null and driverCapacityId!=''">
+            and RCD.capacity_id = #{driverCapacityId}
+        </if>
         <if test="isNC!=null">
             AND RP.SOURCE_ID IS NOT NULL
         </if>
@@ -1760,6 +1775,9 @@
             RP.PERSONNEL_ID "value",
             RP.PERSONNEL_NAME "label",
             RP.PERSONNEL_NAME "text",
+            <if test="driverCapacityId!=null and driverCapacityId!=''">
+                RCD.group_number "groupNumber",
+            </if>
             'personnelName' "prop"
             <if test="capacityId!=null and capacityId!=''">
                 ,NVL(T ."countNumber",0) "countNumber"
@@ -1778,6 +1796,9 @@
                 GROUP BY DRIVER_ID
                 ) T ON T."driverId" = RP .PERSONNEL_ID
             </if>
+            <if test="driverCapacityId!=null and driverCapacityId!=''">
+                LEFT JOIN RMS_CAPACITY_DRIVER RCD on rcd.personnel_id = RP.personnel_id
+            </if>
             WHERE RP.PERSONNEL_ID in
             <foreach collection="id" item="item"  open="(" close=")" separator="," >
                 #{item}