Commit 1855f366 authored by 耿迪迪's avatar 耿迪迪

专家行为申报-浏览

parent 237fda7e
...@@ -4,8 +4,11 @@ import com.alibaba.fastjson.JSONArray; ...@@ -4,8 +4,11 @@ import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.zehong.common.core.domain.AjaxResult; import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.utils.GovernmentDataCopyUtil; import com.zehong.common.utils.GovernmentDataCopyUtil;
import com.zehong.system.domain.FProBehInforBrowse;
import com.zehong.system.domain.TProAppInforBrowse; import com.zehong.system.domain.TProAppInforBrowse;
import com.zehong.system.domain.vo.ProAppInforBrowseVo; import com.zehong.system.domain.vo.ProAppInforBrowseVo;
import com.zehong.system.domain.vo.ProBehInfoBrowseVo;
import com.zehong.system.service.IFProBehInforBrowseService;
import com.zehong.system.service.ITProAppInforBrowseService; import com.zehong.system.service.ITProAppInforBrowseService;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
...@@ -33,6 +36,9 @@ public class TokenController { ...@@ -33,6 +36,9 @@ public class TokenController {
@Autowired @Autowired
private ITProAppInforBrowseService tProAppInforBrowseService; private ITProAppInforBrowseService tProAppInforBrowseService;
@Autowired
private IFProBehInforBrowseService fProBehInforBrowseService;
/** /**
* 获取营业执照 * 获取营业执照
* @return * @return
...@@ -123,10 +129,11 @@ public class TokenController { ...@@ -123,10 +129,11 @@ public class TokenController {
map.put("pageIndex",pageIndex); map.put("pageIndex",pageIndex);
map.put("pageSize",pageSize); map.put("pageSize",pageSize);
JSONObject json = outUtil.getInfo("professor/application/information","READ",map); JSONObject json = outUtil.getInfo("professor/application/information","READ",map);
log.info("获取行业专家档案结果=========" + json.toString());
if(null != json && "0".equals(json.getString("resultCode")) && null != json.getJSONArray("data")){ if(null != json && "0".equals(json.getString("resultCode")) && null != json.getJSONArray("data")){
addProfessorInfo(json.getJSONArray("data")); addProfessorInfo(json.getJSONArray("data"));
} }
return AjaxResult.success("获取行业专家档案成功"); return AjaxResult.success(json);
} catch (Exception e) { } catch (Exception e) {
log.error("获取行业专家档案失败",e); log.error("获取行业专家档案失败",e);
return AjaxResult.error("获取行业专家档案失败"); return AjaxResult.error("获取行业专家档案失败");
...@@ -146,4 +153,38 @@ public class TokenController { ...@@ -146,4 +153,38 @@ public class TokenController {
tProAppInforBrowseService.insertTProAppInforBrowse(tProAppInforBrowse); tProAppInforBrowseService.insertTProAppInforBrowse(tProAppInforBrowse);
} }
} }
@GetMapping(value = "/getBehaviour")
public AjaxResult getBehaviour(@RequestParam(value = "updateTime") String updateTime,@RequestParam(value = "pageIndex") Integer pageIndex,@RequestParam(value = "pageSize") Integer pageSize){
try {
Map<String,Object> map = new HashMap<>();
map.put("updateTime",updateTime);
map.put("pageIndex",pageIndex);
map.put("pageSize",pageSize);
JSONObject json = outUtil.getInfo("professor/behaviour/information","READ",map);
log.info("获取专家行为档案结果=========" + json.toString());
if(null != json && "0".equals(json.getString("resultCode")) && null != json.getJSONArray("data")){
addBehaviourInfo(json.getJSONArray("data"));
}
return AjaxResult.success(json);
} catch (Exception e) {
log.error("获取行业专家档案失败",e);
return AjaxResult.error("获取专家行为档案失败");
}
}
/**
* 持久化行业专家档案
* @param data
*/
@Transactional(rollbackFor = Exception.class)
public void addBehaviourInfo(JSONArray data) throws IllegalAccessException {
for(int i = 0; i < data.size(); i++){
ProBehInfoBrowseVo proBehInfoBrowseVo = JSONObject.toJavaObject(data.getJSONObject(i), ProBehInfoBrowseVo.class);
FProBehInforBrowse proBehInforBrowse = new FProBehInforBrowse();
GovernmentDataCopyUtil.copyToLocalData(proBehInfoBrowseVo,proBehInforBrowse);
fProBehInforBrowseService.insertFProBehInforBrowse(proBehInforBrowse);
}
}
} }
package com.zehong.web.controller.specialist;
import java.util.List;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.zehong.common.annotation.Log;
import com.zehong.common.core.controller.BaseController;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.enums.BusinessType;
import com.zehong.system.domain.FProBehInforBrowse;
import com.zehong.system.service.IFProBehInforBrowseService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 行业专家库-专家行为浏览Controller
*
* @author zehong
* @date 2024-05-09
*/
@RestController
@RequestMapping("/specialist/behBrowse")
public class FProBehInforBrowseController extends BaseController
{
@Autowired
private IFProBehInforBrowseService fProBehInforBrowseService;
/**
* 查询行业专家库-专家行为浏览列表
*/
@PreAuthorize("@ss.hasPermi('specialist:behBrowse:list')")
@GetMapping("/list")
public TableDataInfo list(FProBehInforBrowse fProBehInforBrowse)
{
startPage();
List<FProBehInforBrowse> list = fProBehInforBrowseService.selectFProBehInforBrowseList(fProBehInforBrowse);
return getDataTable(list);
}
/**
* 导出行业专家库-专家行为浏览列表
*/
@PreAuthorize("@ss.hasPermi('specialist:behBrowse:export')")
@Log(title = "行业专家库-专家行为浏览", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(FProBehInforBrowse fProBehInforBrowse)
{
List<FProBehInforBrowse> list = fProBehInforBrowseService.selectFProBehInforBrowseList(fProBehInforBrowse);
ExcelUtil<FProBehInforBrowse> util = new ExcelUtil<FProBehInforBrowse>(FProBehInforBrowse.class);
return util.exportExcel(list, "行业专家库-专家行为浏览数据");
}
/**
* 获取行业专家库-专家行为浏览详细信息
*/
@PreAuthorize("@ss.hasPermi('specialist:behBrowse:query')")
@GetMapping(value = "/{fProBehInforId}")
public AjaxResult getInfo(@PathVariable("fProBehInforId") Long fProBehInforId)
{
return AjaxResult.success(fProBehInforBrowseService.selectFProBehInforBrowseById(fProBehInforId));
}
/**
* 新增行业专家库-专家行为浏览
*/
@PreAuthorize("@ss.hasPermi('specialist:behBrowse:add')")
@Log(title = "行业专家库-专家行为浏览", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody FProBehInforBrowse fProBehInforBrowse)
{
return toAjax(fProBehInforBrowseService.insertFProBehInforBrowse(fProBehInforBrowse));
}
/**
* 修改行业专家库-专家行为浏览
*/
@PreAuthorize("@ss.hasPermi('specialist:behBrowse:edit')")
@Log(title = "行业专家库-专家行为浏览", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody FProBehInforBrowse fProBehInforBrowse)
{
return toAjax(fProBehInforBrowseService.updateFProBehInforBrowse(fProBehInforBrowse));
}
/**
* 删除行业专家库-专家行为浏览
*/
@PreAuthorize("@ss.hasPermi('specialist:behBrowse:remove')")
@Log(title = "行业专家库-专家行为浏览", businessType = BusinessType.DELETE)
@DeleteMapping("/{fProBehInforIds}")
public AjaxResult remove(@PathVariable Long[] fProBehInforIds)
{
return toAjax(fProBehInforBrowseService.deleteFProBehInforBrowseByIds(fProBehInforIds));
}
}
package com.zehong.web.controller.specialist;
import java.util.List;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.zehong.common.annotation.Log;
import com.zehong.common.core.controller.BaseController;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.enums.BusinessType;
import com.zehong.system.domain.FProBehInfor;
import com.zehong.system.service.IFProBehInforService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 行业专家库-专家行为申报Controller
*
* @author zehong
* @date 2024-05-09
*/
@RestController
@RequestMapping("/specialist/behInfo")
public class FProBehInforController extends BaseController
{
@Autowired
private IFProBehInforService fProBehInforService;
/**
* 查询行业专家库-专家行为申报列表
*/
@PreAuthorize("@ss.hasPermi('specialist:behInfo:list')")
@GetMapping("/list")
public TableDataInfo list(FProBehInfor fProBehInfor)
{
startPage();
List<FProBehInfor> list = fProBehInforService.selectFProBehInforList(fProBehInfor);
return getDataTable(list);
}
/**
* 导出行业专家库-专家行为申报列表
*/
@PreAuthorize("@ss.hasPermi('specialist:behInfo:export')")
@Log(title = "行业专家库-专家行为申报", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(FProBehInfor fProBehInfor)
{
List<FProBehInfor> list = fProBehInforService.selectFProBehInforList(fProBehInfor);
ExcelUtil<FProBehInfor> util = new ExcelUtil<FProBehInfor>(FProBehInfor.class);
return util.exportExcel(list, "行业专家库-专家行为申报数据");
}
/**
* 获取行业专家库-专家行为申报详细信息
*/
@PreAuthorize("@ss.hasPermi('specialist:behInfo:query')")
@GetMapping(value = "/{fProBehInforId}")
public AjaxResult getInfo(@PathVariable("fProBehInforId") Long fProBehInforId)
{
return AjaxResult.success(fProBehInforService.selectFProBehInforById(fProBehInforId));
}
/**
* 新增行业专家库-专家行为申报
*/
@PreAuthorize("@ss.hasPermi('specialist:behInfo:add')")
@Log(title = "行业专家库-专家行为申报", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody FProBehInfor fProBehInfor)
{
return toAjax(fProBehInforService.insertFProBehInfor(fProBehInfor));
}
/**
* 修改行业专家库-专家行为申报
*/
@PreAuthorize("@ss.hasPermi('specialist:behInfo:edit')")
@Log(title = "行业专家库-专家行为申报", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody FProBehInfor fProBehInfor)
{
return toAjax(fProBehInforService.updateFProBehInfor(fProBehInfor));
}
/**
* 删除行业专家库-专家行为申报
*/
@PreAuthorize("@ss.hasPermi('specialist:behInfo:remove')")
@Log(title = "行业专家库-专家行为申报", businessType = BusinessType.DELETE)
@DeleteMapping("/{fProBehInforIds}")
public AjaxResult remove(@PathVariable Long[] fProBehInforIds)
{
return toAjax(fProBehInforService.deleteFProBehInforByIds(fProBehInforIds));
}
/**
* 行业专家申报
* @param fProBehInforId 行业专家行为主键
* @return
*/
@GetMapping("/reportProBehInfo")
public AjaxResult reportProBehInfo(Long fProBehInforId){
try{
return toAjax(fProBehInforService.reportProBehInfo(fProBehInforId));
}catch (Exception e){
logger.error("行业专家申报接口异常=====",e);
return AjaxResult.error("行业专家申报接口异常");
}
}
}
...@@ -37,7 +37,7 @@ public class GovernmentDataUtil { ...@@ -37,7 +37,7 @@ public class GovernmentDataUtil {
*/ */
public String getToken()throws Exception{ public String getToken()throws Exception{
String token = redisCache.getCacheObject("apiToken"); String token = redisCache.getCacheObject("apiToken");
if(token!=null){ if(StringUtils.isEmpty(token)){
token = getNewToken(); token = getNewToken();
} }
return token; return token;
......
package com.zehong.system.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.zehong.common.annotation.Excel;
import com.zehong.common.core.domain.BaseEntity;
/**
* 行业专家库-专家行为申报对象 f_pro_beh_infor
*
* @author zehong
* @date 2024-05-09
*/
public class FProBehInfor extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** id */
private Long fProBehInforId;
/** 身份证号 */
@Excel(name = "身份证号")
private String fIdNo;
/** 专家表现评价 */
@Excel(name = "专家表现评价")
private String fExpertEval;
/** 选用事件 */
@Excel(name = "选用事件")
private String fSelectionEvent;
/** 选用开始时间 */
@Excel(name = "选用开始时间")
@JsonFormat(pattern = "yyyy-MM-dd")
private String fSelectionStartTime;
/** 评分说明 */
@Excel(name = "评分说明")
private String fScorDesc;
/** 最后修改时间 */
@Excel(name = "最后修改时间")
private String fUpdateTime;
/** 申报状态:1 已上报,2 未上报,3 已通过,4未通过 */
@Excel(name = "申报状态",dictType = "t_rep_status")
private Long fRepStatus;
/** 申报时间 */
@Excel(name = "申报时间")
private String fRepDate;
public void setfProBehInforId(Long fProBehInforId)
{
this.fProBehInforId = fProBehInforId;
}
public Long getfProBehInforId()
{
return fProBehInforId;
}
public void setfIdNo(String fIdNo)
{
this.fIdNo = fIdNo;
}
public String getfIdNo()
{
return fIdNo;
}
public void setfExpertEval(String fExpertEval)
{
this.fExpertEval = fExpertEval;
}
public String getfExpertEval()
{
return fExpertEval;
}
public void setfSelectionEvent(String fSelectionEvent)
{
this.fSelectionEvent = fSelectionEvent;
}
public String getfSelectionEvent()
{
return fSelectionEvent;
}
public void setfSelectionStartTime(String fSelectionStartTime)
{
this.fSelectionStartTime = fSelectionStartTime;
}
public String getfSelectionStartTime()
{
return fSelectionStartTime;
}
public void setfScorDesc(String fScorDesc)
{
this.fScorDesc = fScorDesc;
}
public String getfScorDesc()
{
return fScorDesc;
}
public void setfUpdateTime(String fUpdateTime)
{
this.fUpdateTime = fUpdateTime;
}
public String getfUpdateTime()
{
return fUpdateTime;
}
public void setfRepStatus(Long fRepStatus)
{
this.fRepStatus = fRepStatus;
}
public Long getfRepStatus()
{
return fRepStatus;
}
public void setfRepDate(String fRepDate)
{
this.fRepDate = fRepDate;
}
public String getfRepDate()
{
return fRepDate;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("fProBehInforId", getfProBehInforId())
.append("fIdNo", getfIdNo())
.append("fExperEval", getfExpertEval())
.append("fSelectionEvent", getfSelectionEvent())
.append("fSelectionStartTime", getfSelectionStartTime())
.append("fScorDesc", getfScorDesc())
.append("fUpdateTime", getfUpdateTime())
.append("fRepStatus", getfRepStatus())
.append("fRepDate", getfRepDate())
.toString();
}
}
package com.zehong.system.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.zehong.common.annotation.Excel;
import com.zehong.common.core.domain.BaseEntity;
/**
* 行业专家库-专家行为浏览对象 f_pro_beh_infor_browse
*
* @author zehong
* @date 2024-05-09
*/
public class FProBehInforBrowse extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** id */
private Long fProBehInforId;
/** 身份证号 */
@Excel(name = "身份证号")
private String fIdNo;
/** 专家表现评价 */
@Excel(name = "专家表现评价")
private String fExperEval;
/** 选用事件 */
@Excel(name = "选用事件")
private String fSelectionEvent;
/** 选用开始时间 */
@Excel(name = "选用开始时间")
private String fSelectionStartTime;
/** 评分说明 */
@Excel(name = "评分说明")
private String fScorDesc;
/** 最后修改时间 */
@Excel(name = "最后修改时间")
private String fUpdateTime;
public void setfProBehInforId(Long fProBehInforId)
{
this.fProBehInforId = fProBehInforId;
}
public Long getfProBehInforId()
{
return fProBehInforId;
}
public void setfIdNo(String fIdNo)
{
this.fIdNo = fIdNo;
}
public String getfIdNo()
{
return fIdNo;
}
public void setfExperEval(String fExperEval)
{
this.fExperEval = fExperEval;
}
public String getfExperEval()
{
return fExperEval;
}
public void setfSelectionEvent(String fSelectionEvent)
{
this.fSelectionEvent = fSelectionEvent;
}
public String getfSelectionEvent()
{
return fSelectionEvent;
}
public void setfSelectionStartTime(String fSelectionStartTime)
{
this.fSelectionStartTime = fSelectionStartTime;
}
public String getfSelectionStartTime()
{
return fSelectionStartTime;
}
public void setfScorDesc(String fScorDesc)
{
this.fScorDesc = fScorDesc;
}
public String getfScorDesc()
{
return fScorDesc;
}
public void setfUpdateTime(String fUpdateTime)
{
this.fUpdateTime = fUpdateTime;
}
public String getfUpdateTime()
{
return fUpdateTime;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("fProBehInforId", getfProBehInforId())
.append("fIdNo", getfIdNo())
.append("fExperEval", getfExperEval())
.append("fSelectionEvent", getfSelectionEvent())
.append("fSelectionStartTime", getfSelectionStartTime())
.append("fScorDesc", getfScorDesc())
.append("fUpdateTime", getfUpdateTime())
.toString();
}
}
package com.zehong.system.domain.vo;
public class ProBehInfoBrowseVo {
/**人员编码*/
private String code;
/**专家表现评价*/
private String expertval;
/**身份证号*/
private String idNo;
/**选用时间*/
private String selectionStartTime;
/**选用事件*/
private String selectionEvent;
/**评价说明*/
private String scorDesc;
/**最后修改时间*/
private String updateTime;
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getExpertval() {
return expertval;
}
public void setExpertval(String expertval) {
this.expertval = expertval;
}
public String getIdNo() {
return idNo;
}
public void setIdNo(String idNo) {
this.idNo = idNo;
}
public String getSelectionStartTime() {
return selectionStartTime;
}
public void setSelectionStartTime(String selectionStartTime) {
this.selectionStartTime = selectionStartTime;
}
public String getSelectionEvent() {
return selectionEvent;
}
public void setSelectionEvent(String selectionEvent) {
this.selectionEvent = selectionEvent;
}
public String getScorDesc() {
return scorDesc;
}
public void setScorDesc(String scorDesc) {
this.scorDesc = scorDesc;
}
public String getUpdateTime() {
return updateTime;
}
public void setUpdateTime(String updateTime) {
this.updateTime = updateTime;
}
@Override
public String toString() {
return "ProBehInfoBrowseVo{" +
"code='" + code + '\'' +
", expertval='" + expertval + '\'' +
", idNo='" + idNo + '\'' +
", selectionStartTime='" + selectionStartTime + '\'' +
", selectionEvent='" + selectionEvent + '\'' +
", scorDesc='" + scorDesc + '\'' +
", updateTime='" + updateTime + '\'' +
'}';
}
}
package com.zehong.system.domain.vo;
public class ProBehInfoVo {
/**身份证号*/
private String idNo;
/**专家表现评价*/
private String expertEval;
/**选用事件*/
private String selectionEvent;
/**选用开始时间*/
private String selectionStartTime;
/**评分说明*/
private String scorDesc;
/**最后修改时间*/
private String updateTime;
public String getIdNo() {
return idNo;
}
public void setIdNo(String idNo) {
this.idNo = idNo;
}
public String getExpertEval() {
return expertEval;
}
public void setExpertEval(String expertEval) {
this.expertEval = expertEval;
}
public String getSelectionEvent() {
return selectionEvent;
}
public void setSelectionEvent(String selectionEvent) {
this.selectionEvent = selectionEvent;
}
public String getSelectionStartTime() {
return selectionStartTime;
}
public void setSelectionStartTime(String selectionStartTime) {
this.selectionStartTime = selectionStartTime;
}
public String getScorDesc() {
return scorDesc;
}
public void setScorDesc(String scorDesc) {
this.scorDesc = scorDesc;
}
public String getUpdateTime() {
return updateTime;
}
public void setUpdateTime(String updateTime) {
this.updateTime = updateTime;
}
}
package com.zehong.system.mapper;
import java.util.List;
import com.zehong.system.domain.FProBehInforBrowse;
/**
* 行业专家库-专家行为浏览Mapper接口
*
* @author zehong
* @date 2024-05-09
*/
public interface FProBehInforBrowseMapper
{
/**
* 查询行业专家库-专家行为浏览
*
* @param fProBehInforId 行业专家库-专家行为浏览ID
* @return 行业专家库-专家行为浏览
*/
public FProBehInforBrowse selectFProBehInforBrowseById(Long fProBehInforId);
/**
* 查询行业专家库-专家行为浏览列表
*
* @param fProBehInforBrowse 行业专家库-专家行为浏览
* @return 行业专家库-专家行为浏览集合
*/
public List<FProBehInforBrowse> selectFProBehInforBrowseList(FProBehInforBrowse fProBehInforBrowse);
/**
* 新增行业专家库-专家行为浏览
*
* @param fProBehInforBrowse 行业专家库-专家行为浏览
* @return 结果
*/
public int insertFProBehInforBrowse(FProBehInforBrowse fProBehInforBrowse);
/**
* 修改行业专家库-专家行为浏览
*
* @param fProBehInforBrowse 行业专家库-专家行为浏览
* @return 结果
*/
public int updateFProBehInforBrowse(FProBehInforBrowse fProBehInforBrowse);
/**
* 删除行业专家库-专家行为浏览
*
* @param fProBehInforId 行业专家库-专家行为浏览ID
* @return 结果
*/
public int deleteFProBehInforBrowseById(Long fProBehInforId);
/**
* 批量删除行业专家库-专家行为浏览
*
* @param fProBehInforIds 需要删除的数据ID
* @return 结果
*/
public int deleteFProBehInforBrowseByIds(Long[] fProBehInforIds);
}
package com.zehong.system.mapper;
import java.util.List;
import com.zehong.system.domain.FProBehInfor;
/**
* 行业专家库-专家行为申报Mapper接口
*
* @author zehong
* @date 2024-05-09
*/
public interface FProBehInforMapper
{
/**
* 查询行业专家库-专家行为申报
*
* @param fProBehInforId 行业专家库-专家行为申报ID
* @return 行业专家库-专家行为申报
*/
public FProBehInfor selectFProBehInforById(Long fProBehInforId);
/**
* 查询行业专家库-专家行为申报列表
*
* @param fProBehInfor 行业专家库-专家行为申报
* @return 行业专家库-专家行为申报集合
*/
public List<FProBehInfor> selectFProBehInforList(FProBehInfor fProBehInfor);
/**
* 新增行业专家库-专家行为申报
*
* @param fProBehInfor 行业专家库-专家行为申报
* @return 结果
*/
public int insertFProBehInfor(FProBehInfor fProBehInfor);
/**
* 修改行业专家库-专家行为申报
*
* @param fProBehInfor 行业专家库-专家行为申报
* @return 结果
*/
public int updateFProBehInfor(FProBehInfor fProBehInfor);
/**
* 删除行业专家库-专家行为申报
*
* @param fProBehInforId 行业专家库-专家行为申报ID
* @return 结果
*/
public int deleteFProBehInforById(Long fProBehInforId);
/**
* 批量删除行业专家库-专家行为申报
*
* @param fProBehInforIds 需要删除的数据ID
* @return 结果
*/
public int deleteFProBehInforByIds(Long[] fProBehInforIds);
}
package com.zehong.system.service;
import java.util.List;
import com.zehong.system.domain.FProBehInforBrowse;
/**
* 行业专家库-专家行为浏览Service接口
*
* @author zehong
* @date 2024-05-09
*/
public interface IFProBehInforBrowseService
{
/**
* 查询行业专家库-专家行为浏览
*
* @param fProBehInforId 行业专家库-专家行为浏览ID
* @return 行业专家库-专家行为浏览
*/
public FProBehInforBrowse selectFProBehInforBrowseById(Long fProBehInforId);
/**
* 查询行业专家库-专家行为浏览列表
*
* @param fProBehInforBrowse 行业专家库-专家行为浏览
* @return 行业专家库-专家行为浏览集合
*/
public List<FProBehInforBrowse> selectFProBehInforBrowseList(FProBehInforBrowse fProBehInforBrowse);
/**
* 新增行业专家库-专家行为浏览
*
* @param fProBehInforBrowse 行业专家库-专家行为浏览
* @return 结果
*/
public int insertFProBehInforBrowse(FProBehInforBrowse fProBehInforBrowse);
/**
* 修改行业专家库-专家行为浏览
*
* @param fProBehInforBrowse 行业专家库-专家行为浏览
* @return 结果
*/
public int updateFProBehInforBrowse(FProBehInforBrowse fProBehInforBrowse);
/**
* 批量删除行业专家库-专家行为浏览
*
* @param fProBehInforIds 需要删除的行业专家库-专家行为浏览ID
* @return 结果
*/
public int deleteFProBehInforBrowseByIds(Long[] fProBehInforIds);
/**
* 删除行业专家库-专家行为浏览信息
*
* @param fProBehInforId 行业专家库-专家行为浏览ID
* @return 结果
*/
public int deleteFProBehInforBrowseById(Long fProBehInforId);
}
package com.zehong.system.service;
import java.util.List;
import com.zehong.system.domain.FProBehInfor;
/**
* 行业专家库-专家行为申报Service接口
*
* @author zehong
* @date 2024-05-09
*/
public interface IFProBehInforService
{
/**
* 查询行业专家库-专家行为申报
*
* @param fProBehInforId 行业专家库-专家行为申报ID
* @return 行业专家库-专家行为申报
*/
public FProBehInfor selectFProBehInforById(Long fProBehInforId);
/**
* 查询行业专家库-专家行为申报列表
*
* @param fProBehInfor 行业专家库-专家行为申报
* @return 行业专家库-专家行为申报集合
*/
public List<FProBehInfor> selectFProBehInforList(FProBehInfor fProBehInfor);
/**
* 新增行业专家库-专家行为申报
*
* @param fProBehInfor 行业专家库-专家行为申报
* @return 结果
*/
public int insertFProBehInfor(FProBehInfor fProBehInfor);
/**
* 修改行业专家库-专家行为申报
*
* @param fProBehInfor 行业专家库-专家行为申报
* @return 结果
*/
public int updateFProBehInfor(FProBehInfor fProBehInfor);
/**
* 批量删除行业专家库-专家行为申报
*
* @param fProBehInforIds 需要删除的行业专家库-专家行为申报ID
* @return 结果
*/
public int deleteFProBehInforByIds(Long[] fProBehInforIds);
/**
* 删除行业专家库-专家行为申报信息
*
* @param fProBehInforId 行业专家库-专家行为申报ID
* @return 结果
*/
public int deleteFProBehInforById(Long fProBehInforId);
/**
* 专家申报
* @param fProBehInforId 专家行为主键
* @return
*/
int reportProBehInfo(Long fProBehInforId) throws Exception;
}
package com.zehong.system.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zehong.system.mapper.FProBehInforBrowseMapper;
import com.zehong.system.domain.FProBehInforBrowse;
import com.zehong.system.service.IFProBehInforBrowseService;
/**
* 行业专家库-专家行为浏览Service业务层处理
*
* @author zehong
* @date 2024-05-09
*/
@Service
public class FProBehInforBrowseServiceImpl implements IFProBehInforBrowseService
{
@Autowired
private FProBehInforBrowseMapper fProBehInforBrowseMapper;
/**
* 查询行业专家库-专家行为浏览
*
* @param fProBehInforId 行业专家库-专家行为浏览ID
* @return 行业专家库-专家行为浏览
*/
@Override
public FProBehInforBrowse selectFProBehInforBrowseById(Long fProBehInforId)
{
return fProBehInforBrowseMapper.selectFProBehInforBrowseById(fProBehInforId);
}
/**
* 查询行业专家库-专家行为浏览列表
*
* @param fProBehInforBrowse 行业专家库-专家行为浏览
* @return 行业专家库-专家行为浏览
*/
@Override
public List<FProBehInforBrowse> selectFProBehInforBrowseList(FProBehInforBrowse fProBehInforBrowse)
{
return fProBehInforBrowseMapper.selectFProBehInforBrowseList(fProBehInforBrowse);
}
/**
* 新增行业专家库-专家行为浏览
*
* @param fProBehInforBrowse 行业专家库-专家行为浏览
* @return 结果
*/
@Override
public int insertFProBehInforBrowse(FProBehInforBrowse fProBehInforBrowse)
{
return fProBehInforBrowseMapper.insertFProBehInforBrowse(fProBehInforBrowse);
}
/**
* 修改行业专家库-专家行为浏览
*
* @param fProBehInforBrowse 行业专家库-专家行为浏览
* @return 结果
*/
@Override
public int updateFProBehInforBrowse(FProBehInforBrowse fProBehInforBrowse)
{
return fProBehInforBrowseMapper.updateFProBehInforBrowse(fProBehInforBrowse);
}
/**
* 批量删除行业专家库-专家行为浏览
*
* @param fProBehInforIds 需要删除的行业专家库-专家行为浏览ID
* @return 结果
*/
@Override
public int deleteFProBehInforBrowseByIds(Long[] fProBehInforIds)
{
return fProBehInforBrowseMapper.deleteFProBehInforBrowseByIds(fProBehInforIds);
}
/**
* 删除行业专家库-专家行为浏览信息
*
* @param fProBehInforId 行业专家库-专家行为浏览ID
* @return 结果
*/
@Override
public int deleteFProBehInforBrowseById(Long fProBehInforId)
{
return fProBehInforBrowseMapper.deleteFProBehInforBrowseById(fProBehInforId);
}
}
package com.zehong.system.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.zehong.common.exception.CustomException;
import com.zehong.common.utils.GovernmentDataCopyUtil;
import com.zehong.common.utils.GovernmentDataUtil;
import com.zehong.system.domain.FProBehInfor;
import com.zehong.system.domain.vo.ProAppInfoVo;
import com.zehong.system.domain.vo.ProBehInfoVo;
import com.zehong.system.mapper.FProBehInforMapper;
import com.zehong.system.service.IFProBehInforService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
* 行业专家库-专家行为申报Service业务层处理
*
* @author zehong
* @date 2024-05-09
*/
@Service
public class FProBehInforServiceImpl implements IFProBehInforService
{
private static final Logger log = LoggerFactory.getLogger(FProBehInforServiceImpl.class);
@Autowired
private FProBehInforMapper fProBehInforMapper;
@Resource
private GovernmentDataUtil governmentDataUtil;
/**
* 查询行业专家库-专家行为申报
*
* @param fProBehInforId 行业专家库-专家行为申报ID
* @return 行业专家库-专家行为申报
*/
@Override
public FProBehInfor selectFProBehInforById(Long fProBehInforId)
{
return fProBehInforMapper.selectFProBehInforById(fProBehInforId);
}
/**
* 查询行业专家库-专家行为申报列表
*
* @param fProBehInfor 行业专家库-专家行为申报
* @return 行业专家库-专家行为申报
*/
@Override
public List<FProBehInfor> selectFProBehInforList(FProBehInfor fProBehInfor)
{
return fProBehInforMapper.selectFProBehInforList(fProBehInfor);
}
/**
* 新增行业专家库-专家行为申报
*
* @param fProBehInfor 行业专家库-专家行为申报
* @return 结果
*/
@Override
public int insertFProBehInfor(FProBehInfor fProBehInfor){
fProBehInfor.setfUpdateTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
return fProBehInforMapper.insertFProBehInfor(fProBehInfor);
}
/**
* 修改行业专家库-专家行为申报
*
* @param fProBehInfor 行业专家库-专家行为申报
* @return 结果
*/
@Override
public int updateFProBehInfor(FProBehInfor fProBehInfor){
fProBehInfor.setfUpdateTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
return fProBehInforMapper.updateFProBehInfor(fProBehInfor);
}
/**
* 批量删除行业专家库-专家行为申报
*
* @param fProBehInforIds 需要删除的行业专家库-专家行为申报ID
* @return 结果
*/
@Override
public int deleteFProBehInforByIds(Long[] fProBehInforIds)
{
return fProBehInforMapper.deleteFProBehInforByIds(fProBehInforIds);
}
/**
* 删除行业专家库-专家行为申报信息
*
* @param fProBehInforId 行业专家库-专家行为申报ID
* @return 结果
*/
@Override
public int deleteFProBehInforById(Long fProBehInforId)
{
return fProBehInforMapper.deleteFProBehInforById(fProBehInforId);
}
/**
* 专家申报
* @param fProBehInforId 专家行为主键
* @return
*/
@Override
@Transactional(rollbackFor = Exception.class)
public int reportProBehInfo(Long fProBehInforId) throws Exception{
FProBehInfor updateInfo = new FProBehInfor();
updateInfo.setfProBehInforId(fProBehInforId);
updateInfo.setfRepStatus(Long.parseLong("1"));
updateInfo.setfRepDate(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
int result = fProBehInforMapper.updateFProBehInfor(updateInfo);
FProBehInfor behInfor = fProBehInforMapper.selectFProBehInforById(fProBehInforId);
ProBehInfoVo proBehInfoVo = new ProBehInfoVo();
GovernmentDataCopyUtil.copyToGovernData(behInfor,proBehInfoVo);
List<ProBehInfoVo> data = new ArrayList<>();
data.add(proBehInfoVo);
JSONObject reportResult = governmentDataUtil.setInfo("professor/behaviour/information","WRITE",data);
log.info("专家行为申报结果===================" + reportResult.toJSONString());
if(!"0".equals(reportResult.getString("resultCode"))) throw new CustomException("专家行为上报市局接口失败");
return result;
}
}
<?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.zehong.system.mapper.FProBehInforBrowseMapper">
<resultMap type="FProBehInforBrowse" id="FProBehInforBrowseResult">
<result property="fProBehInforId" column="f_pro_beh_infor_id" />
<result property="fIdNo" column="f_id_no" />
<result property="fExperEval" column="f_exper_eval" />
<result property="fSelectionEvent" column="f_selection_event" />
<result property="fSelectionStartTime" column="f_selection_start_time" />
<result property="fScorDesc" column="f_scor_desc" />
<result property="fUpdateTime" column="f_update_time" />
</resultMap>
<sql id="selectFProBehInforBrowseVo">
select f_pro_beh_infor_id, f_id_no, f_exper_eval, f_selection_event, f_selection_start_time, f_scor_desc, f_update_time from f_pro_beh_infor_browse
</sql>
<select id="selectFProBehInforBrowseList" parameterType="FProBehInforBrowse" resultMap="FProBehInforBrowseResult">
<include refid="selectFProBehInforBrowseVo"/>
<where>
<if test="fIdNo != null and fIdNo != ''"> and f_id_no like concat('%', #{fIdNo}, '%')</if>
</where>
</select>
<select id="selectFProBehInforBrowseById" parameterType="Long" resultMap="FProBehInforBrowseResult">
<include refid="selectFProBehInforBrowseVo"/>
where f_pro_beh_infor_id = #{fProBehInforId}
</select>
<insert id="insertFProBehInforBrowse" parameterType="FProBehInforBrowse" useGeneratedKeys="true" keyProperty="fProBehInforId">
insert into f_pro_beh_infor_browse
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="fIdNo != null and fIdNo != ''">f_id_no,</if>
<if test="fExperEval != null and fExperEval != ''">f_exper_eval,</if>
<if test="fSelectionEvent != null">f_selection_event,</if>
<if test="fSelectionStartTime != null">f_selection_start_time,</if>
<if test="fScorDesc != null">f_scor_desc,</if>
<if test="fUpdateTime != null">f_update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="fIdNo != null and fIdNo != ''">#{fIdNo},</if>
<if test="fExperEval != null and fExperEval != ''">#{fExperEval},</if>
<if test="fSelectionEvent != null">#{fSelectionEvent},</if>
<if test="fSelectionStartTime != null">#{fSelectionStartTime},</if>
<if test="fScorDesc != null">#{fScorDesc},</if>
<if test="fUpdateTime != null">#{fUpdateTime},</if>
</trim>
</insert>
<update id="updateFProBehInforBrowse" parameterType="FProBehInforBrowse">
update f_pro_beh_infor_browse
<trim prefix="SET" suffixOverrides=",">
<if test="fIdNo != null and fIdNo != ''">f_id_no = #{fIdNo},</if>
<if test="fExperEval != null and fExperEval != ''">f_exper_eval = #{fExperEval},</if>
<if test="fSelectionEvent != null">f_selection_event = #{fSelectionEvent},</if>
<if test="fSelectionStartTime != null">f_selection_start_time = #{fSelectionStartTime},</if>
<if test="fScorDesc != null">f_scor_desc = #{fScorDesc},</if>
<if test="fUpdateTime != null">f_update_time = #{fUpdateTime},</if>
</trim>
where f_pro_beh_infor_id = #{fProBehInforId}
</update>
<delete id="deleteFProBehInforBrowseById" parameterType="Long">
delete from f_pro_beh_infor_browse where f_pro_beh_infor_id = #{fProBehInforId}
</delete>
<delete id="deleteFProBehInforBrowseByIds" parameterType="String">
delete from f_pro_beh_infor_browse where f_pro_beh_infor_id in
<foreach item="fProBehInforId" collection="array" open="(" separator="," close=")">
#{fProBehInforId}
</foreach>
</delete>
</mapper>
\ No newline at end of file
<?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.zehong.system.mapper.FProBehInforMapper">
<resultMap type="FProBehInfor" id="FProBehInforResult">
<result property="fProBehInforId" column="f_pro_beh_infor_id" />
<result property="fIdNo" column="f_id_no" />
<result property="fExpertEval" column="f_expert_eval" />
<result property="fSelectionEvent" column="f_selection_event" />
<result property="fSelectionStartTime" column="f_selection_start_time" />
<result property="fScorDesc" column="f_scor_desc" />
<result property="fUpdateTime" column="f_update_time" />
<result property="fRepStatus" column="f_rep_status" />
<result property="fRepDate" column="f_rep_date" />
</resultMap>
<sql id="selectFProBehInforVo">
select f_pro_beh_infor_id, f_id_no, f_expert_eval, f_selection_event, f_selection_start_time, f_scor_desc, f_update_time, f_rep_status, f_rep_date from f_pro_beh_infor
</sql>
<select id="selectFProBehInforList" parameterType="FProBehInfor" resultMap="FProBehInforResult">
<include refid="selectFProBehInforVo"/>
<where>
<if test="fIdNo != null and fIdNo != ''"> and f_id_no like concat('%', #{fIdNo}, '%')</if>
<if test="fRepStatus != null "> and f_rep_status = #{fRepStatus}</if>
</where>
</select>
<select id="selectFProBehInforById" parameterType="Long" resultMap="FProBehInforResult">
<include refid="selectFProBehInforVo"/>
where f_pro_beh_infor_id = #{fProBehInforId}
</select>
<insert id="insertFProBehInfor" parameterType="FProBehInfor" useGeneratedKeys="true" keyProperty="fProBehInforId">
insert into f_pro_beh_infor
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="fIdNo != null and fIdNo != ''">f_id_no,</if>
<if test="fExpertEval != null and fExpertEval != ''">f_expert_eval,</if>
<if test="fSelectionEvent != null">f_selection_event,</if>
<if test="fSelectionStartTime != null">f_selection_start_time,</if>
<if test="fScorDesc != null">f_scor_desc,</if>
<if test="fUpdateTime != null">f_update_time,</if>
<if test="fRepStatus != null">f_rep_status,</if>
<if test="fRepDate != null">f_rep_date,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="fIdNo != null and fIdNo != ''">#{fIdNo},</if>
<if test="fExpertEval != null and fExpertEval != ''">#{fExpertEval},</if>
<if test="fSelectionEvent != null">#{fSelectionEvent},</if>
<if test="fSelectionStartTime != null">#{fSelectionStartTime},</if>
<if test="fScorDesc != null">#{fScorDesc},</if>
<if test="fUpdateTime != null">#{fUpdateTime},</if>
<if test="fRepStatus != null">#{fRepStatus},</if>
<if test="fRepDate != null">#{fRepDate},</if>
</trim>
</insert>
<update id="updateFProBehInfor" parameterType="FProBehInfor">
update f_pro_beh_infor
<trim prefix="SET" suffixOverrides=",">
<if test="fIdNo != null and fIdNo != ''">f_id_no = #{fIdNo},</if>
<if test="fExpertEval != null and fExpertEval != ''">f_expert_eval = #{fExpertEval},</if>
<if test="fSelectionEvent != null">f_selection_event = #{fSelectionEvent},</if>
<if test="fSelectionStartTime != null">f_selection_start_time = #{fSelectionStartTime},</if>
<if test="fScorDesc != null">f_scor_desc = #{fScorDesc},</if>
<if test="fUpdateTime != null">f_update_time = #{fUpdateTime},</if>
<if test="fRepStatus != null">f_rep_status = #{fRepStatus},</if>
<if test="fRepDate != null">f_rep_date = #{fRepDate},</if>
</trim>
where f_pro_beh_infor_id = #{fProBehInforId}
</update>
<delete id="deleteFProBehInforById" parameterType="Long">
delete from f_pro_beh_infor where f_pro_beh_infor_id = #{fProBehInforId}
</delete>
<delete id="deleteFProBehInforByIds" parameterType="String">
delete from f_pro_beh_infor where f_pro_beh_infor_id in
<foreach item="fProBehInforId" collection="array" open="(" separator="," close=")">
#{fProBehInforId}
</foreach>
</delete>
</mapper>
\ No newline at end of file
import request from '@/utils/request'
// 查询行业专家库-专家行为浏览列表
export function listBrowse(query) {
return request({
url: '/specialist/behBrowse/list',
method: 'get',
params: query
})
}
// 查询行业专家库-专家行为浏览详细
export function getBrowse(fProBehInforId) {
return request({
url: '/specialist/behBrowse/' + fProBehInforId,
method: 'get'
})
}
// 新增行业专家库-专家行为浏览
export function addBrowse(data) {
return request({
url: '/specialist/behBrowse',
method: 'post',
data: data
})
}
// 修改行业专家库-专家行为浏览
export function updateBrowse(data) {
return request({
url: '/specialist/behBrowse',
method: 'put',
data: data
})
}
// 删除行业专家库-专家行为浏览
export function delBrowse(fProBehInforId) {
return request({
url: '/specialist/behBrowse/' + fProBehInforId,
method: 'delete'
})
}
// 导出行业专家库-专家行为浏览
export function exportBrowse(query) {
return request({
url: '/specialist/behBrowse/export',
method: 'get',
params: query
})
}
import request from '@/utils/request'
// 查询行业专家库-专家行为申报列表
export function listInfor(query) {
return request({
url: '/specialist/behInfo/list',
method: 'get',
params: query
})
}
// 查询行业专家库-专家行为申报详细
export function getInfor(fProBehInforId) {
return request({
url: '/specialist/behInfo/' + fProBehInforId,
method: 'get'
})
}
// 新增行业专家库-专家行为申报
export function addInfor(data) {
return request({
url: '/specialist/behInfo',
method: 'post',
data: data
})
}
// 修改行业专家库-专家行为申报
export function updateInfor(data) {
return request({
url: '/specialist/behInfo',
method: 'put',
data: data
})
}
// 删除行业专家库-专家行为申报
export function delInfor(fProBehInforId) {
return request({
url: '/specialist/behInfo/' + fProBehInforId,
method: 'delete'
})
}
// 导出行业专家库-专家行为申报
export function exportInfor(query) {
return request({
url: '/specialist/behInfo/export',
method: 'get',
params: query
})
}
//申报
export function reportProBehInfo(query) {
return request({
url: '/specialist/behInfo/reportProBehInfo',
method: 'get',
params: query
})
}
<template>
<el-dialog title="详情" :visible.sync="detailOpen" width="500px" append-to-body destroy-on-close :close-on-click-modal="false">
<el-form label-width="120px">
<el-form-item label="身份证号">
<span v-if="detailInfo.fIdNo">{{ detailInfo.fIdNo }}</span>
<span v-else>-</span>
</el-form-item>
<el-form-item label="专家表现评价">
<span v-if="detailInfo.fExperEval">{{ detailInfo.fExperEval }}</span>
<span v-else>-</span>
</el-form-item>
<el-form-item label="选用事件">
<span v-if="detailInfo.fSelectionEvent">{{ detailInfo.fSelectionEvent }}</span>
<span v-else>-</span>
</el-form-item>
<el-form-item label="选用开始时间" prop="fSelectionStartTime">
<span v-if="detailInfo.fSelectionStartTime">{{ detailInfo.fSelectionStartTime }}</span>
<span v-else>-</span>
</el-form-item>
<el-form-item label="评分说明" prop="fScorDesc">
<span v-if="detailInfo.fScorDesc">{{ detailInfo.fScorDesc }}</span>
<span v-else>-</span>
</el-form-item>
<el-form-item label="最后修改时间" prop="fUpdateTime">
<span v-if="detailInfo.fUpdateTime">{{ detailInfo.fUpdateTime }}</span>
<span v-else>-</span>
</el-form-item>
</el-form>
</el-dialog>
</template>
<script>
import { getBrowse } from "@/api/specialist/behBrowse";
export default {
name: "detail-info",
data(){
return{
detailInfo: {},
detailOpen: false
}
},
methods:{
getDetailInfo(id){
getBrowse(id).then(res =>{
if(res.code == 200 && res.data){
this.detailInfo = res.data;
this.detailOpen = true;
}
})
}
}
}
</script>
<style scoped>
</style>
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="身份证号" prop="fIdNo">
<el-input
v-model="queryParams.fIdNo"
placeholder="请输入身份证号"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<!--<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['specialist:behBrowse:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['specialist:behBrowse:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['specialist:behBrowse:remove']"
>删除</el-button>
</el-col>-->
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
:loading="exportLoading"
@click="handleExport"
v-hasPermi="['specialist:behBrowse:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="browseList">
<el-table-column label="身份证号" align="center" prop="fIdNo" />
<el-table-column label="专家表现评价" align="center" prop="fExperEval" :show-overflow-tooltip="true"/>
<el-table-column label="选用事件" align="center" prop="fSelectionEvent" :show-overflow-tooltip="true"/>
<el-table-column label="选用开始时间" align="center" prop="fSelectionStartTime" />
<el-table-column label="评分说明" align="center" prop="fScorDesc" :show-overflow-tooltip="true"/>
<el-table-column label="最后修改时间" align="center" prop="fUpdateTime" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-document"
@click="handleDetail(scope.row)"
v-hasPermi="['specialist:behBrowse:query']"
>详情</el-button>
<!--<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['specialist:behBrowse:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['specialist:behBrowse:remove']"
>删除</el-button>-->
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改行业专家库-专家行为浏览对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="身份证号" prop="fIdNo">
<el-input v-model="form.fIdNo" placeholder="请输入身份证号" />
</el-form-item>
<el-form-item label="专家表现评价" prop="fExperEval">
<el-input v-model="form.fExperEval" placeholder="请输入专家表现评价" />
</el-form-item>
<el-form-item label="选用事件" prop="fSelectionEvent">
<el-input v-model="form.fSelectionEvent" placeholder="请输入选用事件" />
</el-form-item>
<el-form-item label="选用开始时间" prop="fSelectionStartTime">
<el-input v-model="form.fSelectionStartTime" placeholder="请输入选用开始时间" />
</el-form-item>
<el-form-item label="评分说明" prop="fScorDesc">
<el-input v-model="form.fScorDesc" placeholder="请输入评分说明" />
</el-form-item>
<el-form-item label="最后修改时间" prop="fUpdateTime">
<el-input v-model="form.fUpdateTime" placeholder="请输入最后修改时间" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
<!-- 详情 -->
<DetailInfo ref="detail"/>
</div>
</template>
<script>
import { listBrowse, getBrowse, delBrowse, addBrowse, updateBrowse, exportBrowse } from "@/api/specialist/behBrowse";
import DetailInfo from "./components/DetailInfo";
export default {
name: "Browse",
components: {
DetailInfo
},
data() {
return {
loading: true,
// 导出遮罩层
exportLoading: false,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 行业专家库-专家行为浏览表格数据
browseList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
fIdNo: null,
},
// 表单参数
form: {},
// 表单校验
rules: {
fIdNo: [
{ required: true, message: "身份证号不能为空", trigger: "blur" }
],
fExperEval: [
{ required: true, message: "专家表现评价不能为空", trigger: "blur" }
],
}
};
},
created() {
this.getList();
},
methods: {
/** 查询行业专家库-专家行为浏览列表 */
getList() {
this.loading = true;
listBrowse(this.queryParams).then(response => {
this.browseList = response.rows;
this.total = response.total;
this.loading = false;
});
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
fProBehInforId: null,
fIdNo: null,
fExperEval: null,
fSelectionEvent: null,
fSelectionStartTime: null,
fScorDesc: null,
fUpdateTime: null
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.fProBehInforId)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加行业专家库-专家行为浏览";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const fProBehInforId = row.fProBehInforId || this.ids
getBrowse(fProBehInforId).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改行业专家库-专家行为浏览";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.fProBehInforId != null) {
updateBrowse(this.form).then(response => {
this.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addBrowse(this.form).then(response => {
this.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const fProBehInforIds = row.fProBehInforId || this.ids;
this.$confirm('是否确认删除行业专家库-专家行为浏览编号为"' + fProBehInforIds + '"的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return delBrowse(fProBehInforIds);
}).then(() => {
this.getList();
this.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
this.$confirm('是否确认导出所有行业专家库-专家行为浏览数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.exportLoading = true;
return exportBrowse(queryParams);
}).then(response => {
this.download(response.msg);
this.exportLoading = false;
}).catch(() => {});
},
//详情
handleDetail(row){
this.$refs.detail.getDetailInfo(row.fProBehInforId);
},
}
};
</script>
<template>
<el-dialog title="详情" :visible.sync="detailOpen" width="500px" append-to-body destroy-on-close :close-on-click-modal="false">
<el-form label-width="120px">
<el-form-item label="身份证号">
<span v-if="detailInfo.fIdNo">{{ detailInfo.fIdNo }}</span>
<span v-else>-</span>
</el-form-item>
<el-form-item label="专家表现评价">
<span v-if="detailInfo.fExperEval">{{ detailInfo.fExperEval }}</span>
<span v-else>-</span>
</el-form-item>
<el-form-item label="选用事件">
<span v-if="detailInfo.fSelectionEvent">{{ detailInfo.fSelectionEvent }}</span>
<span v-else>-</span>
</el-form-item>
<el-form-item label="选用开始时间">
<span v-if="detailInfo.fSelectionStartTime">{{ detailInfo.fSelectionStartTime }}</span>
<span v-else>-</span>
</el-form-item>
<el-form-item label="评分说明">
<span v-if="detailInfo.fScorDesc">{{ detailInfo.fScorDesc }}</span>
<span v-else>-</span>
</el-form-item>
<el-form-item label="最后修改时间">
<span v-if="detailInfo.fUpdateTime">{{ detailInfo.fUpdateTime }}</span>
<span v-else>-</span>
</el-form-item>
<el-form-item label="申报状态">
<span v-if="detailInfo.fRepStatus">{{ $parent.fRepStatusFormat(detailInfo) }}</span>
<span v-else>-</span>
</el-form-item>
<el-form-item label="申报时间">
<span v-if="detailInfo.fRepDate">{{ detailInfo.fRepDate }}</span>
<span v-else>-</span>
</el-form-item>
</el-form>
</el-dialog>
</template>
<script>
import { getInfor } from "@/api/specialist/behInfo";
export default {
name: "detail-info",
data(){
return{
detailInfo: {},
detailOpen: false
}
},
methods:{
getDetailInfo(id){
getInfor(id).then(res =>{
if(res.code == 200 && res.data){
this.detailInfo = res.data;
this.detailOpen = true;
}
})
}
}
}
</script>
<style scoped>
</style>
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="身份证号" prop="fIdNo">
<el-input
v-model="queryParams.fIdNo"
placeholder="请输入身份证号"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="申报状态" prop="fRepStatus">
<el-select v-model="queryParams.fRepStatus" placeholder="请选择申报状态" clearable size="small">
<el-option
v-for="dict in fRepStatusOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['specialist:behInfo:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['specialist:behInfo:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['specialist:behInfo:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
:loading="exportLoading"
@click="handleExport"
v-hasPermi="['specialist:behInfo:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="inforList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="身份证号" align="center" prop="fIdNo" />
<el-table-column label="专家表现评价" align="center" prop="fExpertEval" :show-overflow-tooltip="true"/>
<el-table-column label="选用事件" align="center" prop="fSelectionEvent" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span v-if="scope.row.fSelectionEvent != null">{{ scope.row.fSelectionEvent }}</span>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column label="选用开始时间" align="center" prop="fSelectionStartTime" width="150">
<template slot-scope="scope">
<span v-if="scope.row.fSelectionStartTime != null">{{ scope.row.fSelectionStartTime }}</span>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column label="评分说明" align="center" prop="fScorDesc" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span v-if="scope.row.fScorDesc != null">{{ scope.row.fScorDesc }}</span>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column label="最后修改时间" align="center" prop="fUpdateTime" width="150"/>
<el-table-column label="申报状态" align="center" prop="fRepStatus" :formatter="fRepStatusFormat" />
<el-table-column label="申报时间" align="center" prop="fRepDate">
<template slot-scope="scope">
<span v-if="scope.row.fRepDate != null">{{ scope.row.fRepDate }}</span>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-document"
@click="handleDetail(scope.row)"
v-hasPermi="['specialist:behInfo:query']"
>详情</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['specialist:behInfo:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['specialist:behInfo:remove']"
>删除</el-button>
<el-button
size="mini"
type="text"
@click="handleReport(scope.row)"
v-if="scope.row.fRepStatus == 2"
v-hasPermi="['specialist:behInfo:report']"
>申报</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改专家行为申报对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body append-to-body destroy-on-close :close-on-click-modal="false">
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-form-item label="身份证号" prop="fIdNo">
<el-input v-model="form.fIdNo" placeholder="请输入身份证号" :maxlength="18"/>
</el-form-item>
<el-form-item label="专家表现评价" prop="fExpertEval">
<el-input type="textarea" v-model="form.fExpertEval" placeholder="请输入专家表现评价" />
</el-form-item>
<el-form-item label="选用事件" prop="fSelectionEvent">
<el-input type="textarea" v-model="form.fSelectionEvent" placeholder="请输入选用事件" />
</el-form-item>
<el-form-item label="选用开始时间" prop="fSelectionStartTime">
<el-date-picker
style="width: 100%"
v-model="form.fSelectionStartTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择选用开始时间">
</el-date-picker>
</el-form-item>
<el-form-item label="评分说明" prop="fScorDesc">
<el-input type="textarea" v-model="form.fScorDesc" placeholder="请输入评分说明" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
<!-- 详情 -->
<DetailInfo ref="detail"/>
</div>
</template>
<script>
import { listInfor, getInfor, delInfor, addInfor, updateInfor, exportInfor, reportProBehInfo } from "@/api/specialist/behInfo";
import DetailInfo from "./components/DetailInfo";
export default {
name: "Infor",
components: {
DetailInfo
},
data() {
return {
// 遮罩层
loading: true,
// 导出遮罩层
exportLoading: false,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 专家行为申报表格数据
inforList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 申报状态:1 已上报,2 未上报,3 已通过,4未通过 字典
fRepStatusOptions: [],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
fIdNo: null,
fRepStatus: null,
},
// 表单参数
form: {},
// 表单校验
rules: {
fIdNo: [
{ required: true, message: "身份证号不能为空", trigger: "blur" },
{
pattern: /(^\d{15}$)|(^\d{17}([0-9]|X)$)/,
message: '身份证号格式有误!',
trigger: 'blur'
}
],
fExpertEval: [
{ required: true, message: "专家表现评价不能为空", trigger: "blur" }
],
}
};
},
created() {
this.getList();
this.getDicts("t_rep_status").then(response => {
this.fRepStatusOptions = response.data;
});
},
methods: {
/** 查询专家行为申报列表 */
getList() {
this.loading = true;
listInfor(this.queryParams).then(response => {
this.inforList = response.rows;
this.total = response.total;
this.loading = false;
});
},
// 申报状态:1 已上报,2 未上报,3 已通过,4未通过 字典翻译
fRepStatusFormat(row, column) {
return this.selectDictLabel(this.fRepStatusOptions, row.fRepStatus);
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
fProBehInforId: null,
fIdNo: null,
fExpertEval: null,
fSelectionEvent: null,
fSelectionStartTime: null,
fScorDesc: null,
fUpdateTime: null,
fRepStatus: null,
fRepDate: null
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.fProBehInforId)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加专家行为申报";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const fProBehInforId = row.fProBehInforId || this.ids
getInfor(fProBehInforId).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改专家行为申报";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.fProBehInforId != null) {
updateInfor(this.form).then(response => {
this.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addInfor(this.form).then(response => {
this.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const fProBehInforIds = row.fProBehInforId || this.ids;
this.$confirm('是否确认删除专家行为申报编号为"' + fProBehInforIds + '"的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return delInfor(fProBehInforIds);
}).then(() => {
this.getList();
this.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
this.$confirm('是否确认导出所有专家行为申报数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.exportLoading = true;
return exportInfor(queryParams);
}).then(response => {
this.download(response.msg);
this.exportLoading = false;
}).catch(() => {});
},
//详情
handleDetail(row){
this.$refs.detail.getDetailInfo(row.fProBehInforId);
},
//申报
handleReport(row){
this.$confirm('是否确认申报该专家行为数据?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return reportProBehInfo({ fProBehInforId : row.fProBehInforId});
}).then(() => {
this.getList();
this.msgSuccess("行业专家申报成功");
}).catch(() => {});
}
}
};
</script>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment