数据对接,先判断港股是否存在,存在拿港股数据过来,不存在则给港股推送过去
parent
265cb308a9
commit
09cd29a97a
|
@ -10,6 +10,7 @@ import com.zcloud.util.*;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
import org.apache.shiro.crypto.hash.SimpleHash;
|
import org.apache.shiro.crypto.hash.SimpleHash;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.ResponseBody;
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
|
@ -27,6 +28,8 @@ import java.util.*;
|
||||||
@RequestMapping("/personnelmanagement")
|
@RequestMapping("/personnelmanagement")
|
||||||
public class PersonnelManagementController extends BaseController {
|
public class PersonnelManagementController extends BaseController {
|
||||||
|
|
||||||
|
@Value("${tongbu.api.url}")
|
||||||
|
private String tongBuUrl;
|
||||||
@Autowired
|
@Autowired
|
||||||
private PersonnelManagementService personnelmanagementService;
|
private PersonnelManagementService personnelmanagementService;
|
||||||
|
|
||||||
|
@ -44,16 +47,26 @@ public class PersonnelManagementController extends BaseController {
|
||||||
Map<String, Object> map = new HashMap<String, Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
PageData pd = this.getPageData();
|
PageData pd = this.getPageData();
|
||||||
pd.put("PERSONNELMANAGEMENT_ID", this.get32UUID()); //主键
|
Map result = HttpClientService.doPost(tongBuUrl + "/api/personnelmanagement/findByName", pd);
|
||||||
pd.put("CREATOR", Jurisdiction.getUSER_ID()); //添加人
|
if (result.get("pd")==null){
|
||||||
pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间
|
pd.put("PERSONNELMANAGEMENT_ID", this.get32UUID()); //主键
|
||||||
pd.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人
|
pd.put("CREATOR", Jurisdiction.getUSER_ID()); //添加人
|
||||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间
|
||||||
pd.put("ISDELETE", "0"); //是否删除
|
pd.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人
|
||||||
pd.put("PASSWORD", new SimpleHash("SHA-1", pd.getString("PHONENUM"), Const.DEFAULT_PASSWORD).toString());
|
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||||
personnelmanagementService.save(pd);
|
pd.put("ISDELETE", "0"); //是否删除
|
||||||
map.put("result", errInfo);
|
pd.put("PASSWORD", new SimpleHash("SHA-1", pd.getString("PHONENUM"), Const.DEFAULT_PASSWORD).toString());
|
||||||
map.put("dockData", JSON.toJSONString(pd));
|
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;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,7 @@ import com.zcloud.service.system.DictionariesService;
|
||||||
import com.zcloud.util.*;
|
import com.zcloud.util.*;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
@ -28,7 +29,8 @@ import java.util.*;
|
||||||
@Controller
|
@Controller
|
||||||
@RequestMapping("/units")
|
@RequestMapping("/units")
|
||||||
public class UnitsController extends BaseController {
|
public class UnitsController extends BaseController {
|
||||||
|
@Value("${tongbu.api.url}")
|
||||||
|
private String tongBuUrl;
|
||||||
@Autowired
|
@Autowired
|
||||||
private UnitsService unitsService;
|
private UnitsService unitsService;
|
||||||
@Autowired
|
@Autowired
|
||||||
|
@ -55,25 +57,35 @@ public class UnitsController extends BaseController {
|
||||||
pd.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人
|
pd.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人
|
||||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||||
pd.put("ISDELETE", "0"); //是否删除
|
pd.put("ISDELETE", "0"); //是否删除
|
||||||
if (null != file && !file.isEmpty()) {
|
Map result = HttpClientService.doPost(tongBuUrl + "/api/units/findByName", pd);
|
||||||
String suffixName = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1).toLowerCase();
|
if (result.get("pd")==null) {
|
||||||
if (!"pdf".equals(suffixName) && !"jpg".equals(suffixName) && !"jpeg".equals(suffixName) && !"png".equals(suffixName) && !"mp4".equals(suffixName)) {
|
if (null != file && !file.isEmpty()) {
|
||||||
errInfo = "fail";
|
String suffixName = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1).toLowerCase();
|
||||||
map.put("result", errInfo);
|
if (!"pdf".equals(suffixName) && !"jpg".equals(suffixName) && !"jpeg".equals(suffixName) && !"png".equals(suffixName) && !"mp4".equals(suffixName)) {
|
||||||
map.put("msg", "文件格式不正确!");
|
errInfo = "fail";
|
||||||
return map;
|
map.put("result", errInfo);
|
||||||
}
|
map.put("msg", "文件格式不正确!");
|
||||||
String ffile = DateUtil.getDays();
|
return map;
|
||||||
|
}
|
||||||
|
String ffile = DateUtil.getDays();
|
||||||
// String filePath = PathUtil.getProjectpath() + Const.FILEPATHFILE + ffile; //文件上传路径
|
// String filePath = PathUtil.getProjectpath() + Const.FILEPATHFILE + ffile; //文件上传路径
|
||||||
// String fileName = FileUpload.fileUp(file, filePath, this.get32UUID()); //执行上传
|
// String fileName = FileUpload.fileUp(file, filePath, this.get32UUID()); //执行上传
|
||||||
String fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
String fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
||||||
Smb.sshSftp(file, fileName, Const.FILEPATHFILE + "/" + ffile);
|
Smb.sshSftp(file, fileName, Const.FILEPATHFILE + "/" + ffile);
|
||||||
pd.put("FILEPATH", Const.FILEPATHFILE + "/" + ffile + "/" + fileName);
|
pd.put("FILEPATH", Const.FILEPATHFILE + "/" + ffile + "/" + fileName);
|
||||||
}
|
}
|
||||||
// List<PageData> list = unitsService.listAll(pd);
|
// List<PageData> list = unitsService.listAll(pd);
|
||||||
unitsService.save(pd);
|
unitsService.save(pd);
|
||||||
map.put("dockData", JSON.toJSONString(pd));
|
map.put("dockData", JSON.toJSONString(pd));
|
||||||
map.put("result", errInfo);
|
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;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,10 +7,12 @@ import com.zcloud.entity.Page;
|
||||||
import com.zcloud.entity.PageData;
|
import com.zcloud.entity.PageData;
|
||||||
import com.zcloud.service.keyProjects.VideoResourcesService;
|
import com.zcloud.service.keyProjects.VideoResourcesService;
|
||||||
import com.zcloud.util.DateUtil;
|
import com.zcloud.util.DateUtil;
|
||||||
|
import com.zcloud.util.HttpClientService;
|
||||||
import com.zcloud.util.Jurisdiction;
|
import com.zcloud.util.Jurisdiction;
|
||||||
import com.zcloud.util.Tools;
|
import com.zcloud.util.Tools;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.ResponseBody;
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
|
@ -30,6 +32,8 @@ import java.util.Map;
|
||||||
@RequestMapping("/videoResources")
|
@RequestMapping("/videoResources")
|
||||||
public class VideoResourcesController extends BaseController {
|
public class VideoResourcesController extends BaseController {
|
||||||
|
|
||||||
|
@Value("${tongbu.api.url}")
|
||||||
|
private String tongBuUrl;
|
||||||
@Autowired
|
@Autowired
|
||||||
private VideoResourcesService videoResourcesService;
|
private VideoResourcesService videoResourcesService;
|
||||||
|
|
||||||
|
@ -47,16 +51,27 @@ public class VideoResourcesController extends BaseController {
|
||||||
Map<String, Object> map = new HashMap<String, Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
PageData pd = this.getPageData();
|
PageData pd = this.getPageData();
|
||||||
pd.put("VIDEO_RESOURCES_ID", this.get32UUID()); //主键
|
Map result = HttpClientService.doPost(tongBuUrl + "/api/videoResources/findByCode", pd);
|
||||||
pd.put("CREATTIME", DateUtil.date2Str(new Date())); //操作日期
|
if (result.get("pd")==null){
|
||||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //操作日期
|
pd.put("VIDEO_RESOURCES_ID", this.get32UUID()); //主键
|
||||||
pd.put("OPERATOR", Jurisdiction.getUSER_ID()); //操作人
|
pd.put("CREATTIME", DateUtil.date2Str(new Date())); //操作日期
|
||||||
pd.put("CREATOR", Jurisdiction.getUSER_ID()); //操作人
|
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //操作日期
|
||||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //操作人
|
pd.put("OPERATOR", Jurisdiction.getUSER_ID()); //操作人
|
||||||
pd.put("ISDELETE", "0"); //是否删除
|
pd.put("CREATOR", Jurisdiction.getUSER_ID()); //操作人
|
||||||
videoResourcesService.save(pd);
|
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //操作人
|
||||||
map.put("dockData", JSON.toJSONString(pd));
|
pd.put("ISDELETE", "0"); //是否删除
|
||||||
map.put("result", errInfo);
|
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;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,12 @@
|
||||||
datasource.no1.driver-class-name: com.mysql.cj.jdbc.Driver
|
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.username=root
|
||||||
datasource.no1.password=root
|
datasource.no1.password=Mysql@zcloud88888
|
||||||
|
|
||||||
|
|
||||||
datasource.no2.driver-class-name: com.mysql.cj.jdbc.Driver
|
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.username=root
|
||||||
datasource.no2.password=root
|
datasource.no2.password=Mysql@zcloud88888
|
||||||
|
|
||||||
datasource.no3.driver-class-name: oracle.jdbc.driver.OracleDriver
|
datasource.no3.driver-class-name: oracle.jdbc.driver.OracleDriver
|
||||||
datasource.no3.url=jdbc:oracle:thin:@172.16.11.75:1521:orcl
|
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/
|
preventionxgf.api.url=http://192.168.0.31:8992/qa-prevention-xgf/
|
||||||
# \u6E2F\u52A1\u5C40\u76D1\u7BA1\u7AEF
|
# \u6E2F\u52A1\u5C40\u76D1\u7BA1\u7AEF
|
||||||
qa-regulatory-gwj.api.url=http://192.168.0.31:8992/qa-regulatory-gwj/
|
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/
|
#preventionxgf.api.url=https://qgxgf.qhdsafety.com/qa-prevention-xgf/
|
||||||
#qa-regulatory-gwj.api.url=https://qgjg.qhdsafety.com/qa-regulatory-gwj/
|
#qa-regulatory-gwj.api.url=https://qgjg.qhdsafety.com/qa-regulatory-gwj/
|
||||||
|
|
Loading…
Reference in New Issue