Selaa lähdekoodia

2021-08-02 -lrl

lirl 3 vuotta sitten
vanhempi
commit
a089ff9a7d
21 muutettua tiedostoa jossa 999 lisäystä ja 179 poistoa
  1. 5 5
      src/main/java/com/steerinfo/auth/shiro/config/ShiroConfig.java
  2. 47 47
      src/main/java/com/steerinfo/auth/shiro/jwt/JwtStatelessAccessControlFilter.java
  3. 1 2
      src/main/java/com/steerinfo/ems/Utils/TreeUtils.java
  4. 6 9
      src/main/java/com/steerinfo/ems/ifmesemsswapfile/controller/IfMesEmsSwapfileController.java
  5. 6 0
      src/main/java/com/steerinfo/ems/ifmesemsswapfile/service/IIfMesEmsSwapfileService.java
  6. 26 1
      src/main/java/com/steerinfo/ems/ifmesemsswapfile/service/impl/IfMesEmsSwapfileServiceImpl.java
  7. 0 1
      src/main/java/com/steerinfo/ems/multipart/controller/MultipartController.java
  8. 5 4
      src/main/java/com/steerinfo/ems/trmworkprocproductvalue/controller/TRmWorkprocProductValueController.java
  9. 95 95
      src/main/java/com/steerinfo/ems/trmworkprocproductvalue/service/impl/TRmWorkprocProductValueServiceImpl.java
  10. 5 0
      src/main/java/com/steerinfo/feigen/controller/LgWeightFeigenController.java
  11. 45 0
      src/main/java/com/steerinfo/feigen/model/LgWeight.java
  12. 18 0
      src/main/java/com/steerinfo/feigen/service/LgWeightFeigenService.java
  13. 170 0
      src/main/java/com/steerinfo/ftp/uploadfile/controller/UploadFileController.java
  14. 13 0
      src/main/java/com/steerinfo/ftp/uploadfile/mapper/UploadFileMapper.java
  15. 319 0
      src/main/java/com/steerinfo/ftp/uploadfile/mapper/UploadFileMapper.xml
  16. 169 0
      src/main/java/com/steerinfo/ftp/uploadfile/model/UploadFile.java
  17. 24 0
      src/main/java/com/steerinfo/ftp/uploadfile/service/IUploadFileService.java
  18. 42 0
      src/main/java/com/steerinfo/ftp/uploadfile/service/impl/UploadFileServiceImpl.java
  19. 2 13
      src/main/java/com/steerinfo/ftp/uploadfile/utils/FtpFileUtil.java
  20. 0 1
      src/main/resources/application.properties
  21. 1 1
      src/main/resources/bootstrap.yml

+ 5 - 5
src/main/java/com/steerinfo/auth/shiro/config/ShiroConfig.java

@@ -88,14 +88,14 @@ public class ShiroConfig {
             }
             //将 /**放在最为下边
             if (filterChainDefinitionMap.containsKey("/**")) {
-//                String allAuth = filterChainDefinitionMap.get("/**");
-//                filterChainDefinitionMap.remove("/**");
-//                filterChainDefinitionMap.put("/**", allAuth);
+                String allAuth = filterChainDefinitionMap.get("/**");
+                filterChainDefinitionMap.remove("/**");
+                filterChainDefinitionMap.put("/**", allAuth);
             }else{
-            	//filterChainDefinitionMap.put("/**", AUTH_ANON);
+            	filterChainDefinitionMap.put("/**", AUTH_ANON);
             }
         } else {
-           // filterChainDefinitionMap.put("/**", AUTH_ANON);
+           filterChainDefinitionMap.put("/**", AUTH_ANON);
         }
         // TODO 所有URL都不认证
         // filterChainDefinitionMap.put("/**", AUTH_ANON);

+ 47 - 47
src/main/java/com/steerinfo/auth/shiro/jwt/JwtStatelessAccessControlFilter.java

@@ -68,53 +68,53 @@ public class JwtStatelessAccessControlFilter extends AccessControlFilter {
      */
     @Override
     protected boolean onAccessDenied(ServletRequest request, ServletResponse response) throws Exception {
-//        logger.debug("StatelessAuthcFilter.onAccessDenied()");
-//        try {
-//            // 1、获取header里的Token
-//            String jwt = ((HttpServletRequest)request).getHeader(ShiroConstant.HEADERS_AUTHORIZATION);
-//            logger.debug(jwt);
-//            // header里没有,取cookies
-//            if (jwt == null){
-//                jwt = HttpUtils.getCookie(ShiroConstant.HEADERS_AUTHORIZATION, (HttpServletRequest) request);
-//            }
-//            if (jwt == null){
-//                throw new ShiroJwtException("Token丢失");
-//            } else {
-//            	ApplicationContextProvider.choseContext(AnnotationConfigServletWebServerApplicationContext.class);
-//    			Caches caches = ApplicationContextProvider.getBean("caches");
-//				Object obj = caches.getOneHourCache()
-//						.get(ShiroConstant.JWT_ACCESS_INVALID_PRE
-//								+ MD5Utils.INSTANCE.getMD5ofStr(jwt.replaceFirst(ShiroConstant.AUTH_BEARER_START, "")),
-//								String.class);
-//				if(obj != null) {
-//					if(((String)obj).equals(jwt)) {
-//						throw new ShiroJwtException("Token丢失");
-//					}
-//				}
-//                if (!jwt.startsWith(ShiroConstant.AUTH_BEARER_START)) {
-//                    throw new ShiroJwtException("Token无效");
-//                }
-//                jwt = jwt.replaceFirst(ShiroConstant.AUTH_BEARER_START, "");
-//            }
-//            // token失效
-//            try {
-//                JwtUtils.getPayload(jwt, UserPayload.class);
-//            } catch (ShiroJwtException e){
-//                throw new AuthenticationException(e.getMessage());
-//            }
-//            // 2、生成无状态Token
-//            StatelessToken token = new StatelessToken(jwt, request.getParameterMap());
-//            // 3、委托给Realm进行登录
-//            getSubject(request, response).login(token);
-//        } catch (UnknownAccountException e){
-//            logger.debug(e.getMessage());
-//            return false;
-//        }
-///*        } catch (Exception e) {
-//            logger.debug(e.getMessage());
-//            // 就直接返回给请求者.
-//            return false;
-//        }*/
+        logger.debug("StatelessAuthcFilter.onAccessDenied()");
+        try {
+            // 1、获取header里的Token
+            String jwt = ((HttpServletRequest)request).getHeader(ShiroConstant.HEADERS_AUTHORIZATION);
+            logger.debug(jwt);
+            // header里没有,取cookies
+            if (jwt == null){
+                jwt = HttpUtils.getCookie(ShiroConstant.HEADERS_AUTHORIZATION, (HttpServletRequest) request);
+            }
+            if (jwt == null){
+                throw new ShiroJwtException("Token丢失");
+            } else {
+            	ApplicationContextProvider.choseContext(AnnotationConfigServletWebServerApplicationContext.class);
+    			Caches caches = ApplicationContextProvider.getBean("caches");
+				Object obj = caches.getOneHourCache()
+						.get(ShiroConstant.JWT_ACCESS_INVALID_PRE
+								+ MD5Utils.INSTANCE.getMD5ofStr(jwt.replaceFirst(ShiroConstant.AUTH_BEARER_START, "")),
+								String.class);
+				if(obj != null) {
+					if(((String)obj).equals(jwt)) {
+						throw new ShiroJwtException("Token丢失");
+					}
+				}
+                if (!jwt.startsWith(ShiroConstant.AUTH_BEARER_START)) {
+                    throw new ShiroJwtException("Token无效");
+                }
+                jwt = jwt.replaceFirst(ShiroConstant.AUTH_BEARER_START, "");
+            }
+            // token失效
+            try {
+                JwtUtils.getPayload(jwt, UserPayload.class);
+            } catch (ShiroJwtException e){
+                throw new AuthenticationException(e.getMessage());
+            }
+            // 2、生成无状态Token
+            StatelessToken token = new StatelessToken(jwt, request.getParameterMap());
+            // 3、委托给Realm进行登录
+            getSubject(request, response).login(token);
+        } catch (UnknownAccountException e){
+            logger.debug(e.getMessage());
+            return false;
+        }
+/*        } catch (Exception e) {
+            logger.debug(e.getMessage());
+            // 就直接返回给请求者.
+            return false;
+        }*/
         return true;
     }
 }

