相关方查看详情统一格式
parent
9e7a5334bd
commit
a28d97cea7
|
@ -3,13 +3,17 @@ package com.zcloud.controller.xgf;
|
||||||
import com.zcloud.controller.base.BaseController;
|
import com.zcloud.controller.base.BaseController;
|
||||||
import com.zcloud.entity.Page;
|
import com.zcloud.entity.Page;
|
||||||
import com.zcloud.entity.PageData;
|
import com.zcloud.entity.PageData;
|
||||||
|
import com.zcloud.service.xgf.TrainingBatchService;
|
||||||
import com.zcloud.service.xgf.XgfUserService;
|
import com.zcloud.service.xgf.XgfUserService;
|
||||||
|
import com.zcloud.util.HttpClientService;
|
||||||
|
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;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@Controller
|
@Controller
|
||||||
|
@ -19,6 +23,12 @@ public class XgfUserController extends BaseController {
|
||||||
@Resource
|
@Resource
|
||||||
private XgfUserService xgfUserService;
|
private XgfUserService xgfUserService;
|
||||||
|
|
||||||
|
@Value("${preventionxgf.api.url}")
|
||||||
|
private String url;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private TrainingBatchService trainingBatchService;
|
||||||
|
|
||||||
|
|
||||||
@RequestMapping(value = "/list")
|
@RequestMapping(value = "/list")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
|
@ -59,11 +69,29 @@ public class XgfUserController extends BaseController {
|
||||||
public Object getInfo() throws Exception {
|
public Object getInfo() throws Exception {
|
||||||
PageData request = this.getPageData();
|
PageData request = this.getPageData();
|
||||||
PageData condition = new PageData();
|
PageData condition = new PageData();
|
||||||
|
/*组织人员信息*/
|
||||||
condition.put("XGF_USER_ID", request.getString("XGF_USER_ID"));
|
condition.put("XGF_USER_ID", request.getString("XGF_USER_ID"));
|
||||||
PageData entity = xgfUserService.findInfo(condition);
|
PageData entity = xgfUserService.findInfo(condition);
|
||||||
|
/*组织人员图片信息*/
|
||||||
|
condition.put("USER_ID", entity.getString("XGF_USER_ID"));
|
||||||
|
condition.put("CORPINFO_ID", entity.getString("BELONG_TO_CORP"));
|
||||||
|
Map result = HttpClientService.doPost(url + "/openApi/user/getInfoPicture", condition);
|
||||||
|
if (result == null || !"succeed".equals(result.get("result"))) throw new RuntimeException("请求失败");
|
||||||
|
/*组织员工培训信息*/
|
||||||
|
condition.clear();
|
||||||
|
condition.put("USER_ID", entity.getString("XGF_USER_ID"));
|
||||||
|
List<PageData> recordList = xgfUserService.findRecordList(condition);
|
||||||
|
/*培训申请记录*/
|
||||||
|
condition.clear();
|
||||||
|
condition.put("USER_ID", entity.getString("XGF_USER_ID"));
|
||||||
|
List<PageData> trainList = trainingBatchService.findByUserId(condition);
|
||||||
|
|
||||||
PageData response = new PageData();
|
PageData response = new PageData();
|
||||||
response.put("result", "success");
|
response.put("result", "success");
|
||||||
response.put("info", entity);
|
response.put("info", entity);
|
||||||
|
response.put("img", result);
|
||||||
|
response.put("trainRecordList", recordList);
|
||||||
|
response.put("applyList", trainList);
|
||||||
response.put("data", request);
|
response.put("data", request);
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
|
@ -74,5 +74,7 @@ public interface TrainingBatchMapper{
|
||||||
PageData findAndTimeById(PageData pd);
|
PageData findAndTimeById(PageData pd);
|
||||||
|
|
||||||
void graduation(PageData condition);
|
void graduation(PageData condition);
|
||||||
|
|
||||||
|
List<PageData> findByUserId(PageData condition);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -68,4 +68,6 @@ public interface XgfUserMapper {
|
||||||
List<PageData> flowlistPage(Page page);
|
List<PageData> flowlistPage(Page page);
|
||||||
|
|
||||||
PageData getInfoById(PageData condition);
|
PageData getInfoById(PageData condition);
|
||||||
|
|
||||||
|
List<PageData> findRecordList(PageData condition);
|
||||||
}
|
}
|
||||||
|
|
|
@ -87,5 +87,7 @@ public interface TrainingBatchService{
|
||||||
void updateClassMessage(PageData condition);
|
void updateClassMessage(PageData condition);
|
||||||
|
|
||||||
void saveFlow(PageData request) throws Exception;
|
void saveFlow(PageData request) throws Exception;
|
||||||
|
|
||||||
|
List<PageData> findByUserId(PageData condition) throws Exception;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,4 +22,6 @@ public interface XgfUserService {
|
||||||
void approve(PageData request) throws Exception;
|
void approve(PageData request) throws Exception;
|
||||||
|
|
||||||
PageData findInfo(PageData condition);
|
PageData findInfo(PageData condition);
|
||||||
|
|
||||||
|
List<PageData> findRecordList(PageData condition) throws Exception;
|
||||||
}
|
}
|
||||||
|
|
|
@ -381,5 +381,10 @@ public class TrainingBatchServiceImpl implements TrainingBatchService {
|
||||||
next_flow.put("PARENT_ID",flow.getString("FLOW_DETAIL_ID"));
|
next_flow.put("PARENT_ID",flow.getString("FLOW_DETAIL_ID"));
|
||||||
flowDetailMapper.save(next_flow);
|
flowDetailMapper.save(next_flow);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<PageData> findByUserId(PageData condition) throws Exception {
|
||||||
|
return trainingbatchMapper.findByUserId(condition);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -146,4 +146,9 @@ public class XgfUserServiceImpl implements XgfUserService {
|
||||||
public PageData findInfo(PageData condition) {
|
public PageData findInfo(PageData condition) {
|
||||||
return xgfUserMapper.getInfoById(condition);
|
return xgfUserMapper.getInfoById(condition);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<PageData> findRecordList(PageData condition) throws Exception {
|
||||||
|
return xgfUserMapper.findRecordList(condition);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -355,4 +355,20 @@
|
||||||
where
|
where
|
||||||
f.TRAINING_BATCH_ID = #{TRAINING_BATCH_ID}
|
f.TRAINING_BATCH_ID = #{TRAINING_BATCH_ID}
|
||||||
</select>
|
</select>
|
||||||
|
<select id="findByUserId" resultType="com.zcloud.entity.PageData">
|
||||||
|
select b.MANAGER_DEPARTMENT_NAME,
|
||||||
|
b.MANAGER_USER_NAME,
|
||||||
|
a.MANAGER_STATE,
|
||||||
|
b.SUPERVISION_DEPARTMENT_NAME,
|
||||||
|
b.SUPERVISION_USER_NAME,
|
||||||
|
a.SUPERVISION_STATE,
|
||||||
|
b.TERRITORIALITY_DEPARTMENT_NAME,
|
||||||
|
b.TERRITORIALITY_USER_NAME,
|
||||||
|
a.TERRITORIALITY_STATE
|
||||||
|
from xgf_train_users a
|
||||||
|
left join xgf_training_batch b on a.TRAINING_BATCH_ID = b.TRAINING_BATCH_ID
|
||||||
|
where a.IS_DELETE = '0'
|
||||||
|
and USER_ID = #{USER_ID}
|
||||||
|
order by b.CREATTIME desc;
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
@ -268,5 +268,20 @@
|
||||||
and a.XGF_USER_ID = #{XGF_USER_ID}
|
and a.XGF_USER_ID = #{XGF_USER_ID}
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
<select id="findRecordList" resultType="com.zcloud.entity.PageData">
|
||||||
|
select rf.*,
|
||||||
|
rcm.CLASS_NAME,
|
||||||
|
rcm.OPENING_TIME,
|
||||||
|
sdp.NAME as PLACE_NAME,
|
||||||
|
sdt.NAME as TRAINING_TYPE_NAME,
|
||||||
|
rcm.VALIDITY_PERIOD_START,
|
||||||
|
rcm.VALIDITY_PERIOD_END
|
||||||
|
from `qa-gwj-regulatory`.bus_class_info rf
|
||||||
|
left join `qa-gwj-regulatory`.bus_class_message rcm on rf.CLASS_MESSAGE_ID = rcm.CLASS_MESSAGE_ID
|
||||||
|
left join sys_dictionaries sdp on sdp.DICTIONARIES_ID = rcm.PLACE
|
||||||
|
left join sys_dictionaries sdt on sdt.DICTIONARIES_ID = rcm.TRAINING_TYPE
|
||||||
|
where rf.USER_ID = #{USER_ID}
|
||||||
|
order by rf.CREATE_TIME desc
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
Loading…
Reference in New Issue