add:政策课题入会流程
This commit is contained in:
+48
@@ -0,0 +1,48 @@
|
||||
package com.adc.da.workFlow.controller;
|
||||
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.workFlow.service.ActSarLawsTopicEOService;
|
||||
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/25
|
||||
*/
|
||||
|
||||
@Api("政策课题")
|
||||
@RestController
|
||||
@RequestMapping("/${restPath}/lawss/sarLawsTopic")
|
||||
public class ActSarLawsTopicEOController {
|
||||
|
||||
@Resource
|
||||
private ActSarLawsTopicEOService lawsTopicEOService;
|
||||
|
||||
@ApiOperation("政策课题入会")
|
||||
@PostMapping("/processLawsTopicMembership")
|
||||
public ResponseMessage<String> processLawsTopicMembership(String infoJson){
|
||||
if (StringUtils.isBlank(infoJson)) {
|
||||
return Result.error("传入数据json不能为空");
|
||||
}
|
||||
lawsTopicEOService.processLawsTopicMembership(infoJson);
|
||||
return Result.success("入会成功");
|
||||
}
|
||||
|
||||
@ApiOperation("政策课题参会")
|
||||
@PostMapping("/processLawsTopicParticipation")
|
||||
public ResponseMessage<String> processLawsTopicParticipation(String infoJson){
|
||||
if (StringUtils.isBlank(infoJson)) {
|
||||
return Result.error("传入数据json不能为空");
|
||||
}
|
||||
lawsTopicEOService.processLawsTopicParticipation(infoJson);
|
||||
return Result.success("参会成功");
|
||||
}
|
||||
}
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
package com.adc.da.workFlow.service;
|
||||
|
||||
import com.adc.da.exception.AdcDaBaseException;
|
||||
import com.adc.da.slrs.sarLawsTopic.entity.SarLawsTopic;
|
||||
import com.adc.da.slrs.sarLawsTopic.service.SarLawsTopicService;
|
||||
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;
|
||||
|
||||
/**
|
||||
* @author tjzdw
|
||||
* @description
|
||||
* @date 2023/10/25
|
||||
*/
|
||||
@Service
|
||||
@Transactional(value = "transactionManager", readOnly = false, propagation = Propagation.REQUIRED, rollbackFor = Throwable.class)
|
||||
public class ActSarLawsTopicEOService {
|
||||
|
||||
@Resource
|
||||
private SarLawsTopicService lawsTopicService;
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(ActSarLawsTopicEOService.class);
|
||||
|
||||
public void processLawsTopicMembership(String lawsTopicInfo) {
|
||||
SarLawsTopic sarLawsTopic = JSONObject.parseObject(lawsTopicInfo, SarLawsTopic.class);
|
||||
if (sarLawsTopic == null) {
|
||||
throw new AdcDaBaseException("入库失败,政策课题信息出错");
|
||||
}
|
||||
logger.info("政策课题入会:" + sarLawsTopic);
|
||||
lawsTopicService.addLawsTopicInfo(sarLawsTopic);
|
||||
}
|
||||
|
||||
public void processLawsTopicParticipation(String infoJson) {
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user