Commit 7e1df1e3 authored by caotao's avatar caotao

1.撤回接口调整。

2.新增根据公司人员获取接口。 3.调整根据申请时间过滤不生效问题。
parent 766b7009
...@@ -15,6 +15,6 @@ import org.apache.ibatis.annotations.Param; ...@@ -15,6 +15,6 @@ import org.apache.ibatis.annotations.Param;
public interface JyjcOpeningApplicationMapper extends BaseMapper<JyjcOpeningApplication> { public interface JyjcOpeningApplicationMapper extends BaseMapper<JyjcOpeningApplication> {
Page<JyjcOpeningApplicationModel> selectJyjcOpeningApplicationList(@Param("page")Page<JyjcOpeningApplication> page, Page<JyjcOpeningApplicationModel> selectJyjcOpeningApplicationList(@Param("page")Page<JyjcOpeningApplication> page,
@Param("jyjcOpeningApplicationModel") JyjcOpeningApplicationModel jyjcOpeningApplicationModel); @Param("jyjcOpeningApplicationModel") JyjcOpeningApplicationModel jyjcOpeningApplicationModel,@Param("applyStartTime") String applyStartTime,@Param("applyendTime") String applyendTime);
} }
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
workflow_prostance_id, workflow_prostance_id,
workflow_role, workflow_role,
unit_code_name, unit_code_name,
status,
status_name status_name
from tz_jyjc_opening_application from tz_jyjc_opening_application
<where> <where>
...@@ -33,13 +34,16 @@ ...@@ -33,13 +34,16 @@
and unit_code like concat('%',#{jyjcOpeningApplicationModel.unitCode},'%') and unit_code like concat('%',#{jyjcOpeningApplicationModel.unitCode},'%')
</if> </if>
<if test="jyjcOpeningApplicationModel.acceptDate != '' and jyjcOpeningApplicationModel.acceptDate != null"> <if test="jyjcOpeningApplicationModel.acceptDate != '' and jyjcOpeningApplicationModel.acceptDate != null">
and accept_date like concat('%',#{jyjcOpeningApplicationModel.acceptDate},'%') and accept_date = #{jyjcOpeningApplicationModel.acceptDate},
</if> </if>
<if test="jyjcOpeningApplicationModel.status != '' and jyjcOpeningApplicationModel.status != null"> <if test="jyjcOpeningApplicationModel.status != '' and jyjcOpeningApplicationModel.status != null">
and status like concat('%',#{jyjcOpeningApplicationModel.status},'%') and status = #{jyjcOpeningApplicationModel.status}
</if>
<if test="applyendTime != '' and applyendTime != null">
and apply_time &lt;= #{applyendTime}
</if> </if>
<if test="jyjcOpeningApplicationModel.applyTime != '' and jyjcOpeningApplicationModel.applyTime != null"> <if test="applyStartTime != '' and applyStartTime != null">
and apply_time like concat('%',#{jyjcOpeningApplicationModel.applyTime},'%') and apply_time &gt;=#{applyStartTime}
</if> </if>
</where> </where>
......
package com.yeejoin.amos.boot.module.jyjc.biz.controller;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.module.jyjc.api.entity.JyjcOpeningApplication;
import com.yeejoin.amos.boot.module.jyjc.api.model.JyjcOpeningApplicationModel;
import com.yeejoin.amos.boot.module.jyjc.biz.config.BaseException;
import com.yeejoin.amos.boot.module.jyjc.biz.service.impl.CommonserviceImpl;
import com.yeejoin.amos.boot.module.jyjc.biz.service.impl.JyjcOpeningApplicationServiceImpl;
import com.yeejoin.amos.boot.module.ymt.api.dto.TzsUserInfoDto;
import com.yeejoin.amos.boot.module.ymt.api.entity.TzsUserInfo;
import com.yeejoin.amos.feign.privilege.Privilege;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import com.yeejoin.amos.feign.privilege.model.RoleModel;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.typroject.tyboot.core.foundation.context.RequestContext;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import javax.servlet.http.HttpServletRequest;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
*
* @author system_generator
* @date 2023-12-13
*/
@RestController
@Api(tags = "公共接口controller")
@RequestMapping(value = "/common")
public class CommonController extends BaseController {
@Autowired
CommonserviceImpl commonserviceImpl;
/**
* 新增
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/getJyjcPersonByUnitCode")
@ApiOperation(httpMethod = "GET", value = "根据公司的unitCode获取检测检验人员列表", notes = "根据公司的unitCode获取检测检验人员列表")
public ResponseModel<List<TzsUserInfo>> getUserInfosByUnitCode(@RequestParam String unitCode) {
return ResponseHelper.buildResponse(commonserviceImpl.getUserInfosByUnitCode(unitCode));
}
}
...@@ -186,7 +186,7 @@ public class JyjcOpeningApplicationController extends BaseController { ...@@ -186,7 +186,7 @@ public class JyjcOpeningApplicationController extends BaseController {
*/ */
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET",value = "撤回业务开通申请", notes = "撤回业务开通申请") @ApiOperation(httpMethod = "GET",value = "撤回业务开通申请", notes = "撤回业务开通申请")
@GetMapping(value = "/stopFlow") @GetMapping(value = "/rollBackFlow")
public void overflow( @RequestParam("instanceId") String instanceId) { public void overflow( @RequestParam("instanceId") String instanceId) {
jyjcOpeningApplicationServiceImpl.stopFlow(instanceId); jyjcOpeningApplicationServiceImpl.stopFlow(instanceId);
} }
......
...@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.jyjc.biz.feign; ...@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.jyjc.biz.feign;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.yeejoin.amos.boot.biz.common.feign.MultipartSupportConfig; import com.yeejoin.amos.boot.biz.common.feign.MultipartSupportConfig;
import com.yeejoin.amos.component.feign.model.FeignClientResult; import com.yeejoin.amos.component.feign.model.FeignClientResult;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.openfeign.FeignClient; import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
...@@ -56,6 +57,7 @@ public interface WorkflowFeignClient { ...@@ -56,6 +57,7 @@ public interface WorkflowFeignClient {
@RequestHeader(name="token",required = true) String token, @RequestHeader(name="token",required = true) String token,
@PathVariable(value = "processInstanceId") String processInstanceId); @PathVariable(value = "processInstanceId") String processInstanceId);
@RequestMapping(value = "/v2/task/rollBack/{processInstanceId}", method = RequestMethod.POST)
JSONObject rollBack(@PathVariable(value = "processInstanceId") String processInstanceId);
} }
package com.yeejoin.amos.boot.module.jyjc.biz.service.impl; package com.yeejoin.amos.boot.module.jyjc.biz.service.impl;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams; import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.biz.common.utils.RedisKey; import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
import com.yeejoin.amos.boot.biz.common.utils.RedisUtils; import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import com.yeejoin.amos.boot.module.ymt.api.entity.TzsUserInfo;
import com.yeejoin.amos.boot.module.ymt.api.mapper.TzsUserInfoMapper;
import org.apache.xmlbeans.impl.xb.xsdschema.Public;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.foundation.context.RequestContext; import org.typroject.tyboot.core.foundation.context.RequestContext;
import java.util.List;
@Service @Service
public class CommonserviceImpl { public class CommonserviceImpl {
@Value("${jyjc.user-post:6615}")
private String jyjcUserPost;
@Autowired @Autowired
RedisUtils redisUtils; RedisUtils redisUtils;
@Autowired
TzsUserInfoMapper userInfoMapper;
/** /**
* @description 获取当前用户注册信息
* @return ReginParams * @return ReginParams
* @description 获取当前用户注册信息
*/ */
ReginParams getReginParamsOfCurrentUser() { public ReginParams getReginParamsOfCurrentUser() {
ReginParams reginParams = JSONObject.parseObject(redisUtils.get(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken())).toString(), ReginParams.class); ReginParams reginParams = JSONObject.parseObject(redisUtils.get(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken())).toString(), ReginParams.class);
return reginParams; return reginParams;
} }
public List<TzsUserInfo> getUserInfosByUnitCode(String unitCode) {
QueryWrapper userInfoQueryWrapper = new QueryWrapper<>();
userInfoQueryWrapper.eq("unit_code", unitCode);
userInfoQueryWrapper.like("post", jyjcUserPost);
List<TzsUserInfo> userInfos = userInfoMapper.selectList(userInfoQueryWrapper);
return userInfos;
}
} }
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