新增字段及接口
This commit is contained in:
parent
21ab1dbd4f
commit
5ae76379f1
|
|
@ -6,7 +6,7 @@ public class FramelessApplicationTest {
|
|||
|
||||
@Test
|
||||
public void test(){
|
||||
System.out.println("111");
|
||||
System.err.println("111");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ public class GlobalConfig {
|
|||
//申请接入时分配的 token
|
||||
public static String token = "da421743404b6dd10fd7821ed1005662";
|
||||
public final static String IP_URL="https://dcp.sgcc.com.cn";
|
||||
public final static String TEST_URL=IP_URL+"/biz-api/ifsct/up/sel/testInterface";
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
|
@ -39,6 +39,10 @@ public class GlobalConfig {
|
|||
* 站班会人员
|
||||
*/
|
||||
public final static String ZBH_PEO_URL=IP_URL+"/biz-api/ifsct/up/sel/smToolBoxTalkDesMember";
|
||||
/**
|
||||
* 站班会人员-新
|
||||
*/
|
||||
public final static String ZBH_PEO_NEW_URL=IP_URL+"/biz-api/ifsct/up/sel/smDwToolBoxTalkDesMember";
|
||||
/**
|
||||
* 到岗到位人员
|
||||
*/
|
||||
|
|
@ -59,6 +63,10 @@ public class GlobalConfig {
|
|||
* 施工作业票人员
|
||||
*/
|
||||
public final static String TICKET_USER_URL=IP_URL+"/biz-api/ifsct/up/sel/smTicketDesMember";
|
||||
/**
|
||||
* 施工作业票人员-新
|
||||
*/
|
||||
public final static String TICKET_USER_NEW_URL=IP_URL+"/biz-api/ifsct/up/sel/smDwTicketDesMember ";
|
||||
/**
|
||||
* 施工作业任务_周
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -11,10 +11,7 @@ import lombok.Data;
|
|||
@Data
|
||||
public class JjClassMeetting {
|
||||
|
||||
public static void main(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException {
|
||||
Class.forName("org.gjt.mm.mysql.Driver").newInstance();
|
||||
String url ="jdbc:mysql://localhost/myDB?user=soft&password=soft1234&useUnicode=true&characterEncoding=8859_1";
|
||||
}
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
|
|
@ -79,6 +76,15 @@ public class JjClassMeetting {
|
|||
* 施工单位统一社会信用代码
|
||||
*/
|
||||
private String constrUnifiedSocialCreditId;
|
||||
|
||||
/**
|
||||
* 施工单位名称
|
||||
*/
|
||||
private String constructionUnitName;
|
||||
/**
|
||||
* 球机编码
|
||||
*/
|
||||
private String cameraNo;
|
||||
/**
|
||||
* 监理单位名称
|
||||
*/
|
||||
|
|
@ -141,6 +147,8 @@ public class JjClassMeetting {
|
|||
*/
|
||||
private String cameraId;
|
||||
|
||||
private String cameraNo2;
|
||||
|
||||
/**
|
||||
* 布控球id
|
||||
*/
|
||||
|
|
@ -149,15 +157,23 @@ public class JjClassMeetting {
|
|||
/**
|
||||
* 布控球id
|
||||
*/
|
||||
|
||||
private String cameraNo3;
|
||||
|
||||
private String cameraId3;
|
||||
/**
|
||||
* 布控球id
|
||||
*/
|
||||
private String cameraNo4;
|
||||
|
||||
private String cameraId4;
|
||||
|
||||
/**
|
||||
* 布控球id
|
||||
*/
|
||||
|
||||
private String cameraNo5;
|
||||
|
||||
private String cameraId5;
|
||||
/**
|
||||
* 项目编码
|
||||
|
|
@ -188,5 +204,6 @@ public class JjClassMeetting {
|
|||
*/
|
||||
private String changeTime;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -222,6 +222,33 @@ public class InterService {
|
|||
XxlJobHelper.log("数据处理异常内容--->{}",e.toString());
|
||||
}
|
||||
}
|
||||
|
||||
public void getNewTicketPeople(int pageNum) {
|
||||
try {
|
||||
JSONObject obj= DataUtils.getJsonObject(pageNum);
|
||||
HttpResponse httpResponse = PostUtils.sendData(obj.toString(), GlobalConfig.TICKET_USER_NEW_URL);
|
||||
Map<String, Object> map = DataUtils.getArray(httpResponse);
|
||||
Object objata=map.get("array");
|
||||
if (objata != null) {
|
||||
JSONArray array = (JSONArray) map.get("array");
|
||||
List<JjTicketPeople> list = JSONArray.parseArray(array.toJSONString(), JjTicketPeople.class);
|
||||
list.forEach(vo->{
|
||||
vo.setMobile(Sm4Utils.decode(vo.getMobile()));
|
||||
vo.setRealName(Sm4Utils.decode(vo.getRealName()));
|
||||
vo.setIdCard(Sm4Utils.decode(vo.getIdCard()));
|
||||
});
|
||||
service.insertTicketPeople(list);
|
||||
pageNum++;
|
||||
if (pageNum <= (Integer) map.get("TOTAL_PAGE")) {
|
||||
if (FY_BOOLEAN){
|
||||
getNewTicketPeople(pageNum);
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
XxlJobHelper.log("数据处理异常内容--->{}",e.toString());
|
||||
}
|
||||
}
|
||||
public void getWeeksPlan(int pageNum) {
|
||||
try {
|
||||
JSONObject obj= DataUtils.getTwoJsonObject(pageNum);
|
||||
|
|
@ -397,8 +424,12 @@ public class InterService {
|
|||
twoRisk.add(vo.getId());
|
||||
}
|
||||
});
|
||||
service.insertDataTwoRisk(twoRisk);
|
||||
service.insertClassMeetingData(list);
|
||||
if(!twoRisk.isEmpty()){
|
||||
service.insertDataTwoRisk(twoRisk);
|
||||
}
|
||||
if(!list.isEmpty()) {
|
||||
service.insertClassMeetingData(list);
|
||||
}
|
||||
pageNum++;
|
||||
if (pageNum <= (Integer) map.get("TOTAL_PAGE")) {
|
||||
if (FY_BOOLEAN){
|
||||
|
|
@ -416,23 +447,42 @@ public class InterService {
|
|||
String cameraId=vo.getCameraId();
|
||||
if(StringHelper.isNotEmpty(cameraId)){
|
||||
String[] strs=cameraId.split(",");
|
||||
if(strs!=null){
|
||||
String camera2=strs[0];
|
||||
vo.setCameraId2(camera2);
|
||||
if(strs.length>1){
|
||||
String camera3=strs[1];
|
||||
vo.setCameraId3(camera3);
|
||||
}
|
||||
if(strs.length>2){
|
||||
String camera4=strs[2];
|
||||
vo.setCameraId4(camera4);
|
||||
}
|
||||
if(strs.length>3){
|
||||
String camera5=strs[3];
|
||||
vo.setCameraId5(camera5);
|
||||
}
|
||||
String camera2 = strs[0];
|
||||
vo.setCameraId2(camera2);
|
||||
if(strs.length>1){
|
||||
String camera3=strs[1];
|
||||
vo.setCameraId3(camera3);
|
||||
}
|
||||
if(strs.length>2){
|
||||
String camera4=strs[2];
|
||||
vo.setCameraId4(camera4);
|
||||
}
|
||||
if(strs.length>3){
|
||||
String camera5=strs[3];
|
||||
vo.setCameraId5(camera5);
|
||||
}
|
||||
}
|
||||
|
||||
//球机编码
|
||||
String cameraNo =vo.getCameraNo();
|
||||
if(StringHelper.isNotEmpty(cameraNo)){
|
||||
String[] cameraNos=cameraNo.split(",");
|
||||
String cameraNo2 = cameraNos[0];
|
||||
vo.setCameraNo2(cameraNo2);
|
||||
if(cameraNos.length>1){
|
||||
String cameraNo3=cameraNos[1];
|
||||
vo.setCameraNo3(cameraNo3);
|
||||
}
|
||||
if(cameraNos.length>2){
|
||||
String cameraNo4=cameraNos[2];
|
||||
vo.setCameraNo4(cameraNo4);
|
||||
}
|
||||
if(cameraNos.length>3){
|
||||
String cameraNo5=cameraNos[3];
|
||||
vo.setCameraNo5(cameraNo5);
|
||||
}
|
||||
}
|
||||
|
||||
}catch (Exception e){
|
||||
XxlJobHelper.log("数据处理异常内容--->{}",e.toString());
|
||||
}
|
||||
|
|
@ -470,6 +520,33 @@ public class InterService {
|
|||
}
|
||||
}
|
||||
|
||||
public void getNewClassMeetingPeopleInfo(int pageNum) {
|
||||
try {
|
||||
//当前页
|
||||
JSONObject obj= DataUtils.getJsonObject(pageNum);
|
||||
HttpResponse httpResponse = PostUtils.sendData(obj.toString(), GlobalConfig.ZBH_PEO_NEW_URL);
|
||||
Map<String, Object> map = DataUtils.getArray(httpResponse);
|
||||
Object objata=map.get("array");
|
||||
if (objata != null) {
|
||||
JSONArray array = (JSONArray) map.get("array");
|
||||
List<JjClassMeetingPeople> list = JSONArray.parseArray(array.toJSONString(), JjClassMeetingPeople.class);
|
||||
list.forEach(vo->{
|
||||
vo.setRealName(Sm4Utils.decode(vo.getRealName()));
|
||||
vo.setIdCard(Sm4Utils.decode(vo.getIdCard()));
|
||||
});
|
||||
service.insertClassMeetingPeopleData(list);
|
||||
pageNum++;
|
||||
if (pageNum <= (Integer) map.get("TOTAL_PAGE")) {
|
||||
if (FY_BOOLEAN){
|
||||
getNewClassMeetingPeopleInfo(pageNum);
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
XxlJobHelper.log("数据处理异常内容--->{}",e.toString());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 单项工程
|
||||
* @return void
|
||||
|
|
|
|||
|
|
@ -222,6 +222,34 @@ public class InterTwoService {
|
|||
XxlJobHelper.handleFail(e.toString());
|
||||
}
|
||||
}
|
||||
|
||||
@Async
|
||||
public void getNewTicketPeople(int pageNum) {
|
||||
try {
|
||||
JSONObject obj= DataUtils.getTwoJsonObject2(pageNum);
|
||||
HttpResponse httpResponse = PostUtils.sendData(obj.toString(), GlobalConfig.TICKET_USER_NEW_URL);
|
||||
Map<String, Object> map = DataUtils.getArray(httpResponse);
|
||||
JSONArray array = (JSONArray) map.get("array");
|
||||
if (array != null) {
|
||||
List<JjTicketPeople> list = JSONArray.parseArray(array.toJSONString(), JjTicketPeople.class);
|
||||
list.forEach(vo->{
|
||||
vo.setMobile(Sm4Utils.decode(vo.getMobile()));
|
||||
vo.setRealName(Sm4Utils.decode(vo.getRealName()));
|
||||
vo.setIdCard(Sm4Utils.decode(vo.getIdCard()));
|
||||
});
|
||||
|
||||
service.insertTicketPeople(list);
|
||||
pageNum++;
|
||||
if (pageNum <= (Integer) map.get("TOTAL_PAGE")) {
|
||||
if (FY_BOOLEAN){
|
||||
getNewTicketPeople(pageNum);
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
XxlJobHelper.handleFail(e.toString());
|
||||
}
|
||||
}
|
||||
@Async
|
||||
public void getWeeksPlan(int pageNum) {
|
||||
try {
|
||||
|
|
@ -458,6 +486,36 @@ public class InterTwoService {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 新站班会人员
|
||||
* @param pageNum
|
||||
*/
|
||||
public void getNewClassMeetingPeopleInfo(int pageNum) {
|
||||
try {
|
||||
//当前页
|
||||
JSONObject obj= DataUtils.getJsonObject2(pageNum);
|
||||
HttpResponse httpResponse = PostUtils.sendData(obj.toString(), GlobalConfig.ZBH_PEO_NEW_URL);
|
||||
Map<String, Object> map = DataUtils.getArray(httpResponse);
|
||||
JSONArray array = (JSONArray) map.get("array");
|
||||
if (array != null) {
|
||||
List<JjClassMeetingPeople> list = JSONArray.parseArray(array.toJSONString(), JjClassMeetingPeople.class);
|
||||
list.forEach(vo->{
|
||||
vo.setRealName(Sm4Utils.decode(vo.getRealName()));
|
||||
vo.setIdCard(Sm4Utils.decode(vo.getIdCard()));
|
||||
});
|
||||
service.insertClassMeetingPeopleData(list);
|
||||
pageNum++;
|
||||
if (pageNum <= (Integer) map.get("TOTAL_PAGE")) {
|
||||
if (FY_BOOLEAN){
|
||||
getNewClassMeetingPeopleInfo(pageNum);
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
XxlJobHelper.handleFail(e.toString());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 单项工程
|
||||
* @return void
|
||||
|
|
|
|||
|
|
@ -82,6 +82,16 @@ public class DataCenterXxlJob {
|
|||
twtoService.getTicketPeople(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新 作业票人员
|
||||
*/
|
||||
@XxlJob("getNewTicketPeople")
|
||||
public void getNewTicketPeople(){
|
||||
interService.getNewTicketPeople(1);
|
||||
twtoService.getNewTicketPeople(1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 日计划
|
||||
*/
|
||||
|
|
@ -149,6 +159,15 @@ public class DataCenterXxlJob {
|
|||
twtoService.getClassMeetingPeopleInfo(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新-站班会人员定时任务
|
||||
*/
|
||||
@XxlJob("getNewClassMeetingPeopleInfo")
|
||||
public void getNewClassMeetingPeopleInfo() {
|
||||
interService.getNewClassMeetingPeopleInfo(1);
|
||||
twtoService.getNewClassMeetingPeopleInfo(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* 单项工程定时任务
|
||||
*
|
||||
|
|
|
|||
|
|
@ -322,7 +322,9 @@
|
|||
voltage_level,huv_flag,build_unit_code,province_code,creater_id,prj_name,
|
||||
create_time,updater_id,update_time,delete_flag,risk_precaution_id,talk_des_status_change_id,
|
||||
file_id,camera_id,prj_code,ticket_id,ticket_no,re_assessment_risk_level,
|
||||
current_constr_headcount,construction_headcount,change_time,camera_id2,camera_id3,camera_id4,camera_id5) VALUES
|
||||
current_constr_headcount,construction_headcount,change_time,camera_id2,camera_id3,camera_id4,camera_id5,
|
||||
camera_no,camera_no2,camera_no3,camera_no4,camera_no5,construction_unit_name
|
||||
) VALUES
|
||||
<foreach collection="list" item="item" separator=",">(
|
||||
#{item.id},#{item.workStartTime},#{item.currentConstrDate},#{item.currentConstructionStatus},#{item.workOvernightFlag},#{item.toolBoxTalkAddress},
|
||||
#{item.toolBoxTalkLongitude},#{item.toolBoxTalkLatitude},#{item.mcWorkSiteId},#{item.biddingSectionCode},#{item.biddingSectionName},#{item.offOnlineFlag},
|
||||
|
|
@ -330,7 +332,8 @@
|
|||
#{item.voltageLevel},#{item.huvFlag},#{item.buildUnitCode},#{item.provinceCode},#{item.createrId},#{item.prjName},
|
||||
#{item.createTime},#{item.updaterId},#{item.updateTime},#{item.deleteFlag},#{item.riskPrecautionId},#{item.talkDesStatusChangeId},
|
||||
#{item.fileId},#{item.cameraId},#{item.prjCode},#{item.ticketId},#{item.ticketNo},#{item.reAssessmentRiskLevel},
|
||||
#{item.currentConstrHeadcount},#{item.constructionHeadcount},#{item.changeTime},#{item.cameraId2},#{item.cameraId3},#{item.cameraId4},#{item.cameraId5}
|
||||
#{item.currentConstrHeadcount},#{item.constructionHeadcount},#{item.changeTime},#{item.cameraId2},#{item.cameraId3},#{item.cameraId4},#{item.cameraId5},
|
||||
#{item.cameraNo},#{item.cameraNo2},#{item.cameraNo3},#{item.cameraNo4}, #{item.cameraNo5},#{item.constructionUnitName}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
|
|
|||
Loading…
Reference in New Issue