Merge branch 'baotou-signup' of e.coding.net:tsteam/btsaqscksfwpt/system-examination-signup into baotou-signup
This commit is contained in:
commit
9992824733
@ -40,6 +40,21 @@ public class ApplyController extends DefaultBaseController {
|
|||||||
private IApplyService applyService;
|
private IApplyService applyService;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation(value = "报名信息报道", notes = "报名信息报道接口")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "applyId", value = "报名信息ID", paramType = "path"),
|
||||||
|
})
|
||||||
|
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||||
|
@PutMapping("updateInstitutionId/{targetId}")
|
||||||
|
@CheckRequestBodyAnnotation
|
||||||
|
public SuccessResult updateInstitutionId(@PathVariable("targetId") String targetId) {
|
||||||
|
Map<String, Object> params = requestParams();
|
||||||
|
String sourceIds = params.get("sourceIds").toString();
|
||||||
|
applyService.updateInstitutionId(targetId,Arrays.asList(sourceIds.split(",")));
|
||||||
|
return new SuccessResult();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ApiOperation(value = "自定义新增报名信息", notes = "自定义新增报名信息")
|
@ApiOperation(value = "自定义新增报名信息", notes = "自定义新增报名信息")
|
||||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||||
|
@ -16,6 +16,8 @@ public class ApplyDTO {
|
|||||||
|
|
||||||
@ApiModelProperty(name = "applyInstitutionId", value = "报名机构ID")
|
@ApiModelProperty(name = "applyInstitutionId", value = "报名机构ID")
|
||||||
private String applyInstitutionId;
|
private String applyInstitutionId;
|
||||||
|
@ApiModelProperty(name = "applyInstitutionName", value = "报名机构中文名称")
|
||||||
|
private String applyInstitutionName;
|
||||||
@ApiModelProperty(name = "applyId", value = "报名信息ID")
|
@ApiModelProperty(name = "applyId", value = "报名信息ID")
|
||||||
private String applyId;
|
private String applyId;
|
||||||
@ApiModelProperty(name = "applyClassId", value = "报名班级ID")
|
@ApiModelProperty(name = "applyClassId", value = "报名班级ID")
|
||||||
@ -96,6 +98,14 @@ public class ApplyDTO {
|
|||||||
this.applyInstitutionId = applyInstitutionId;
|
this.applyInstitutionId = applyInstitutionId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getApplyInstitutionName() {
|
||||||
|
return applyInstitutionName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setApplyInstitutionName(String applyInstitutionName) {
|
||||||
|
this.applyInstitutionName = applyInstitutionName;
|
||||||
|
}
|
||||||
|
|
||||||
public String getApplyId() {
|
public String getApplyId() {
|
||||||
return applyId == null ? "" : applyId.trim();
|
return applyId == null ? "" : applyId.trim();
|
||||||
}
|
}
|
||||||
|
@ -22,6 +22,13 @@ import java.util.Map;
|
|||||||
**/
|
**/
|
||||||
public interface IApplyService {
|
public interface IApplyService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改报名机构
|
||||||
|
* @param targetId 目标id
|
||||||
|
* @param sourceIds 源id
|
||||||
|
*/
|
||||||
|
void updateInstitutionId(String targetId,List<String> sourceIds);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 自定义新增报名信息
|
* 自定义新增报名信息
|
||||||
* @param applyVO
|
* @param applyVO
|
||||||
|
@ -86,12 +86,41 @@ public class ApplyServiceImpl extends DefaultBaseService implements IApplyServic
|
|||||||
@Autowired
|
@Autowired
|
||||||
private ServerProperties serverProperties;
|
private ServerProperties serverProperties;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改报名机构
|
||||||
|
* @param targetId 目标id
|
||||||
|
* @param sourceIds 源id
|
||||||
|
*/
|
||||||
|
public void updateInstitutionId(String targetId,List<String> sourceIds){
|
||||||
|
InstitutionDTO institutionDTO = iInstitutionService.get(targetId);
|
||||||
|
if(institutionDTO != null){
|
||||||
|
throw new SearchException("未查询到目标机构信息");
|
||||||
|
}
|
||||||
|
Map<String,Object> params = new HashMap<>();
|
||||||
|
for (String sourceId : sourceIds) {
|
||||||
|
params.put("applyInstitutionId",sourceId);
|
||||||
|
List<ApplyDTO> applyDTOList = this.list(params);//查询源报名的人
|
||||||
|
for (ApplyDTO applyDTO : applyDTOList) {
|
||||||
|
Map<String,Object> updateParams = new HashMap<>();
|
||||||
|
updateParams.put("applyId",applyDTO.getApplyId());
|
||||||
|
updateParams.put("applyInstitutionId",applyDTO.getApplyInstitutionId());
|
||||||
|
applyDao.update(params);
|
||||||
|
//增加操作日志
|
||||||
|
ApplyAuditLogVO auditLogVO = new ApplyAuditLogVO();
|
||||||
|
auditLogVO.setApplyId(applyDTO.getApplyId());
|
||||||
|
auditLogVO.setApplyAuditState(0);
|
||||||
|
InstitutionDTO sourceInstitutionDTO = iInstitutionService.get(applyDTO.getApplyInstitutionId());
|
||||||
|
if(sourceInstitutionDTO != null){
|
||||||
|
throw new SearchException("未查询到源机构信息");
|
||||||
|
}
|
||||||
|
auditLogVO.setApplyAuditExplain("【因报名人数不足】 报名培训机构 由原【"+sourceInstitutionDTO.getInstitutionName()+"】培训机构 调整到【"+institutionDTO.getInstitutionName()+"】培训机构");
|
||||||
|
applyAuditLogService.save(null,auditLogVO);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private ISystemConfigManager systemConfigManager;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public String saveRelationReturnId(ApplyVO applyVO){
|
public String saveRelationReturnId(ApplyVO applyVO){
|
||||||
String applyId = UUIDUtil.getUUID();
|
String applyId = UUIDUtil.getUUID();
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
<resultMap id="applyDTO" type="cn.com.tenlion.pojo.dtos.apply.ApplyDTO">
|
<resultMap id="applyDTO" type="cn.com.tenlion.pojo.dtos.apply.ApplyDTO">
|
||||||
<result column="apply_institution_id" property="applyInstitutionId"/>
|
<result column="apply_institution_id" property="applyInstitutionId"/>
|
||||||
|
<result column="apply_institution_name" property="applyInstitutionName"/>
|
||||||
<result column="apply_id" property="applyId"/>
|
<result column="apply_id" property="applyId"/>
|
||||||
<result column="apply_class_id" property="applyClassId"/>
|
<result column="apply_class_id" property="applyClassId"/>
|
||||||
<result column="apply_class_name" property="applyClassName"/>
|
<result column="apply_class_name" property="applyClassName"/>
|
||||||
@ -275,6 +276,7 @@
|
|||||||
<select id="get" parameterType="map" resultMap="applyDTO">
|
<select id="get" parameterType="map" resultMap="applyDTO">
|
||||||
SELECT
|
SELECT
|
||||||
t1.apply_institution_id,
|
t1.apply_institution_id,
|
||||||
|
m1.institution_name AS apply_institution_name,
|
||||||
t1.apply_class_id,
|
t1.apply_class_id,
|
||||||
t1.apply_class_name,
|
t1.apply_class_name,
|
||||||
t1.apply_work_type_id,
|
t1.apply_work_type_id,
|
||||||
@ -316,6 +318,8 @@
|
|||||||
ON t1.apply_physical_state = t5.data_id
|
ON t1.apply_physical_state = t5.data_id
|
||||||
LEFT JOIN e_work_type e1
|
LEFT JOIN e_work_type e1
|
||||||
ON t1.apply_work_type_id = e1.work_type_id
|
ON t1.apply_work_type_id = e1.work_type_id
|
||||||
|
LEFT JOIN m_institution m1
|
||||||
|
ON t1,apply_institution_id = m1.institution_id
|
||||||
WHERE
|
WHERE
|
||||||
t1.is_delete = 0
|
t1.is_delete = 0
|
||||||
<if test="applyId != null and applyId != ''">
|
<if test="applyId != null and applyId != ''">
|
||||||
@ -410,6 +414,7 @@
|
|||||||
<select id="list" parameterType="map" resultMap="applyDTO">
|
<select id="list" parameterType="map" resultMap="applyDTO">
|
||||||
SELECT
|
SELECT
|
||||||
t1.apply_institution_id,
|
t1.apply_institution_id,
|
||||||
|
m1.institution_name AS apply_institution_name,
|
||||||
t1.apply_id,
|
t1.apply_id,
|
||||||
t1.apply_class_id,
|
t1.apply_class_id,
|
||||||
t1.apply_class_name,
|
t1.apply_class_name,
|
||||||
@ -451,6 +456,8 @@
|
|||||||
ON t1.apply_physical_state = t5.data_id
|
ON t1.apply_physical_state = t5.data_id
|
||||||
LEFT JOIN e_work_type e1
|
LEFT JOIN e_work_type e1
|
||||||
ON t1.apply_work_type_id = e1.work_type_id
|
ON t1.apply_work_type_id = e1.work_type_id
|
||||||
|
LEFT JOIN m_institution m1
|
||||||
|
ON t1,apply_institution_id = m1.institution_id
|
||||||
WHERE
|
WHERE
|
||||||
t1.is_delete = 0
|
t1.is_delete = 0
|
||||||
<if test="keywords != null and keywords != ''">
|
<if test="keywords != null and keywords != ''">
|
||||||
@ -686,4 +693,7 @@
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
Loading…
Reference in New Issue
Block a user