Commit 0637dab4 authored by zhangwanglin's avatar zhangwanglin

删除打卡提示语

parent ecb53b0c
...@@ -312,12 +312,8 @@ public class SrvOrganController { ...@@ -312,12 +312,8 @@ public class SrvOrganController {
*/ */
@PostMapping("/chSrvTaskDetailDelete") @PostMapping("/chSrvTaskDetailDelete")
public Result chSrvTaskDetailDelete(Long taskDetailId,String userName){ public Result chSrvTaskDetailDelete(Long taskDetailId,String userName){
int srv = srvOrganEmpService.chSrvTaskDetailDelete(taskDetailId,userName); return srvOrganEmpService.chSrvTaskDetailDelete(taskDetailId,userName);
if(srv>0){
return Result.success();
}else {
return Result.failed("删除失败");
}
} }
} }
...@@ -6,6 +6,7 @@ import com.hungraim.ltc.pojo.vo.disable.ChSrvTaskDetail2Vo; ...@@ -6,6 +6,7 @@ import com.hungraim.ltc.pojo.vo.disable.ChSrvTaskDetail2Vo;
import com.hungraim.ltc.pojo.vo.disable.ChSrvTaskDetailVo; import com.hungraim.ltc.pojo.vo.disable.ChSrvTaskDetailVo;
import com.hungraim.ltc.pojo.vo.disable.SrvOrganEmpListVo; import com.hungraim.ltc.pojo.vo.disable.SrvOrganEmpListVo;
import com.hungraim.ltc.pojo.vo.disable.SrvOrganEmpVo; import com.hungraim.ltc.pojo.vo.disable.SrvOrganEmpVo;
import com.hungraim.ltc.util.Result;
import org.apache.poi.ss.usermodel.Workbook; import org.apache.poi.ss.usermodel.Workbook;
import java.util.List; import java.util.List;
...@@ -71,5 +72,5 @@ public interface SrvOrganEmpService { ...@@ -71,5 +72,5 @@ public interface SrvOrganEmpService {
Page<ChSrvTaskDetail2Vo> chSrvTaskDetailQuery(Page<ChSrvTaskDetail2Vo> page, Long empId); Page<ChSrvTaskDetail2Vo> chSrvTaskDetailQuery(Page<ChSrvTaskDetail2Vo> page, Long empId);
int chSrvTaskDetailDelete(long taskDetailId,String userName); Result chSrvTaskDetailDelete(long taskDetailId, String userName);
} }
...@@ -182,7 +182,7 @@ public class SrvOrganEmpServiceImpl implements SrvOrganEmpService { ...@@ -182,7 +182,7 @@ public class SrvOrganEmpServiceImpl implements SrvOrganEmpService {
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
@Override @Override
public int chSrvTaskDetailDelete(long taskDetailId,String userName) { public Result chSrvTaskDetailDelete(long taskDetailId,String userName) {
ChSrvTaskDetail chSrvTaskDetail = chSrvTaskDetailMapper.selectById(taskDetailId); ChSrvTaskDetail chSrvTaskDetail = chSrvTaskDetailMapper.selectById(taskDetailId);
ChSrvTaskDetailDelete chSrvTaskDetailDelete = new ChSrvTaskDetailDelete(); ChSrvTaskDetailDelete chSrvTaskDetailDelete = new ChSrvTaskDetailDelete();
BeanUtils.copyProperties(chSrvTaskDetail,chSrvTaskDetailDelete); BeanUtils.copyProperties(chSrvTaskDetail,chSrvTaskDetailDelete);
...@@ -206,7 +206,7 @@ public class SrvOrganEmpServiceImpl implements SrvOrganEmpService { ...@@ -206,7 +206,7 @@ public class SrvOrganEmpServiceImpl implements SrvOrganEmpService {
Short status = chDisabDetailAccounts.getStatus(); Short status = chDisabDetailAccounts.getStatus();
if(status != 0){ if(status != 0){
// 已申报不能进行删除 // 已申报不能进行删除
return -1; return Result.failed("已申报不能进行删除");
} }
BigDecimal accountsAllCost = chDisabDetailAccounts.getAccountsAllCost(); BigDecimal accountsAllCost = chDisabDetailAccounts.getAccountsAllCost();
BigDecimal accountsPersonalCost = chDisabDetailAccounts.getAccountsPersonalCost(); BigDecimal accountsPersonalCost = chDisabDetailAccounts.getAccountsPersonalCost();
...@@ -219,8 +219,12 @@ public class SrvOrganEmpServiceImpl implements SrvOrganEmpService { ...@@ -219,8 +219,12 @@ public class SrvOrganEmpServiceImpl implements SrvOrganEmpService {
} }
} }
chSrvTaskDetailMapper.deleteFinshItem(taskDetailId); chSrvTaskDetailMapper.deleteFinshItem(taskDetailId);
return chSrvTaskDetailMapper.updateByTaskDetailId(String.valueOf(chSrvTaskDetail.getTaskDetailId())); int srv = chSrvTaskDetailMapper.updateByTaskDetailId(String.valueOf(chSrvTaskDetail.getTaskDetailId()));
if(srv>0){
return Result.success();
}else {
return Result.failed("删除失败");
}
} }
/** /**
......
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