Commit e4e641c2 by wangweidong

增加判定类型的添加

parent f22e7840
......@@ -584,4 +584,13 @@ public class ContractSampleController extends ServiceController {
return success(contractSampleService.passToSecondJudgeCheck(dto,getAccount()));
}
@ApiOperation("任务判定增加")
@PostMapping("/add_judgement_type")
public RestResult<Boolean> addJudgementType(@RequestParam("ids")Long[] ids, @RequestParam("judgement") String judgement) {
return success(contractSampleService.addJudgementType(ids,judgement,getAccount()));
}
}
......@@ -65,4 +65,6 @@ public interface IContractSampleService extends IBaseService<ContractSample> {
boolean backSecondJudgeCheck(Long[] ids, String reason, Account account);
boolean passToSecondJudgeCheck(ContractSampleVODTO dto, Account account);
boolean addJudgementType(Long[] ids, String judgement, Account account);
}
......@@ -379,5 +379,24 @@ public class ContractSampleServiceImpl extends BaseServiceImpl<ContractSampleMap
return true;
}
@Transactional(rollbackFor = Exception.class)
@Override
public boolean addJudgementType(Long[] ids, String judgement, Account account) {
RestAssert.fail(ArrayUtils.isEmpty(ids),"请选择数据!");
RestAssert.fail(StringUtils.isBlank(judgement),"请选择判定类型");
List<ContractSample> updateList = new ArrayList<>();
for (Long id : ids) {
ContractSample sample = new ContractSample();
sample.setId(id);
sample.setJudgmentType(judgement);
updateList.add(sample);
}
if (CollectionUtils.isNotEmpty(updateList)){
return updateBatchById(updateList);
}
return false;
}
}
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