+ 1 - 2
src/main/java/com/steerinfo/ems/Utils/TreeUtils.java

@@ -5,10 +5,10 @@ import java.util.List;
 
 public class TreeUtils <T extends TreePO>{
 
+
     public List<T> getTreeData(List<T> treeNodes){
         List<T> trees = new ArrayList<>();
         for (T treeNode : treeNodes) {
-            System.out.println(treeNode);
             if ("".equals(treeNode.getParentId()) || treeNode.getParentId() ==null) {
                 trees.add(findAddressChildren(treeNode,treeNodes));
             }
@@ -32,5 +32,4 @@ public class TreeUtils <T extends TreePO>{
         }
         return treeNode;
     }
-
 }

+ 6 - 9
src/main/java/com/steerinfo/ems/ifmesemsswapfile/controller/IfMesEmsSwapfileController.java

@@ -56,15 +56,7 @@ public class IfMesEmsSwapfileController extends BaseRESTfulController {
         PageList<IfMesEmsSwapfile> list = ifMesEmsSwapfileService.queryLikeForPage(parmas, pageNum, pageSize);
         return success(list);
     }
-    
-    // @ApiOperation(value="创建", notes="根据IfMesEmsSwapfile对象创建")
-    // @ApiImplicitParam(name = "IfMesEmsSwapfile", value = "详细实体IfMesEmsSwapfile", required = true, dataType = "IfMesEmsSwapfile")
-    // //@RequiresPermissions("trmunit:create")
-    // @PostMapping(value = "/")
-    // public RESTfulResult add(@ModelAttribute IfMesEmsSwapfile model){
-    //     IfMesEmsSwapfile IfMesEmsSwapfile = ifMesEmsSwapfileService.add(model);
-    //     return success(IfMesEmsSwapfile);
-    // }
+
 
     @ApiOperation(value="立即从MES同步数据", notes="从MES同步投入产出数据")
     @PostMapping(value = "/synchronousMesAnEmsData")
@@ -73,5 +65,10 @@ public class IfMesEmsSwapfileController extends BaseRESTfulController {
         return success(s);
     }
 
+    @GetMapping("/getLgDateProd")
+    public RESTfulResult getLgDateProd (){
+        ifMesEmsSwapfileService.getLgDateProd();
+        return success();
+    }
 
 }

+ 6 - 0
src/main/java/com/steerinfo/ems/ifmesemsswapfile/service/IIfMesEmsSwapfileService.java

@@ -44,4 +44,10 @@ public interface IIfMesEmsSwapfileService extends IBaseService<IfMesEmsSwapfile,
 	 * @return
 	 */
 	String synchronousMesFromProd(Date d);
+
+	/**
+	 * 获取生产数据
+	 */
+	public  void  getLgDateProd();
+
 }

+ 26 - 1
src/main/java/com/steerinfo/ems/ifmesemsswapfile/service/impl/IfMesEmsSwapfileServiceImpl.java

@@ -1,9 +1,12 @@
 package com.steerinfo.ems.ifmesemsswapfile.service.impl;
 
+import com.steerinfo.ems.Utils.DateUtils;
 import com.steerinfo.ems.ifmesemsswapfile.mapper.IfMesEmsSwapfileMapper;
 import com.steerinfo.ems.ifmesemsswapfile.model.IfMesEmsSwapfile;
 import com.steerinfo.ems.ifmesemsswapfile.service.IIfMesEmsSwapfileService;
 import com.steerinfo.ems.Utils.HttpRequestMes;
+import com.steerinfo.feigen.model.LgWeight;
+import com.steerinfo.feigen.service.LgWeightFeigenService;
 import com.steerinfo.framework.mapper.IBaseMapper;
 import com.steerinfo.framework.service.impl.BaseServiceImpl;
 import com.alibaba.fastjson.JSONArray;
@@ -14,7 +17,6 @@ import java.text.SimpleDateFormat;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.List;
-import java.util.Set;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -28,6 +30,8 @@ public class IfMesEmsSwapfileServiceImpl extends BaseServiceImpl<IfMesEmsSwapfil
 
     @Autowired
     private IfMesEmsSwapfileMapper ifmesemsswapfilemapper;
+    @Autowired
+	private LgWeightFeigenService lgWeightFeigenService;
 
     @Override
     protected IBaseMapper<IfMesEmsSwapfile, String> getMapper() {
@@ -139,4 +143,25 @@ public class IfMesEmsSwapfileServiceImpl extends BaseServiceImpl<IfMesEmsSwapfil
 		logger.info("从正式环境同步MES投入产出数据--执行完毕--");
 		return null;
 	}
+
+
+	//获取炼钢的产出数据
+	public  void  getLgDateProd(){
+		List<LgWeight> lgWeights = lgWeightFeigenService.QueryWeightByTime();
+		for (LgWeight lgWeight : lgWeights) {
+			IfMesEmsSwapfile model = new IfMesEmsSwapfile();
+			model.setType("2");
+			model.setWorks("1036LG1");
+			model.setProdline("1036LG1");
+			model.setProdate(lgWeight.getDate());
+			model.setMaterialname(lgWeight.getType());
+			model.setUnit("吨");
+			model.setQty(lgWeight.getWeight());
+			model.setCreatetime(DateUtils.dateStr(new Date(),"yyyy-MM-dd"));
+			model.setStatus("0");
+			model.setFid(DateUtils.dateStr(new Date(),"yyyyMMddHHmmss"));
+			ifmesemsswapfilemapper.insert(model);
+		}
+		System.out.println("接收成功...");
+	}
 }

+ 0 - 1
src/main/java/com/steerinfo/ems/multipart/controller/MultipartController.java

