app退料驳回

This commit is contained in:
liang.chao 2024-01-15 15:32:06 +08:00
parent 1b4cbfc091
commit 4d4dfd55b9
5 changed files with 40 additions and 0 deletions

View File

@ -187,6 +187,14 @@ public class BackApplyController extends BaseController {
return backApplyService.audit(record);
}
@ApiOperation("退料审核-驳回")
@Log(title = "退料审核列表-驳回", businessType = BusinessType.UPDATE)
@PostMapping("/refuse")
public AjaxResult refuse(@RequestBody BackApplyInfo record)
{
return backApplyService.refuse(record);
}
/**

View File

@ -44,6 +44,8 @@ public interface BackApplyMapper {
int audit(BackApplyInfo bean);
int refuse(BackApplyInfo bean);
List<TypeTreeNode> getUseTypeTree(BackApplyInfo bean);
/**

View File

@ -38,6 +38,8 @@ public interface BackApplyService {
AjaxResult audit(BackApplyInfo record);
AjaxResult refuse(BackApplyInfo record);
AjaxResult getUseTypeTree(BackApplyInfo bean);
/**

View File

@ -126,6 +126,24 @@ public class BackApplyServiceImpl implements BackApplyService {
}
}
@Override
public AjaxResult refuse(BackApplyInfo bean) {
if (!StringUtils.isEmpty(bean.getIds())){
String[] ids = bean.getIds().split(",");
for (int i=0;i< ids.length;i++){
String id=ids[i];
bean.setId(Long.valueOf(id));
int re =backApplyMapper.refuse(bean);
if (re<1){
return AjaxResult.error("驳回失败");
}
}
return AjaxResult.success("驳回成功");
}else {
return AjaxResult.error("驳回失败,未获取到参数");
}
}
@Override
public AjaxResult getUseTypeTree(BackApplyInfo bean) {
List<TypeTreeNode> groupList = new ArrayList<>();

View File

@ -257,6 +257,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
WHERE
bai.id = #{id}
</update>
<update id="refuse">
UPDATE tm_task tt
LEFT JOIN back_apply_info bai ON bai.task_id = tt.task_id
LEFT JOIN back_apply_details bad on bad.parent_id=bai.id
SET tt.task_status = '37',bad.audit_num=bad.pre_num,bai.direct_audit_by=#{createBy},bad.status='3',bai.direct_audit_time=NOW()
WHERE
bai.id = #{id}
</update>
<delete id="del">
DELETE
FROM tm_task_agreement