数据对接,先判断港股是否存在,存在拿港股数据过来,不存在则给港股推送过去
							parent
							
								
									265cb308a9
								
							
						
					
					
						commit
						09cd29a97a
					
				| 
						 | 
				
			
			@ -10,6 +10,7 @@ import com.zcloud.util.*;
 | 
			
		|||
import org.apache.shiro.authz.annotation.RequiresPermissions;
 | 
			
		||||
import org.apache.shiro.crypto.hash.SimpleHash;
 | 
			
		||||
import org.springframework.beans.factory.annotation.Autowired;
 | 
			
		||||
import org.springframework.beans.factory.annotation.Value;
 | 
			
		||||
import org.springframework.stereotype.Controller;
 | 
			
		||||
import org.springframework.web.bind.annotation.RequestMapping;
 | 
			
		||||
import org.springframework.web.bind.annotation.ResponseBody;
 | 
			
		||||
| 
						 | 
				
			
			@ -27,6 +28,8 @@ import java.util.*;
 | 
			
		|||
@RequestMapping("/personnelmanagement")
 | 
			
		||||
public class PersonnelManagementController extends BaseController {
 | 
			
		||||
 | 
			
		||||
    @Value("${tongbu.api.url}")
 | 
			
		||||
    private String tongBuUrl;
 | 
			
		||||
    @Autowired
 | 
			
