Commit 06fbba14 authored by KeYong's avatar KeYong

更新

parent b88ff384
...@@ -175,7 +175,10 @@ public class CheckController extends AbstractBaseController { ...@@ -175,7 +175,10 @@ public class CheckController extends AbstractBaseController {
int statu = -1; int statu = -1;
PlanTask planTask =null; PlanTask planTask =null;
if(requestParam.getPlanTaskId()!=null && requestParam.getPlanTaskId() !=0){ if(requestParam.getPlanTaskId()!=null && requestParam.getPlanTaskId() !=0){
checkService.delCheckByTaskId(requestParam.getPlanTaskId()); Map<String, Object> map = checkService.selectCheckById(requestParam.getPlanTaskId());
if (!ObjectUtils.isEmpty(map)) {
checkService.delCheckByTaskId(requestParam.getPlanTaskId(), Long.valueOf((String) map.get("id")));
}
planTask = planTaskService.selectPlanTaskStatus(requestParam.getPlanTaskId()); planTask = planTaskService.selectPlanTaskStatus(requestParam.getPlanTaskId());
} }
AgencyUserModel user = getUserInfo(); AgencyUserModel user = getUserInfo();
......
...@@ -4,6 +4,7 @@ import java.util.HashMap; ...@@ -4,6 +4,7 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import com.yeejoin.amos.patrol.dao.entity.Check;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import com.yeejoin.amos.patrol.business.entity.mybatis.CheckDetailBo; import com.yeejoin.amos.patrol.business.entity.mybatis.CheckDetailBo;
...@@ -284,4 +285,8 @@ public interface CheckMapper extends BaseMapper { ...@@ -284,4 +285,8 @@ public interface CheckMapper extends BaseMapper {
int delCheckByTaskId(@Param(value = "taskId") Long taskId); int delCheckByTaskId(@Param(value = "taskId") Long taskId);
int delCheckInputByCheckId(@Param(value = "checkId") Long checkId);
Map<String, Object> selectCheckById(@Param(value = "taskId") Long taskId);
} }
...@@ -735,8 +735,14 @@ public class CheckServiceImpl implements ICheckService { ...@@ -735,8 +735,14 @@ public class CheckServiceImpl implements ICheckService {
} }
@Override @Override
public void delCheckByTaskId(Long id) { public Map<String, Object> selectCheckById(Long id) {
return checkMapper.selectCheckById(id);
}
@Override
public void delCheckByTaskId(Long id, Long checkId) {
checkMapper.delCheckByTaskId(id); checkMapper.delCheckByTaskId(id);
checkMapper.delCheckInputByCheckId(checkId);
} }
private CheckInput paraseText(CheckInput checkInput, String json, CheckInputParam item, String isScore) { private CheckInput paraseText(CheckInput checkInput, String json, CheckInputParam item, String isScore) {
......
...@@ -55,7 +55,9 @@ public interface ICheckService { ...@@ -55,7 +55,9 @@ public interface ICheckService {
void delCheckById(List<Long> ids); void delCheckById(List<Long> ids);
void delCheckByTaskId(Long id); void delCheckByTaskId(Long id, Long checkId);
Map<String, Object> selectCheckById(Long id);
/** /**
* 获取检查结果中所有不合格检查项 * 获取检查结果中所有不合格检查项
......
...@@ -2165,4 +2165,17 @@ ...@@ -2165,4 +2165,17 @@
WHERE pc.plan_task_id = #{taskId} WHERE pc.plan_task_id = #{taskId}
</select> </select>
<select id="delCheckInputByCheckId" resultType="int">
DELETE FROM
p_check_input pci
WHERE pci.check_id = #{checkId}
</select>
<select id="selectCheckById" resultType="java.util.HashMap">
SELECT *
FROM
p_check pc
WHERE pc.plan_task_id = #{taskId}
</select>
</mapper> </mapper>
\ No newline at end of file
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