@@ -40,7 +40,6 @@ public class MultipartController extends BaseRESTfulController {
     public RESTfulResult upload(HttpServletRequest request, @ModelAttribute MultipartFile[] file,String path) {
         String fileName = "";
         try {
-        	System.out.println(uploadPath);
             // 上传目录地址
             //String uploadDir = ResourceUtils.getURL("classpath:").getPath() + "BOOT-INF/classes/upload/"+path;
             String uploadDir = FILE_DIR + path;

+ 5 - 4
src/main/java/com/steerinfo/ems/trmworkprocproductvalue/controller/TRmWorkprocProductValueController.java

@@ -4,15 +4,14 @@ import com.steerinfo.auth.utils.JwtUtil;
 import com.steerinfo.ems.Utils.DateUtils;
 import com.steerinfo.ems.formula.service.IFormulaService;
 import com.steerinfo.ems.ifmesemsswapfile.service.IIfMesEmsSwapfileService;
-import com.steerinfo.ems.trmworkprocmaterial.model.TRmWorkprocMaterial;
-import com.steerinfo.ems.trmworkprocmaterialvalue.model.TRmWorkprocMaterialValue;
 import com.steerinfo.ems.trmworkprocproduct.mapper.TRmWorkprocProductMapper;
 import com.steerinfo.ems.trmworkprocproduct.model.TRmWorkprocProduct;
 import com.steerinfo.ems.trmworkprocproduct.service.ITRmWorkprocProductService;
+import com.steerinfo.feigen.model.LgWeight;
+import com.steerinfo.feigen.service.LgWeightFeigenService;
 import com.steerinfo.framework.controller.BaseRESTfulController;
 import com.steerinfo.framework.controller.RESTfulResult;
 import com.steerinfo.framework.service.pagehelper.PageList;
-import com.steerinfo.ems.trmworkprocproductvalue.mapper.TRmWorkprocProductValueMapper;
 import com.steerinfo.ems.trmworkprocproductvalue.model.TRmWorkprocProductValue;
 import com.steerinfo.ems.trmworkprocproductvalue.service.ITRmWorkprocProductValueService;
 import io.swagger.annotations.ApiImplicitParam;
@@ -59,6 +58,8 @@ public class TRmWorkprocProductValueController extends BaseRESTfulController {
     
     @Autowired
     IIfMesEmsSwapfileService ifMesEmsSwapfileService;
+    @Autowired
+    LgWeightFeigenService lgWeightFeigen;
 
     @ApiOperation(value="获取列表", notes="分页查询")
     @ApiImplicitParams({
@@ -68,7 +69,7 @@ public class TRmWorkprocProductValueController extends BaseRESTfulController {
     //@RequiresPermissions("trmworkprocproductvalue:view")
     @GetMapping(value = "/")
     public RESTfulResult list(@RequestParam HashMap<String, Object> parmas,Integer pageNum, Integer pageSize){
-        // PageList<TRmWorkprocProductValue> list = tRmWorkprocProductValueService.queryForPage(parmas, pageNum, pageSize);
+        tRmWorkprocProductValueService.setDate(new Date());
     	if(parmas.containsKey("productid") && parmas.get("productid") != null && !"".equals(parmas.get("productid").toString())){
             String productid = parmas.get("productid").toString();
             if(productid.indexOf(",") == -1){

+ 95 - 95
src/main/java/com/steerinfo/ems/trmworkprocproductvalue/service/impl/TRmWorkprocProductValueServiceImpl.java

@@ -101,7 +101,7 @@ public class TRmWorkprocProductValueServiceImpl extends BaseServiceImpl<TRmWorkp
 
 	/**
 	 * 获取生产数据
-	 * 将IF_MES_EMS_SWAPFILE中未读取的数据进行处理,将数据保存至T_RM_WORKPROC_PRODUCT_VALUE
+	 * 将IF_MES_EMS_SWAPFILE中未读取的数据进行处理,将数据保存至 T_RM_WORKPROC_PRODUCT_VALUE
 	 */
 	public void synchronousData() {
 		int success = 0;
@@ -166,7 +166,7 @@ public class TRmWorkprocProductValueServiceImpl extends BaseServiceImpl<TRmWorkp
 			if (relationItem.size() > 1) {
 				failure++;
 				logger.info("[错误][多条的关联项]" + DateUtils.dateStr(new Date(), "yyyy-MM-dd HH:mm:ss") + " :IF_MES_EMS_SWAPFILE中 FID 为 " + swapfile.getFid() + " 的数据在T_RM_WORKPROC_PRODUCT中找到" + relationItem.size() + "条对应关系;( MES物料编码:" + swapfile.getMaterialcode() + " ,MES物料名称:" + swapfile.getMaterialname() + " ,MES产线编码:" + swapfile.getProdline() + " )" );
-				logger.info("关联项");
+				logger.info("关联项: ");
 				for (int u = 0; u < relationItem.size(); u++) {
 					logger.info(relationItem.get(u).getItemid()+";");
 				}
@@ -205,98 +205,98 @@ public class TRmWorkprocProductValueServiceImpl extends BaseServiceImpl<TRmWorkp
 					String itemidpr = ""; // 炼钢、轧钢主产品项目ID
 					boolean addPr = false; // 是否添加到主产品(根据产品名称头判断)
 					String wid = "";
-					if (mline.endsWith("BC1")) { // 棒材线
-						// MES工序与EMS工序没有关联,这里防止修改工序后造成数据错误,增加一次判断,下同
-						TRmWorkproc tw = tRmWorkprocService.getById("ZY9101");
-						if(tw!=null && tw.getName().equalsIgnoreCase("棒材线")){
-							wid = "ZY9101";
-							itemid = wid+ pid + "R";
-							itemidpr = "ZY9101CP18R";
-							if (mname.startsWith("棒材︱")){
-								addPr = true;
-							}
-						}
-					} else if(mline.endsWith("GX1")) { // 一高线
-						TRmWorkproc tw = tRmWorkprocService.getById("ZY9102");
-						if(tw!=null && tw.getName().equalsIgnoreCase("一高线")){
-							wid = "ZY9102";
-							itemid = wid+ pid + "R";
-							itemidpr = "ZY9102CP19R";
-							if (mname.startsWith("一高线︱")){
-								addPr = true;
-							}
-						}
-					} else if(mline.endsWith("GX2")) { // 二高线
-						TRmWorkproc tw = tRmWorkprocService.getById("ZY9201");
-						if(tw!=null && tw.getName().equalsIgnoreCase("二高线")){
-							wid = "ZY9201";
-							itemid = wid+ pid + "R";
-							itemidpr = "ZY9201CP19R";
-							if (mname.startsWith("二高线︱")){
-								addPr = true;
-							}
-						}
-					} else if(mline.endsWith("GX3")) { // 三高线
-						TRmWorkproc tw = tRmWorkprocService.getById("ZY9103");
-						if(tw!=null && tw.getName().equalsIgnoreCase("三高线")){
-							wid = "ZY9103";
-							itemid = wid+ pid + "R";
-							itemidpr = "ZY9103CP19R";
-							if (mname.startsWith("三高线︱")){
-								addPr = true;
-							}
-						}
-					} else if(mline.endsWith("GX4")) { // 四高线
-						TRmWorkproc tw = tRmWorkprocService.getById("ZY9203");
-						if(tw!=null && tw.getName().equalsIgnoreCase("四高线")){
-							wid = "ZY9203";
-							itemid = wid+ pid + "R";
-							itemidpr = "ZY9203CP19R";
-							if (mname.startsWith("四高线︱")){
-								addPr = true;
-							}
-						}
-					} else if(mline.endsWith("GX5")) { // 五高线
-						TRmWorkproc tw = tRmWorkprocService.getById("ZY9204");
-						if(tw!=null && tw.getName().equalsIgnoreCase("五高线")){
-							wid = "ZY9204";
-							itemid = wid+ pid + "R";
-							itemidpr = "ZY9204CP19R";
-							if (mname.startsWith("五高线︱")){
-								addPr = true;
-							}
-						}
-					} else if(mline.endsWith("GL3")) { // 二炼铁2#1280高炉-ZY7202
-						TRmWorkproc tw = tRmWorkprocService.getById("ZY7202");
-						if(tw!=null && tw.getName().equalsIgnoreCase("二炼铁2#1280高炉")){
-							wid = "ZY7202";
-							itemid = wid + pid + "R";
-							itemidpr = "ZY7202CP14R";
-							if (mname.startsWith("二体系︱")){
-								addPr = true;
-							}
-						}
-					} else if(mline.endsWith("LG1")) { // 一炼钢
-						TRmWorkproc tw = tRmWorkprocService.getById("ZY8100");
-						if(tw!=null && tw.getName().equalsIgnoreCase("一炼钢")){
-							wid = "ZY8100";
-							itemid = wid+ pid + "R";
-							itemidpr = "ZY8100CP17R";
-							if (mname.startsWith("一体系︱")){
-								addPr = true;
-							}
-						}
-					} else if(mline.endsWith("LG2")) { // 二炼钢
-						TRmWorkproc tw = tRmWorkprocService.getById("ZY8200");
-						if(tw!=null && tw.getName().equalsIgnoreCase("二炼钢")){
-							wid = "ZY8200";
-							itemid = wid+ pid + "R";
-							itemidpr = "ZY8200CP17R";
-							if (mname.startsWith("二体系︱")){
-								addPr = true;
-							}
-						}
-					}
+//					if (mline.endsWith("BC1")) { // 棒材线
+//						// MES工序与EMS工序没有关联,这里防止修改工序后造成数据错误,增加一次判断,下同
+//						TRmWorkproc tw = tRmWorkprocService.getById("ZY9101");
+//						if(tw!=null && tw.getName().equalsIgnoreCase("棒材线")){
+//							wid = "ZY9101";
+//							itemid = wid+ pid + "R";
+//							itemidpr = "ZY9101CP18R";
+//							if (mname.startsWith("棒材︱")){
+//								addPr = true;
+//							}
+//						}
+//					} else if(mline.endsWith("GX1")) { // 一高线
+//						TRmWorkproc tw = tRmWorkprocService.getById("ZY9102");
+//						if(tw!=null && tw.getName().equalsIgnoreCase("一高线")){
+//							wid = "ZY9102";
+//							itemid = wid+ pid + "R";
+//							itemidpr = "ZY9102CP19R";
+//							if (mname.startsWith("一高线︱")){
+//								addPr = true;
+//							}
+//						}
+//					} else if(mline.endsWith("GX2")) { // 二高线
+//						TRmWorkproc tw = tRmWorkprocService.getById("ZY9201");
+//						if(tw!=null && tw.getName().equalsIgnoreCase("二高线")){
+//							wid = "ZY9201";
+//							itemid = wid+ pid + "R";
+//							itemidpr = "ZY9201CP19R";
+//							if (mname.startsWith("二高线︱")){
+//								addPr = true;
+//							}
+//						}
+//					} else if(mline.endsWith("GX3")) { // 三高线
+//						TRmWorkproc tw = tRmWorkprocService.getById("ZY9103");
+//						if(tw!=null && tw.getName().equalsIgnoreCase("三高线")){
+//							wid = "ZY9103";
+//							itemid = wid+ pid + "R";
+//							itemidpr = "ZY9103CP19R";
+//							if (mname.startsWith("三高线︱")){
+//								addPr = true;
+//							}
+//						}
+//					} else if(mline.endsWith("GX4")) { // 四高线
+//						TRmWorkproc tw = tRmWorkprocService.getById("ZY9203");
+//						if(tw!=null && tw.getName().equalsIgnoreCase("四高线")){
+//							wid = "ZY9203";
+//							itemid = wid+ pid + "R";
+//							itemidpr = "ZY9203CP19R";
+//							if (mname.startsWith("四高线︱")){
+//								addPr = true;
+//							}
+//						}
+//					} else if(mline.endsWith("GX5")) { // 五高线
+//						TRmWorkproc tw = tRmWorkprocService.getById("ZY9204");
+//						if(tw!=null && tw.getName().equalsIgnoreCase("五高线")){
+//							wid = "ZY9204";
+//							itemid = wid+ pid + "R";
+//							itemidpr = "ZY9204CP19R";
+//							if (mname.startsWith("五高线︱")){
+//								addPr = true;
+//							}
+//						}
+//					} else if(mline.endsWith("GL3")) { // 二炼铁2#1280高炉-ZY7202
+//						TRmWorkproc tw = tRmWorkprocService.getById("ZY7202");
+//						if(tw!=null && tw.getName().equalsIgnoreCase("二炼铁2#1280高炉")){
+//							wid = "ZY7202";
+//							itemid = wid + pid + "R";
+//							itemidpr = "ZY7202CP14R";
+//							if (mname.startsWith("二体系︱")){
+//								addPr = true;
+//							}
+//						}
+//					} else if(mline.endsWith("LG1")) { // 一炼钢
+//						TRmWorkproc tw = tRmWorkprocService.getById("ZY8100");
+//						if(tw!=null && tw.getName().equalsIgnoreCase("一炼钢")){
+//							wid = "ZY8100";
+//							itemid = wid+ pid + "R";
+//							itemidpr = "ZY8100CP17R";
+//							if (mname.startsWith("一体系︱")){
+//								addPr = true;
+//							}
+//						}
+//					} else if(mline.endsWith("LG2")) { // 二炼钢
+//						TRmWorkproc tw = tRmWorkprocService.getById("ZY8200");
+//						if(tw!=null && tw.getName().equalsIgnoreCase("二炼钢")){
+//							wid = "ZY8200";
+//							itemid = wid+ pid + "R";
+//							itemidpr = "ZY8200CP17R";
+//							if (mname.startsWith("二体系︱")){
+//								addPr = true;
+//							}
+//						}
+//					}
 					if(!itemid.isEmpty() && !pid.isEmpty()){ // 更新 TRmWorkprocProduct,让其关联IF_MES_EMS_SWAPFILE数据(Mes_prodline、Mes_prodline)
 						twp = tRmWorkprocProductService.getById(itemid);
 						if (twp!=null){
@@ -679,7 +679,7 @@ public class TRmWorkprocProductValueServiceImpl extends BaseServiceImpl<TRmWorkp
     // @Transactional(rollbackFor = Exception.class)
     public void setDate(Date date) {
     	this.synchronousData();
-    	this.synchronousOrderData();
+    	//this.synchronousOrderData();
     	Calendar calendar = Calendar.getInstance();
     	calendar.setTime(date);
         // 获取项目信息-用于每日计算,包括实绩与计划

+ 5 - 0
src/main/java/com/steerinfo/feigen/controller/LgWeightFeigenController.java

@@ -0,0 +1,5 @@
+package com.steerinfo.feigen.controller;
+
+public class LgWeightFeigenController {
+
+}

+ 45 - 0
src/main/java/com/steerinfo/feigen/model/LgWeight.java

@@ -0,0 +1,45 @@
+package com.steerinfo.feigen.model;
+
+import io.swagger.annotations.ApiModelProperty;
+
+import java.math.BigDecimal;
+
+public class LgWeight {
+    @ApiModelProperty(value="主键ID",required=true)
+    private String id;
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id == null ? null : id.trim();
+    }
+    private String type;
+    private BigDecimal weight;
+    private String date;
+
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    public BigDecimal getWeight() {
+        return weight;
+    }
+
+    public void setWeight(BigDecimal weight) {
+        this.weight = weight;
+    }
+
+    public String getDate() {
+        return date;
+    }
+
+    public void setDate(String date) {
+        this.date = date;
+    }
+
+}

+ 18 - 0
src/main/java/com/steerinfo/feigen/service/LgWeightFeigenService.java

@@ -0,0 +1,18 @@
+package com.steerinfo.feigen.service;
+
+import com.steerinfo.feigen.model.LgWeight;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.stereotype.Component;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+
+import java.util.List;
+
+@FeignClient(value = "xt-ems-product",url = "192.168.64.1:8888")
+@Component
+public interface LgWeightFeigenService {
+
+    @GetMapping("v1/lgweight/queryWeightByTime")
+    public List<LgWeight> QueryWeightByTime();
+
+}

+ 170 - 0
src/main/java/com/steerinfo/ftp/uploadfile/controller/UploadFileController.java

@@ -0,0 +1,170 @@
+package com.steerinfo.ftp.uploadfile.controller;
+
+import com.steerinfo.auth.utils.JwtUtil;
+import com.steerinfo.framework.controller.BaseRESTfulController;
+import com.steerinfo.framework.controller.RESTfulResult;
+import com.steerinfo.framework.service.pagehelper.PageList;
+import com.steerinfo.framework.utils.collection.ListUtils;
+import com.steerinfo.ftp.securitytype.mapper.SecurityTypeMapper;
+import com.steerinfo.ftp.securitytype.model.SecurityType;
+import com.steerinfo.ftp.securitytype.service.ISecurityTypeService;
+import com.steerinfo.ftp.uploadfile.model.UploadFile;
+import com.steerinfo.ftp.uploadfile.service.IUploadFileService;
+import com.steerinfo.ftp.uploadfile.utils.FtpFileUtil;
+import com.steerinfo.ftp.uploadfile.utils.IDutils;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.ibatis.annotations.Param;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.servlet.http.HttpServletRequest;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.text.SimpleDateFormat;
+import java.util.*;
+import java.math.BigDecimal;
+
+/**
+ * UploadFile RESTful接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-07-24 04:06
+ * 类描述
+ * 修订历史:
+ * 日期:2021-07-24
+ * 作者:generator
+ * 参考:
+ * 描述:UploadFile RESTful接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@RestController
+@RequestMapping("/${api.version}/uploadfiles")
+public class UploadFileController extends BaseRESTfulController {
+
+    @Autowired
+    IUploadFileService uploadFileService;
+    @Autowired
+    private FtpFileUtil ftpFileUtil;
+
+    @Autowired
+    private SecurityTypeMapper securityTypeMapper;
+    @ApiOperation(value="获取列表", notes="分页查询")
+    @ApiImplicitParams({
+        @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+        @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
+    })
+    //@RequiresPermissions("uploadfile:view")
+    @GetMapping(value = "/")
+    public RESTfulResult list(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
+        PageList<UploadFile> list = uploadFileService.queryForPage(parmas, pageNum, pageSize);
+        return success(list);
+    }
+
+    @ApiOperation(value="获取列表", notes="分页模糊查询")
+    @ApiImplicitParams({
+        @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+        @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
+    })
+    //@RequiresPermissions("uploadfile:view")
+    @GetMapping(value = "/like/")
+    public RESTfulResult listLike(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
+        PageList<UploadFile> list = uploadFileService.queryLikeForPage(parmas, pageNum, pageSize);
+        return success(list);
+    }
+    
+    @ApiOperation(value="创建", notes="根据UploadFile对象创建")
+    @ApiImplicitParam(name = "uploadFile", value = "详细实体uploadFile", required = true, dataType = "UploadFile")
+    //@RequiresPermissions("uploadfile:create")
+    @PostMapping(value = "/")
+    public RESTfulResult add(@ModelAttribute UploadFile model){
+        UploadFile uploadFile = uploadFileService.add(model);
+        return success(uploadFile);
+    }
+
+    @ApiOperation(value="获取详细信息", notes="根据url的id来获取详细信息")
+    @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String")
+    //@RequiresPermissions("uploadfile:view")
+    @GetMapping(value = "/{id}")
+    public RESTfulResult get(@PathVariable String id){
+        UploadFile uploadFile = uploadFileService.getById(id);
+        return success(uploadFile);
+    }
+
+    @ApiOperation(value="更新详细信息", notes="根据url的id来指定更新对象,并根据传过来的uploadFile信息来更新详细信息")
+    @ApiImplicitParams({
+        @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String"),
+        @ApiImplicitParam(name = "uploadFile", value = "详细实体uploadFile", required = true, dataType = "UploadFile")
+    })
+    //@RequiresPermissions("uploadfile:update")
+    @PutMapping(value = "/{id}", produces  = "application/json;charset=UTF-8")
+    public RESTfulResult update(@PathVariable String id, @RequestBody UploadFile model){
+        model.setId(id);
+        UploadFile uploadFile = uploadFileService.modify(model);
+        return success(uploadFile);
+    }
+
+    @ApiOperation(value="删除", notes="根据url的id来指定删除对象")
+    @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String")
+    //@RequiresPermissions("uploadfile:delete")
+    @DeleteMapping(value = "/{id}")//String
+    public RESTfulResult delete(@PathVariable String id){
+    	List<String> list = Arrays.asList(id.split(","));
+    	if(ListUtils.isNotEmpty(list)) {
+	    	List<String> ids = ListUtils.convertList(list);
+			  uploadFileService.delete(ids);
+    	}
+      return success();
+    }
+    @PostMapping("/file")
+    public RESTfulResult fileUpload( @ModelAttribute MultipartFile file, String type){
+        try {
+            if(null == type || "".equals(type)){
+                return failed(null,"请选择左边的文件目录");
+            }
+            SecurityType securityType = securityTypeMapper.selectByPrimaryKey(type);
+            String userId = JwtUtil.getUseridByToken();
+            SimpleDateFormat simpleDateFormat = new SimpleDateFormat("/yyyy/MM/dd");
+            String oldName = file.getOriginalFilename();
+            String newName = IDutils.getImageName();
+            newName = newName + oldName.substring(oldName.lastIndexOf("."));
+            String filePath = simpleDateFormat.format(new Date());
+            InputStream inputStream = file.getInputStream();
+             boolean result = ftpFileUtil.uploadToFtp(inputStream,securityType.getSecurityUploadUrl()+filePath,newName,false);
+            // boolean result = ftpFileUtil.uploadFile(filePath,newName,ftpFileUtil.getFTP_BASEPATH(),inputStream);
+            if(result){
+                UploadFile uploadFile = new UploadFile();
+                uploadFile.setFileName(oldName);
+                uploadFile.setFileUrl(securityType.getSecurityUploadUrl()+filePath+newName);
+                uploadFile.setUploadTime(new Date());
+                uploadFile.setCreateMan(userId);
+                uploadFile.setType(securityType.getId());
+                uploadFile.setCreateTime(new Date());
+                uploadFileService.add(uploadFile);
+            }else {
+                return  failed(null,"上传文件失败");
+            }
+        }catch (Exception e){
+            e.getMessage();
+        }
+           return success();
+    }
+
+    @GetMapping("/getfile")
+    public InputStream downloadFile (@Param("filename") String filename)throws IOException {
+        InputStream inputStream = ftpFileUtil.downloadFile(filename);
+        return  inputStream;
+    }
+
+    @GetMapping("/getIdAndName")
+    public RESTfulResult getIdAndName(){
+        Set<UploadFile> idAndName = uploadFileService.getIdAndName();
+        return success(idAndName);
+    }
+
+}

+ 13 - 0
src/main/java/com/steerinfo/ftp/uploadfile/mapper/UploadFileMapper.java

@@ -0,0 +1,13 @@
+package com.steerinfo.ftp.uploadfile.mapper;
+
+import com.steerinfo.framework.mapper.IBaseMapper;
+import com.steerinfo.ftp.uploadfile.model.UploadFile;
+import java.math.*;
+import java.util.Set;
+
+import org.apache.ibatis.annotations.Mapper;
+
+@Mapper
+public interface UploadFileMapper extends IBaseMapper<UploadFile, String> {
+    Set<UploadFile> getIdAndName ();
+}

+ 319 - 0
src/main/java/com/steerinfo/ftp/uploadfile/mapper/UploadFileMapper.xml

@@ -0,0 +1,319 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.steerinfo.ftp.uploadfile.mapper.UploadFileMapper">
+  <resultMap id="BaseResultMap" type="com.steerinfo.ftp.uploadfile.model.UploadFile">
+    <id column="ID" jdbcType="VARCHAR" property="id" />
+    <result column="FILE_NAME" jdbcType="VARCHAR" property="fileName" />
+    <result column="FILE_URL" jdbcType="VARCHAR" property="fileUrl" />
+    <result column="TYPE" jdbcType="VARCHAR" property="type" />
+    <result column="UPLOAD_TIME" jdbcType="TIMESTAMP" property="uploadTime" />
+    <result column="CREATE_MAN" jdbcType="VARCHAR" property="createMan" />
+    <result column="CREATE_TIME" jdbcType="TIMESTAMP" property="createTime" />
+    <result column="UPDATE_MAN" jdbcType="VARCHAR" property="updateMan" />
+    <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
+  </resultMap>
+  <sql id="columns">
+    ID, FILE_NAME, FILE_URL, TYPE, UPLOAD_TIME, CREATE_MAN, CREATE_TIME, UPDATE_MAN, 
+    UPDATE_TIME
+  </sql>
+  <sql id="columns_alias">
+    t.ID, t.FILE_NAME, t.FILE_URL, t.TYPE, t.UPLOAD_TIME, t.CREATE_MAN, t.CREATE_TIME, 
+    t.UPDATE_MAN, t.UPDATE_TIME
+  </sql>
+  <sql id="select">
+    SELECT <include refid="columns"/> FROM UPLOAD_FILE
+  </sql>
+  <sql id="select_alias">
+    SELECT <include refid="columns_alias"/> FROM UPLOAD_FILE t
+  </sql>
+  <sql id="where">
+    <where> 
+      <if test="id != null and id != ''">
+        and ID = #{id}
+      </if>
+      <if test="fileName != null and fileName != ''">
+        and FILE_NAME = #{fileName}
+      </if>
+      <if test="fileUrl != null and fileUrl != ''">
+        and FILE_URL = #{fileUrl}
+      </if>
+      <if test="type != null and type != ''">
+        and TYPE = #{type}
+      </if>
+      <if test="uploadTime != null">
+        and TO_CHAR(UPLOAD_TIME,'yyyy-MM-dd') = #{uploadTime}
+      </if>
+      <if test="createMan != null and createMan != ''">
+        and CREATE_MAN = #{createMan}
+      </if>
+      <if test="createTime != null">
+        and TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = #{createTime}
+      </if>
+      <if test="updateMan != null and updateMan != ''">
+        and UPDATE_MAN = #{updateMan}
+      </if>
+      <if test="updateTime != null">
+        and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
+      </if>
+    </where>
+  </sql>
+  <sql id="whereLike">
+    <where> 
+      <if test="id != null and id != ''">
+        and ID LIKE '%${id}%'
+      </if>
+      <if test="fileName != null and fileName != ''">
+        and FILE_NAME LIKE '%${fileName}%'
+      </if>
+      <if test="fileUrl != null and fileUrl != ''">
+        and FILE_URL LIKE '%${fileUrl}%'
+      </if>
+      <if test="type != null and type != ''">
+        and TYPE LIKE '%${type}%'
+      </if>
+      <if test="uploadTime != null">
+        and TO_CHAR(UPLOAD_TIME,'yyyy-MM-dd') = #{uploadTime}
+      </if>
+      <if test="createMan != null and createMan != ''">
+        and CREATE_MAN LIKE '%${createMan}%'
+      </if>
+      <if test="createTime != null">
+        and TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = #{createTime}
+      </if>
+      <if test="updateMan != null and updateMan != ''">
+        and UPDATE_MAN LIKE '%${updateMan}%'
+      </if>
+      <if test="updateTime != null">
+        and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
+      </if>
+    </where>
+  </sql>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
+    delete from UPLOAD_FILE
+    where ID = #{id,jdbcType=VARCHAR}
+  </delete>
+  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
+    delete from UPLOAD_FILE
+    where 1!=1 
+      <if test="fileName != null and fileName != ''">
+        or FILE_NAME = #{fileName}
+      </if>
+      <if test="fileUrl != null and fileUrl != ''">
+        or FILE_URL = #{fileUrl}
+      </if>
+      <if test="type != null and type != ''">
+        or TYPE = #{type}
+      </if>
+      <if test="uploadTime != null">
+        or TO_CHAR(UPLOAD_TIME,'yyyy-MM-dd') = '#{uploadTime}'
+      </if>
+      <if test="createMan != null and createMan != ''">
+        or CREATE_MAN = #{createMan}
+      </if>
+      <if test="createTime != null">
+        or TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = '#{createTime}'
+      </if>
+      <if test="updateMan != null and updateMan != ''">
+        or UPDATE_MAN = #{updateMan}
+      </if>
+      <if test="updateTime != null">
+        or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
+      </if>
+  </delete>
+  <insert id="insert" parameterType="com.steerinfo.ftp.uploadfile.model.UploadFile">
+    insert into UPLOAD_FILE (ID, FILE_NAME, FILE_URL, 
+      TYPE, UPLOAD_TIME, CREATE_MAN, 
+      CREATE_TIME, UPDATE_MAN, UPDATE_TIME
+      )
+    values (#{id,jdbcType=VARCHAR}, #{fileName,jdbcType=VARCHAR}, #{fileUrl,jdbcType=VARCHAR}, 
+      #{type,jdbcType=VARCHAR}, #{uploadTime,jdbcType=TIMESTAMP}, #{createMan,jdbcType=VARCHAR}, 
+      #{createTime,jdbcType=TIMESTAMP}, #{updateMan,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}
+      )
+  </insert>
+  <insert id="insertSelective" parameterType="com.steerinfo.ftp.uploadfile.model.UploadFile">
+    insert into UPLOAD_FILE
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        ID,
+      </if>
+      <if test="fileName != null">
+        FILE_NAME,
+      </if>
+      <if test="fileUrl != null">
+        FILE_URL,
+      </if>
+      <if test="type != null">
+        TYPE,
+      </if>
+      <if test="uploadTime != null">
+        UPLOAD_TIME,
+      </if>
+      <if test="createMan != null">
+        CREATE_MAN,
+      </if>
+      <if test="createTime != null">
+        CREATE_TIME,
+      </if>
+      <if test="updateMan != null">
+        UPDATE_MAN,
+      </if>
+      <if test="updateTime != null">
+        UPDATE_TIME,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=VARCHAR},
+      </if>
+      <if test="fileName != null">
+        #{fileName,jdbcType=VARCHAR},
+      </if>
+      <if test="fileUrl != null">
+        #{fileUrl,jdbcType=VARCHAR},
+      </if>
+      <if test="type != null">
+        #{type,jdbcType=VARCHAR},
+      </if>
+      <if test="uploadTime != null">
+        #{uploadTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="createMan != null">
+        #{createMan,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null">
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateMan != null">
+        #{updateMan,jdbcType=VARCHAR},
+      </if>
+      <if test="updateTime != null">
+        #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKey" parameterType="com.steerinfo.ftp.uploadfile.model.UploadFile">
+    update UPLOAD_FILE
+    set FILE_NAME = #{fileName,jdbcType=VARCHAR},
+      FILE_URL = #{fileUrl,jdbcType=VARCHAR},
+      TYPE = #{type,jdbcType=VARCHAR},
+      UPLOAD_TIME = #{uploadTime,jdbcType=TIMESTAMP},
+      CREATE_MAN = #{createMan,jdbcType=VARCHAR},
+      CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
+      UPDATE_MAN = #{updateMan,jdbcType=VARCHAR},
+      UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP}
+    where ID = #{id,jdbcType=VARCHAR}
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.ftp.uploadfile.model.UploadFile">
+    update UPLOAD_FILE
+    <set>
+      <if test="fileName != null">
+        FILE_NAME = #{fileName,jdbcType=VARCHAR},
+      </if>
+      <if test="fileUrl != null">
+        FILE_URL = #{fileUrl,jdbcType=VARCHAR},
+      </if>
+      <if test="type != null">
+        TYPE = #{type,jdbcType=VARCHAR},
+      </if>
+      <if test="uploadTime != null">
+        UPLOAD_TIME = #{uploadTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="createMan != null">
+        CREATE_MAN = #{createMan,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null">
+        CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateMan != null">
+        UPDATE_MAN = #{updateMan,jdbcType=VARCHAR},
+      </if>
+      <if test="updateTime != null">
+        UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    where ID = #{id,jdbcType=VARCHAR}
+  </update>
+  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
+    <include refid="select"/>
+    where ID = #{id,jdbcType=VARCHAR}
+  </select>
+  <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    <include refid="select"/>
+    <include refid="where"/>
+  </select>
+  <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    <include refid="select"/>
+    <include refid="whereLike"/>
+  </select>
+  <insert id="batchInsert" parameterType="java.util.List">
+    insert into UPLOAD_FILE 
+      (ID, 
+      FILE_NAME, FILE_URL, TYPE, 
+      UPLOAD_TIME, CREATE_MAN, CREATE_TIME, 
+      UPDATE_MAN, UPDATE_TIME)
+    ( <foreach collection="list" item="item" separator="union all"> 
+   select  
+      #{item.id,jdbcType=VARCHAR}, 
+      #{item.fileName,jdbcType=VARCHAR}, #{item.fileUrl,jdbcType=VARCHAR}, #{item.type,jdbcType=VARCHAR}, 
+      #{item.uploadTime,jdbcType=TIMESTAMP}, #{item.createMan,jdbcType=VARCHAR}, #{item.createTime,jdbcType=TIMESTAMP}, 
+      #{item.updateMan,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP} from dual  
+   </foreach> )
+  </insert>
+  <update id="batchUpdate" parameterType="java.util.List">
+     update UPLOAD_FILE
+     set
+       ID=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=VARCHAR} then #{item.id,jdbcType=VARCHAR}
+       </foreach>
+       ,FILE_NAME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=VARCHAR} then #{item.fileName,jdbcType=VARCHAR}
+       </foreach>
+       ,FILE_URL=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=VARCHAR} then #{item.fileUrl,jdbcType=VARCHAR}
+       </foreach>
+       ,TYPE=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=VARCHAR} then #{item.type,jdbcType=VARCHAR}
+       </foreach>
+       ,UPLOAD_TIME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=VARCHAR} then #{item.uploadTime,jdbcType=TIMESTAMP}
+       </foreach>
+       ,CREATE_MAN=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=VARCHAR} then #{item.createMan,jdbcType=VARCHAR}
+       </foreach>
+       ,CREATE_TIME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=VARCHAR} then #{item.createTime,jdbcType=TIMESTAMP}
+       </foreach>
+       ,UPDATE_MAN=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=VARCHAR} then #{item.updateMan,jdbcType=VARCHAR}
+       </foreach>
+       ,UPDATE_TIME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=VARCHAR} then #{item.updateTime,jdbcType=TIMESTAMP}
+       </foreach>
+     where ID in 
+     <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
+    #{item.id,jdbcType=VARCHAR}
+     </foreach> 
+  </update>
+  <delete id="batchDelete" parameterType="java.util.List">
+    delete from UPLOAD_FILE
+    where ID in 
+    <foreach collection="list" item="id" open="(" close=")" separator=",">
+      #{id}
+    </foreach>
+  </delete>
+  <!-- 友情提示!!!-->
+  <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
+  <select id="getIdAndName" resultMap="BaseResultMap">
+    select distinct  ID, FILE_NAME  FROM  UPLOAD_FILE
+  </select>
+  
+</mapper>

+ 169 - 0
src/main/java/com/steerinfo/ftp/uploadfile/model/UploadFile.java

@@ -0,0 +1,169 @@
+package com.steerinfo.ftp.uploadfile.model;
+
+import com.steerinfo.framework.model.IBasePO;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.util.Date;
+
+@ApiModel(value="文件上传")
+public class UploadFile implements IBasePO<String> {
+    /**
+     * 主键ID(ID,VARCHAR,100)
+     */
+    @ApiModelProperty(value="主键ID",required=true)
+    private String id;
+
+    /**
+     * 上传人(FILE_NAME,VARCHAR,100)
+     */
+    @ApiModelProperty(value="文件名称",required=true)
+    private String fileName;
+
+    /**
+     * 上传路径(FILE_URL,VARCHAR,200)
+     */
+    @ApiModelProperty(value="上传路径",required=true)
+    private String fileUrl;
+
+    /**
+     * 所属类别(TYPE,VARCHAR,50)
+     */
+    @ApiModelProperty(value="所属类别",required=false)
+    private String type;
+
+    /**
+     * 上传时间(UPLOAD_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="上传时间",required=false)
+    private Date uploadTime;
+
+    /**
+     * 上传人(CREATE_MAN,VARCHAR,20)
+     */
+    @ApiModelProperty(value="上传人",required=false)
+    private String createMan;
+
+    /**
+     * 创建人(CREATE_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="创建人",required=false)
+    private Date createTime;
+
+    /**
+     * 修改人(UPDATE_MAN,VARCHAR,20)
+     */
+    @ApiModelProperty(value="修改人",required=false)
+    private String updateMan;
+
+    /**
+     * 修改时间(UPDATE_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="修改时间",required=false)
+    private Date updateTime;
+
+    private transient MultipartFile multipartFile;
+
+    public MultipartFile getMultipartFile() {
+        return multipartFile;
+    }
+
+    public void setMultipartFile(MultipartFile multipartFile) {
+        this.multipartFile = multipartFile;
+    }
+
+    private static final long serialVersionUID = 1L;
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id == null ? null : id.trim();
+    }
+
+    public String getFileName() {
+        return fileName;
+    }
+
+    public void setFileName(String fileName) {
+        this.fileName = fileName == null ? null : fileName.trim();
+    }
+
+    public String getFileUrl() {
+        return fileUrl;
+    }
+
+    public void setFileUrl(String fileUrl) {
+        this.fileUrl = fileUrl == null ? null : fileUrl.trim();
+    }
+
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type == null ? null : type.trim();
+    }
+
+    public Date getUploadTime() {
+        return uploadTime;
+    }
+
+    public void setUploadTime(Date uploadTime) {
+        this.uploadTime = uploadTime;
+    }
+
+    public String getCreateMan() {
+        return createMan;
+    }
+
+    public void setCreateMan(String createMan) {
+        this.createMan = createMan == null ? null : createMan.trim();
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public String getUpdateMan() {
+        return updateMan;
+    }
+
+    public void setUpdateMan(String updateMan) {
+        this.updateMan = updateMan == null ? null : updateMan.trim();
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", id=").append(id);
+        sb.append(", fileName=").append(fileName);
+        sb.append(", fileUrl=").append(fileUrl);
+        sb.append(", type=").append(type);
+        sb.append(", uploadTime=").append(uploadTime);
+        sb.append(", createMan=").append(createMan);
+        sb.append(", createTime=").append(createTime);
+        sb.append(", updateMan=").append(updateMan);
+        sb.append(", updateTime=").append(updateTime);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 24 - 0
src/main/java/com/steerinfo/ftp/uploadfile/service/IUploadFileService.java

@@ -0,0 +1,24 @@
+package com.steerinfo.ftp.uploadfile.service;
+
+import com.steerinfo.framework.service.IBaseService;
+import com.steerinfo.ftp.uploadfile.model.UploadFile;
+import java.util.Date;
+import java.math.BigDecimal;
+import java.util.Set;
+
+/**
+ * UploadFile服务接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-07-24 04:06
+ * 类描述
+ * 修订历史:
+ * 日期:2021-07-24
+ * 作者:generator
+ * 参考:
+ * 描述:UploadFile服务接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+public interface IUploadFileService extends IBaseService<UploadFile, String>{
+    Set<UploadFile> getIdAndName ();
+}

+ 42 - 0
src/main/java/com/steerinfo/ftp/uploadfile/service/impl/UploadFileServiceImpl.java

@@ -0,0 +1,42 @@
+package com.steerinfo.ftp.uploadfile.service.impl;
+
+import com.steerinfo.framework.mapper.IBaseMapper;
+import com.steerinfo.framework.service.impl.BaseServiceImpl;
+import com.steerinfo.ftp.uploadfile.model.UploadFile;
+import com.steerinfo.ftp.uploadfile.mapper.UploadFileMapper;
+import com.steerinfo.ftp.uploadfile.service.IUploadFileService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import java.util.Date;
+import java.math.BigDecimal;
+import java.util.Set;
+
+/**
+ * UploadFile服务实现:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-07-24 04:06
+ * 类描述
+ * 修订历史:
+ * 日期:2021-07-24
+ * 作者:generator
+ * 参考:
+ * 描述:UploadFile服务实现
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@Service(value = "uploadFileService")
+public class UploadFileServiceImpl extends BaseServiceImpl<UploadFile, String> implements IUploadFileService {
+
+    @Autowired
+    private UploadFileMapper uploadFileMapper;
+
+    @Override
+    protected IBaseMapper<UploadFile, String> getMapper() {
+        return uploadFileMapper;
+    }
+
+    @Override
+    public Set<UploadFile> getIdAndName() {
+        return uploadFileMapper.getIdAndName();
+    }
+}

+ 2 - 13
src/main/java/com/steerinfo/ftp/uploadfile/utils/FtpFileUtil.java

@@ -23,17 +23,6 @@ public class FtpFileUtil {
     //密码
     @Value("${custom.config.file-ftp-password}")
     String FTP_PASSWORD;
-    //图片路径
-    @Value("${custom.config.file-savepath}")
-    String FTP_BASEPATH;
-
-    public String getFTP_BASEPATH() {
-        return FTP_BASEPATH;
-    }
-
-    public void setFTP_BASEPATH(String FTP_BASEPATH) {
-        this.FTP_BASEPATH = FTP_BASEPATH;
-    }
 
     private FTPClient ftpClient = new FTPClient();
       //上传
@@ -111,9 +100,9 @@ public class FtpFileUtil {
                 throw new IOException("failed to connect to the FTP Server:" + FTP_ADDRESS);
             }
             //进入文件目录
-            boolean changeWork = ftpClient.changeWorkingDirectory( FTP_BASEPATH+ filePath);
+            boolean changeWork = ftpClient.changeWorkingDirectory( filePath);
             if(!changeWork){
-                if(!createDirectory(FTP_BASEPATH+filePath)){
+                if(!createDirectory(filePath)){
                     return result;
                 }
             }

+ 0 - 1
src/main/resources/application.properties

@@ -96,7 +96,6 @@ custom.config.file-server.ip= 192.168.3.49
 custom.config.file-server.port= 21
 custom.config.file-ftp-user= ATEMSFTP
 custom.config.file-ftp-password= 123456
-custom.config.file-savepath= /ems/file
 
 web.upload-path=/static/
 genxml.pth=/genxml/

+ 1 - 1
src/main/resources/bootstrap.yml

@@ -37,7 +37,7 @@ eureka:
 #禁止调用eureka client获取注册列表信息
 ribbon:
   eureka:
-    enabled: false
+    enabled: true
 #新版配置,否则后面dashboard无法找到hystrix.stream
 management:
   endpoints: