Jelajahi Sumber

内外部导入

DLC 1 bulan lalu
induk
melakukan
d3093c7e19

+ 5 - 0
qcs-common/src/main/java/com/rongwei/bscommon/sys/dao/SlaveDao.java

@@ -19,4 +19,9 @@ public interface SlaveDao {
             "left join t_drawing_list l on l.DLSERIALID=t.DTSERIALID\n" +
             "where t.DELETED='0' and IFNULL(t.DTDRAWINGNO,'')!='' and IFNULL(t.DTPARTNAME,'')!='' and t.DTSERIALID=#{dtserialId} order by t.DTDRAWINGNO")
     List<QcsPartNoDo> getPartnos(@Param("dtserialId") String dtserialId);
+
+    @Select("select t.ID as PARTNOID,t.DTDRAWINGNO,t.DTPARTNAME,t.DTSERIALID,l.DLPROJID,l.DLPROJNAME from t_design_task t\n" +
+            "left join t_drawing_list l on l.DLSERIALID=t.DTSERIALID\n" +
+            "where t.DELETED='0' and IFNULL(t.DTDRAWINGNO,'')!='' and IFNULL(t.DTPARTNAME,'')!=''")
+    List<QcsPartNoDo> getAllPartnos();
 }

+ 2 - 0
qcs-common/src/main/java/com/rongwei/bscommon/sys/service/QcsMainCostService.java

@@ -17,4 +17,6 @@ public interface QcsMainCostService extends IService<QcsMainCostDo> {
     R tjAmount(Map<String, String> params);
 
     R importMainCost(MultipartFile file, String costType, String unitId) throws IOException, ParseException;
+
+    R importLossMainCost(MultipartFile file, String costType, String unitId) throws IOException, ParseException;
 }

File diff ditekan karena terlalu besar
+ 186 - 3
qcs-common/src/main/java/com/rongwei/bscommon/sys/service/impl/QcsMainCostServiceImpl.java


+ 5 - 0
qcs-entity/src/main/java/com/rongwei/bsentity/domain/QcsLossDetailDo.java

@@ -56,6 +56,11 @@ public class QcsLossDetailDo extends BaseDo implements Serializable {
      */
     private String partname;
 
+    /**
+     * 类别
+     */
+    private String losstype;
+
     /**
      * 编号
      */

+ 19 - 3
qcs-server/src/main/java/com/rongwei/controller/QcsMainCostController.java

@@ -55,18 +55,34 @@ public class QcsMainCostController {
         }
     }
 
-    //数据导入
+    //预防、鉴定数据导入
     @RequestMapping("/importMainCost")
     @ResponseBody
     public R importMainCost(@RequestParam MultipartFile file, String costType, String unitId) {
         try {
             if (file == null) {
-                return R.error("文件解析失败");
+                return R.error("预防鉴定文件解析失败");
             }
             return qcsMainCostService.importMainCost(file, costType, unitId);
         } catch (Exception e) {
             e.printStackTrace();
-            log.info("数据导入异常..." + e.getMessage());
+            log.info("预防鉴定数据导入异常..." + e.getMessage());
+            return R.error();
+        }
+    }
+
+    //内外部数据导入
+    @RequestMapping("/importLossMainCost")
+    @ResponseBody
+    public R importLossMainCost(@RequestParam MultipartFile file, String costType, String unitId) {
+        try {
+            if (file == null) {
+                return R.error("内外部文件解析失败");
+            }
+            return qcsMainCostService.importLossMainCost(file, costType, unitId);
+        } catch (Exception e) {
+            e.printStackTrace();
+            log.info("内外部数据导入异常..." + e.getMessage());
             return R.error();
         }
     }