Commit 914a2e74 authored by 李博今's avatar 李博今

Merge branch 'V2.0.3' of http://103.249.252.28:90/lcy/education

# Conflicts:
#	src/main/java/org/rcisoft/business/barrange/dao/BArrangeRepository.java
parents 9d7e1d4c e491aefe
...@@ -150,7 +150,17 @@ public class BArrangeController extends PaginationController<BArrange> { ...@@ -150,7 +150,17 @@ public class BArrangeController extends PaginationController<BArrange> {
bArrangeServiceImpl.selectSubAgencyAndOption(subAgencyId)); bArrangeServiceImpl.selectSubAgencyAndOption(subAgencyId));
} }
@ApiOperation(value="子任务提交", notes="子任务提交")
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = true, dataType = "varchar"),})
@PutMapping("/submit")
@PreAuthorize("hasRole('ROLE_1001')")
public Result updateSubAgency(String businessId) {
PersistModel data = bArrangeServiceImpl.submit(businessId);
return Result.builder(data,
MessageConstant.MESSAGE_ALERT_SUCCESS,
MessageConstant.MESSAGE_ALERT_ERROR,
businessId);
}
@ApiOperation(value="发布", notes="发布") @ApiOperation(value="发布", notes="发布")
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = true, dataType = "varchar"),}) @ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = true, dataType = "varchar"),})
......
...@@ -2,6 +2,7 @@ package org.rcisoft.business.barrange.dao; ...@@ -2,6 +2,7 @@ package org.rcisoft.business.barrange.dao;
import org.apache.ibatis.annotations.Delete; import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import org.rcisoft.business.barrange.entity.BSubAgency; import org.rcisoft.business.barrange.entity.BSubAgency;
import org.rcisoft.business.barrange.entity.BSubtask; import org.rcisoft.business.barrange.entity.BSubtask;
import org.rcisoft.business.barrange.entity.ScheduleDto; import org.rcisoft.business.barrange.entity.ScheduleDto;
...@@ -31,6 +32,7 @@ public interface BArrangeRepository extends BaseMapper<BArrange> { ...@@ -31,6 +32,7 @@ public interface BArrangeRepository extends BaseMapper<BArrange> {
+ "<if test=\"flag !=null and flag != '' \">and flag = #{flag} </if> " + "<if test=\"flag !=null and flag != '' \">and flag = #{flag} </if> "
+ "<if test=\"status !=null and status != '' \">and b_sub_agency.status = #{status} </if> " + "<if test=\"status !=null and status != '' \">and b_sub_agency.status = #{status} </if> "
+ "GROUP BY b_arrange.business_id " + "GROUP BY b_arrange.business_id "
+ "order by b_arrange.status"
+ "</script>") + "</script>")
@ResultMap(value = "BaseResultMapByAgencyCode") @ResultMap(value = "BaseResultMapByAgencyCode")
List<BArrange> queryByAgencyCode(BArrange bArrange); List<BArrange> queryByAgencyCode(BArrange bArrange);
...@@ -47,6 +49,7 @@ public interface BArrangeRepository extends BaseMapper<BArrange> { ...@@ -47,6 +49,7 @@ public interface BArrangeRepository extends BaseMapper<BArrange> {
+ "<if test=\"flag !=null and flag != '' \">and flag = #{flag} </if> " + "<if test=\"flag !=null and flag != '' \">and flag = #{flag} </if> "
+ "<if test=\"termCode !=null and termCode != '' \">and term_code = #{termCode} </if> " + "<if test=\"termCode !=null and termCode != '' \">and term_code = #{termCode} </if> "
+ "<if test=\"status !=null and status != '' \">and status = #{status} </if> " + "<if test=\"status !=null and status != '' \">and status = #{status} </if> "
+ "order by b_arrange.status"
+ "</script>") + "</script>")
@ResultMap(value = "BaseResultMap2") @ResultMap(value = "BaseResultMap2")
List<BArrange> queryAll(BArrange bArrange); List<BArrange> queryAll(BArrange bArrange);
...@@ -136,6 +139,14 @@ public interface BArrangeRepository extends BaseMapper<BArrange> { ...@@ -136,6 +139,14 @@ public interface BArrangeRepository extends BaseMapper<BArrange> {
@ResultMap(value = "selectSubAgencyAndOptionResultMap") @ResultMap(value = "selectSubAgencyAndOptionResultMap")
BSubAgency selectSubAgencyAndOption(String bSubAgencyId); BSubAgency selectSubAgencyAndOption(String bSubAgencyId);
/**
* 子任务提交 修改status 0 -> 2
* @param businessId
* @return
*/
@Update("update b_sub_agency set status = 2 where business_id = #{0}")
int submitSubAgency(String businessId);
@Delete("delete from b_schedule_dto where sub_agency_id = #{bSubAgencyId}") @Delete("delete from b_schedule_dto where sub_agency_id = #{bSubAgencyId}")
int avoidRepeatDto(String bSubAgencyId); int avoidRepeatDto(String bSubAgencyId);
} }
......
...@@ -57,4 +57,7 @@ public interface BArrangeService { ...@@ -57,4 +57,7 @@ public interface BArrangeService {
PersistModel release(String businessId); PersistModel release(String businessId);
BSubAgency selectSubAgencyAndOption(String subAgencyId); BSubAgency selectSubAgencyAndOption(String subAgencyId);
PersistModel submit(String businessId);
} }
...@@ -420,4 +420,14 @@ public class BArrangeServiceImpl implements BArrangeService { ...@@ -420,4 +420,14 @@ public class BArrangeServiceImpl implements BArrangeService {
return bArrangeRepository.selectSubAgencyAndOption(subAgencyId); return bArrangeRepository.selectSubAgencyAndOption(subAgencyId);
} }
/**
* 子任务提交 修改subAgency的status 0 -> 2
* @param businessId
* @return
*/
@Override
public PersistModel submit(String businessId) {
return new PersistModel(1, bArrangeRepository.submitSubAgency(businessId));
}
} }
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