add: 政策课题模块增删改查
This commit is contained in:
+39
@@ -0,0 +1,39 @@
|
||||
package com.adc.da.workFlow.controller;
|
||||
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.workFlow.service.ActSarItemMeetingEOService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* @author tjzdw
|
||||
* @description
|
||||
* @date 2023/10/16
|
||||
*/
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/${restPath}/lawss/meeting")
|
||||
@Api(description = "|InsideOutsideMeeting|")
|
||||
public class ActSarItemMeetingEOController {
|
||||
|
||||
@Resource
|
||||
private ActSarItemMeetingEOService meetingEOService;
|
||||
|
||||
|
||||
@ApiOperation(value = "|SarLawsStandInfo|内外部会议入库")
|
||||
@PostMapping("/processCreateMeeting")
|
||||
public ResponseMessage<String> processCreateMeeting(String infoJson) throws Exception {
|
||||
if (StringUtils.isBlank(infoJson)) {
|
||||
return Result.error("传入数据json不能为空");
|
||||
}
|
||||
meetingEOService.processCreateMeeting(infoJson);
|
||||
return Result.success("入库成功");
|
||||
}
|
||||
}
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
package com.adc.da.workFlow.service;
|
||||
|
||||
import com.adc.da.exception.AdcDaBaseException;
|
||||
import com.adc.da.slrs.InsideOntSideMeeting.entity.InsideOutsideMeeting;
|
||||
import com.adc.da.slrs.InsideOntSideMeeting.service.InsideOutsideMeetingService;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Propagation;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @author tjzdw
|
||||
* @description
|
||||
* @date 2023/10/16
|
||||
*/
|
||||
@Service
|
||||
@Transactional(value = "transactionManager", readOnly = false, propagation = Propagation.REQUIRED, rollbackFor = Throwable.class)
|
||||
public class ActSarItemMeetingEOService {
|
||||
|
||||
@Resource
|
||||
private InsideOutsideMeetingService meetingService;
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(ActSarItemMeetingEOService.class);
|
||||
|
||||
public void processCreateMeeting(String meetingInfo) throws Exception{
|
||||
Map<String,Object> standMap = new HashMap<>();
|
||||
standMap = JSONObject.parseObject(meetingInfo);
|
||||
if (standMap == null || standMap.isEmpty()) {
|
||||
throw new AdcDaBaseException("入库失败,会议信息出错");
|
||||
}
|
||||
String prcNum = String.valueOf(standMap.get("prcNum"));
|
||||
String meetingName = String.valueOf(standMap.get("meetingName"));
|
||||
InsideOutsideMeeting insideOutsideMeeting = JSONObject.parseObject(meetingInfo, InsideOutsideMeeting.class);
|
||||
System.out.println(insideOutsideMeeting);
|
||||
meetingService.addMeetingInfo(insideOutsideMeeting);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user