Commit b88ff384 authored by KeYong's avatar KeYong

修改离线提交数据不成功

parent bc61b69b
......@@ -163,19 +163,6 @@ public class CheckController extends AbstractBaseController {
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "保存巡检记录<font color='blue'>手机app</font>", notes = "保存巡检记录<font color='blue'>手机app</font>")
@RequestMapping(value = "/saveRecordNew", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
......@@ -188,6 +175,7 @@ public class CheckController extends AbstractBaseController {
int statu = -1;
PlanTask planTask =null;
if(requestParam.getPlanTaskId()!=null && requestParam.getPlanTaskId() !=0){
checkService.delCheckByTaskId(requestParam.getPlanTaskId());
planTask = planTaskService.selectPlanTaskStatus(requestParam.getPlanTaskId());
}
AgencyUserModel user = getUserInfo();
......
......@@ -282,4 +282,6 @@ public interface CheckMapper extends BaseMapper {
//Map<String, String> queryUserInfoByIds(@Param(value = "userIds") String userIds);
int delCheckByTaskId(@Param(value = "taskId") Long taskId);
}
......@@ -606,6 +606,7 @@ public class CheckServiceImpl implements ICheckService {
}
// check = checkDao.save(check);
try {
check = checkDao.save(check);
} catch (Exception e) {
e.printStackTrace();
......@@ -733,6 +734,11 @@ public class CheckServiceImpl implements ICheckService {
checkDao.deleteBatch(list);
}
@Override
public void delCheckByTaskId(Long id) {
checkMapper.delCheckByTaskId(id);
}
private CheckInput paraseText(CheckInput checkInput, String json, CheckInputParam item, String isScore) {
JSONObject jsonObject = JSONObject.parseObject(json);
String checkType = jsonObject.getString("CheckType");
......
......@@ -52,8 +52,11 @@ public interface ICheckService {
* @param ids
*/
@Transactional(rollbackFor = {YeeException.class, Exception.class})
void delCheckById(List<Long> ids);
void delCheckByTaskId(Long id);
/**
* 获取检查结果中所有不合格检查项
*
......
......@@ -193,7 +193,7 @@
<select id="selectOilDrainage" resultType="java.util.Map">
SELECT
wes.id,
'1' as type ,
'1' as type,
(SELECT wei.emergency_level FROM wl_equipment_index wei LEFT JOIN wl_equipment_specific_index wesi on wei.id = wesi.equipment_index_id
WHERE wesi.equipment_specific_id = wes.id AND wesi.equipment_index_key = wes.realtime_iot_index_key) as level,
wes.equipment_code as code ,
......
......@@ -2159,4 +2159,10 @@
d.date
</select>
<select id="delCheckByTaskId" resultType="int">
DELETE FROM
p_check pc
WHERE pc.plan_task_id = #{taskId}
</select>
</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