		||||
    private PersonnelManagementService personnelmanagementService;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -44,6 +47,8 @@ public class PersonnelManagementController extends BaseController {
 | 
			
		|||
        Map<String, Object> map = new HashMap<String, Object>();
 | 
			
		||||
        String errInfo = "success";
 | 
			
		||||
        PageData pd = this.getPageData();
 | 
			
		||||
        Map result = HttpClientService.doPost(tongBuUrl + "/api/personnelmanagement/findByName", pd);
 | 
			
		||||
        if (result.get("pd")==null){
 | 
			
		||||
            pd.put("PERSONNELMANAGEMENT_ID", this.get32UUID());    //主键
 | 
			
		||||
            pd.put("CREATOR", Jurisdiction.getUSER_ID());    //添加人
 | 
			
		||||
            pd.put("CREATTIME", DateUtil.date2Str(new Date()));    //添加时间
 | 
			
		||||
| 
						 | 
				
			
			@ -54,6 +59,14 @@ public class PersonnelManagementController extends BaseController {
 | 
			
		|||
            personnelmanagementService.save(pd);
 | 
			
		||||
            map.put("result", errInfo);
 | 
			
		||||
            map.put("dockData", JSON.toJSONString(pd));
 | 
			
		||||
        }else {
 | 
			
		||||
            HashMap hashMap = (HashMap)result.get("pd");
 | 
			
		||||
            PageData pageData = new PageData();
 | 
			
		||||
            pageData.putAll(hashMap);
 | 
			
		||||
            pd = pageData;
 | 
			
		||||
            personnelmanagementService.save(pd);
 | 
			
		||||
            map.put("result", errInfo);
 | 
			
		||||
        }
 | 
			
		||||
        return map;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -10,6 +10,7 @@ import com.zcloud.service.system.DictionariesService;
 | 
			
		|||
import com.zcloud.util.*;
 | 
			
		||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
 | 
			
		||||
import org.springframework.beans.factory.annotation.Autowired;
 | 
			
		||||
import org.springframework.beans.factory.annotation.Value;
 | 
			
		||||
import org.springframework.stereotype.Controller;
 | 
			
		||||
import org.springframework.web.bind.annotation.RequestMapping;
 | 
			
		||||
import org.springframework.web.bind.annotation.RequestParam;
 | 
			
		||||
| 
						 | 
				
			
			@ -28,7 +29,8 @@ import java.util.*;
 | 
			
		|||
@Controller
 | 
			
		||||
@RequestMapping("/units")
 | 
			
		||||
public class UnitsController extends BaseController {
 | 
			
		||||
 | 
			
		||||
	@Value("${tongbu.api.url}")
 | 
			
		||||
	private String tongBuUrl;
 | 
			
		||||
	@Autowired
 | 
			
		||||
	private UnitsService unitsService;
 | 
			
		||||
	@Autowired
 | 
			
		||||
| 
						 | 
				
			
			@ -55,6 +57,8 @@ public class UnitsController extends BaseController {
 | 
			
		|||
		pd.put("OPERATOR", Jurisdiction.getUSER_ID());    //修改人
 | 
			
		||||
		pd.put("OPERATTIME", DateUtil.date2Str(new Date()));    //修改时间
 | 
			
		||||
		pd.put("ISDELETE", "0");    //是否删除
 | 
			
		||||
		Map result = HttpClientService.doPost(tongBuUrl + "/api/units/findByName", pd);
 | 
			
		||||
		if (result.get("pd")==null) {
 | 
			
		||||
			if (null != file && !file.isEmpty()) {
 | 
			
		||||
				String suffixName = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1).toLowerCase();
 | 
			
		||||
				if (!"pdf".equals(suffixName) && !"jpg".equals(suffixName) && !"jpeg".equals(suffixName) && !"png".equals(suffixName) && !"mp4".equals(suffixName)) {
 | 
			
		||||
| 
						 | 
				
			
			@ -74,6 +78,14 @@ public class UnitsController extends BaseController {
 | 
			
		|||
			unitsService.save(pd);
 | 
			
		||||
			map.put("dockData", JSON.toJSONString(pd));
 | 
			
		||||
			map.put("result", errInfo);
 | 
			
		||||
		}else {
 | 
			
		||||
			HashMap hashMap = (HashMap)result.get("pd");
 | 
			
		||||
			PageData pageData = new PageData();
 | 
			
		||||
			pageData.putAll(hashMap);
 | 
			
		||||
			pd = pageData;
 | 
			
		||||
			unitsService.save(pd);
 | 
			
		||||
			map.put("result", errInfo);
 | 
			
		||||
		}
 | 
			
		||||
		return map;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -7,10 +7,12 @@ import com.zcloud.entity.Page;
 | 
			
		|||
import com.zcloud.entity.PageData;
 | 
			
		||||
import com.zcloud.service.keyProjects.VideoResourcesService;
 | 
			
		||||
import com.zcloud.util.DateUtil;
 | 
			
		||||
import com.zcloud.util.HttpClientService;
 | 
			
		||||
import com.zcloud.util.Jurisdiction;
 | 
			
		||||
import com.zcloud.util.Tools;
 | 
			
		||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
 | 
			
		||||
import org.springframework.beans.factory.annotation.Autowired;
 | 
			
		||||
import org.springframework.beans.factory.annotation.Value;
 | 
			
		||||
import org.springframework.stereotype.Controller;
 | 
			
		||||
import org.springframework.web.bind.annotation.RequestMapping;
 | 
			
		||||
import org.springframework.web.bind.annotation.ResponseBody;
 | 
			
		||||
| 
						 | 
				
			
			@ -30,6 +32,8 @@ import java.util.Map;
 | 
			
		|||
@RequestMapping("/videoResources")
 | 
			
		||||
public class VideoResourcesController extends BaseController {
 | 
			
		||||
 | 
			
		||||
    @Value("${tongbu.api.url}")
 | 
			
		||||
    private String tongBuUrl;
 | 
			
		||||
    @Autowired
 | 
			
		||||
    private VideoResourcesService videoResourcesService;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -47,6 +51,8 @@ public class VideoResourcesController extends BaseController {
 | 
			
		|||
        Map<String, Object> map = new HashMap<String, Object>();
 | 
			
		||||
        String errInfo = "success";
 | 
			
		||||
        PageData pd = this.getPageData();
 | 
			
		||||
        Map result = HttpClientService.doPost(tongBuUrl + "/api/videoResources/findByCode", pd);
 | 
			
		||||
        if (result.get("pd")==null){
 | 
			
		||||
            pd.put("VIDEO_RESOURCES_ID", this.get32UUID());    //主键
 | 
			
		||||
            pd.put("CREATTIME", DateUtil.date2Str(new Date()));    //操作日期
 | 
			
		||||
            pd.put("OPERATTIME", DateUtil.date2Str(new Date()));    //操作日期
 | 
			
		||||
| 
						 | 
				
			
			@ -57,6 +63,15 @@ public class VideoResourcesController extends BaseController {
 | 
			
		|||
            videoResourcesService.save(pd);
 | 
			
		||||
            map.put("dockData", JSON.toJSONString(pd));
 | 
			
		||||
            map.put("result", errInfo);
 | 
			
		||||
        }else {
 | 
			
		||||
            HashMap hashMap = (HashMap)result.get("pd");
 | 
			
		||||
            PageData pageData = new PageData();
 | 
			
		||||
            pageData.putAll(hashMap);
 | 
			
		||||
            pd = pageData;
 | 
			
		||||
            pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
 | 
			
		||||
            videoResourcesService.save(pd);
 | 
			
		||||
            map.put("result", errInfo);
 | 
			
		||||
        }
 | 
			
		||||
        return map;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,13 +1,12 @@
 | 
			
		|||
datasource.no1.driver-class-name: com.mysql.cj.jdbc.Driver
 | 
			
		||||
datasource.no1.url=jdbc:mysql://192.168.0.18:3306/qa-cmt-prevention1?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=utf-8
 | 
			
		||||
datasource.no1.url=jdbc:mysql://39.101.130.96:33068/qa-cmt-prevention?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=utf-8
 | 
			
		||||
datasource.no1.username=root
 | 
			
		||||
datasource.no1.password=root
 | 
			
		||||
 | 
			
		||||
datasource.no1.password=Mysql@zcloud88888
 | 
			
		||||
 | 
			
		||||
datasource.no2.driver-class-name: com.mysql.cj.jdbc.Driver
 | 
			
		||||
datasource.no2.url=jdbc:mysql://192.168.0.18:3306/qa-cmt-regulatory1?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=utf-8
 | 
			
		||||
datasource.no2.url=jdbc:mysql://39.101.130.96:33068/qa-cmt-regulatory?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=utf-8
 | 
			
		||||
datasource.no2.username=root
 | 
			
		||||
datasource.no2.password=root
 | 
			
		||||
datasource.no2.password=Mysql@zcloud88888
 | 
			
		||||
 | 
			
		||||
datasource.no3.driver-class-name: oracle.jdbc.driver.OracleDriver
 | 
			
		||||
datasource.no3.url=jdbc:oracle:thin:@172.16.11.75:1521:orcl
 | 
			
		||||
| 
						 | 
				
			
			@ -60,6 +59,8 @@ spring.main.banner-mode=off
 | 
			
		|||
preventionxgf.api.url=http://192.168.0.31:8992/qa-prevention-xgf/
 | 
			
		||||
# \u6E2F\u52A1\u5C40\u76D1\u7BA1\u7AEF
 | 
			
		||||
qa-regulatory-gwj.api.url=http://192.168.0.31:8992/qa-regulatory-gwj/
 | 
			
		||||
# tongbu????
 | 
			
		||||
tongbu.api.url=http://192.168.0.247:8094/
 | 
			
		||||
 | 
			
		||||
#preventionxgf.api.url=https://qgxgf.qhdsafety.com/qa-prevention-xgf/
 | 
			
		||||
#qa-regulatory-gwj.api.url=https://qgjg.qhdsafety.com/qa-regulatory-gwj/
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue