运维接口
This commit is contained in:
parent
7a169b0506
commit
d0199fca6f
@ -9,10 +9,7 @@ import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.ArrayList;
|
||||
@ -97,7 +94,7 @@ public class XhpcInspectionController extends BaseController {
|
||||
}
|
||||
|
||||
@PostMapping("/addInspection")
|
||||
public AjaxResult addInspection(HttpServletRequest request,XhpcInspection xhpcInspection) {
|
||||
public AjaxResult addInspection(HttpServletRequest request,@RequestBody XhpcInspection xhpcInspection) {
|
||||
return xhpcInspectionService.addInspection(request,xhpcInspection);
|
||||
}
|
||||
|
||||
|
||||
@ -112,7 +112,6 @@ public class XhpcInspectionServiceImpl implements IXhpcInspectionService {
|
||||
@Override
|
||||
public AjaxResult getInspectionById(Long stationId, String id,Long inspectionId) {
|
||||
//'0 桩 1箱变 2监控 3道闸 4 远程连接'
|
||||
Map<String, Object> map =new HashMap<>();
|
||||
int type =0;
|
||||
if(id.equals("XB")){
|
||||
type=1;
|
||||
@ -123,7 +122,7 @@ public class XhpcInspectionServiceImpl implements IXhpcInspectionService {
|
||||
}else if(id.equals("YC")){
|
||||
type=2;
|
||||
}
|
||||
map =xhpcInspectionMapper.getInspectionById(stationId,inspectionId,type);
|
||||
Map<String, Object> map =xhpcInspectionMapper.getInspectionById(stationId,inspectionId,type);
|
||||
return AjaxResult.success(map);
|
||||
}
|
||||
|
||||
|
||||
@ -207,12 +207,12 @@
|
||||
<update id="updateInspection">
|
||||
update xhpc_inspection
|
||||
<set>
|
||||
<if test="status !=null">status=#{status}</if>
|
||||
<if test="inspectionImg !=null">inspection_img=#{inspectionImg}</if>
|
||||
<if test="faultImg !=null">fault_img=#{faultImg}</if>
|
||||
<if test="faultDescription !=null">fault_description=#{faultDescription}</if>
|
||||
<if test="maintenanceRecord !=null">maintenance_record=#{maintenanceRecord}</if>
|
||||
<if test="userId !=null">user_id=#{userId}</if>
|
||||
<if test="status !=null">status=#{status},</if>
|
||||
<if test="inspectionImg !=null and inspectionImg !=''">inspection_img=#{inspectionImg},</if>
|
||||
<if test="faultImg !=null and faultImg !=''">fault_img=#{faultImg},</if>
|
||||
<if test="faultDescription !=null and faultDescription!=''">fault_description=#{faultDescription},</if>
|
||||
<if test="maintenanceRecord !=null and maintenanceRecord !=''">maintenance_record=#{maintenanceRecord},</if>
|
||||
<if test="userId !=null">user_id=#{userId},</if>
|
||||
</set>
|
||||
where inspection_id=#{inspectionId}
|
||||
</update>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user