|
|
@ -16,13 +16,11 @@ import org.springblade.core.boot.ctrl.BladeController; |
|
|
|
import org.springblade.core.mp.support.Condition; |
|
|
|
import org.springblade.core.mp.support.Condition; |
|
|
|
import org.springblade.core.mp.support.Query; |
|
|
|
import org.springblade.core.mp.support.Query; |
|
|
|
import org.springblade.core.tool.api.R; |
|
|
|
import org.springblade.core.tool.api.R; |
|
|
|
import org.springblade.core.tool.utils.DateUtil; |
|
|
|
|
|
|
|
import org.springblade.core.tool.utils.Func; |
|
|
|
import org.springblade.core.tool.utils.Func; |
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
|
|
|
|
|
|
|
import javax.validation.Valid; |
|
|
|
import javax.validation.Valid; |
|
|
|
import javax.validation.constraints.NotNull; |
|
|
|
import javax.validation.constraints.NotNull; |
|
|
|
import java.util.Date; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
@ -41,9 +39,7 @@ public class ConstructionController extends BladeController { |
|
|
|
@ApiOperationSupport(order = 1) |
|
|
|
@ApiOperationSupport(order = 1) |
|
|
|
@ApiOperation(value = "新增") |
|
|
|
@ApiOperation(value = "新增") |
|
|
|
public R save(@RequestBody OperConstructionEntity entity) { |
|
|
|
public R save(@RequestBody OperConstructionEntity entity) { |
|
|
|
entity.setCode("SGRZ" + DateUtil.format(new Date(),DateUtil.PATTERN_DATETIME_MINI)); |
|
|
|
return R.status(service.accessSave(entity)); |
|
|
|
entity.setConstructionTime(entity.getOverhaulTime()); |
|
|
|
|
|
|
|
return R.status(service.save(entity)); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("/remove") |
|
|
|
@PostMapping("/remove") |
|
|
@ -53,15 +49,22 @@ public class ConstructionController extends BladeController { |
|
|
|
return R.status(service.deleteLogic(Func.toLongList(ids))); |
|
|
|
return R.status(service.deleteLogic(Func.toLongList(ids))); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("/update") |
|
|
|
@GetMapping("/detail") |
|
|
|
@ApiOperationSupport(order = 3) |
|
|
|
@ApiOperationSupport(order = 3) |
|
|
|
|
|
|
|
@ApiOperation(value = "详情查询") |
|
|
|
|
|
|
|
public R detail(@ApiParam(value = "主键Id", required = true) @RequestParam Long id) { |
|
|
|
|
|
|
|
return R.data(service.getById(id)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("/update") |
|
|
|
|
|
|
|
@ApiOperationSupport(order = 4) |
|
|
|
@ApiOperation(value = "修改") |
|
|
|
@ApiOperation(value = "修改") |
|
|
|
public R update(@Valid @RequestBody OperConstructionEntity entity) { |
|
|
|
public R update(@Valid @RequestBody OperConstructionEntity entity) { |
|
|
|
return R.status(service.updateById(entity)); |
|
|
|
return R.status(service.updateById(entity)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@GetMapping("/list") |
|
|
|
@GetMapping("/list") |
|
|
|
@ApiOperationSupport(order = 4) |
|
|
|
@ApiOperationSupport(order = 5) |
|
|
|
@OperationAnnotation(moduleName = "施工日志",title = "施工日志",operatorType = OperatorType.MOBILE,businessType = |
|
|
|
@OperationAnnotation(moduleName = "施工日志",title = "施工日志",operatorType = OperatorType.MOBILE,businessType = |
|
|
|
BusinessType.GENCODE, |
|
|
|
BusinessType.GENCODE, |
|
|
|
action = "分页查询施工日志") |
|
|
|
action = "分页查询施工日志") |
|
|
@ -71,7 +74,7 @@ public class ConstructionController extends BladeController { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@GetMapping("/preview") |
|
|
|
@GetMapping("/preview") |
|
|
|
@ApiOperationSupport(order = 5) |
|
|
|
@ApiOperationSupport(order = 6) |
|
|
|
@ApiOperation(value = "检修施工日志预览", notes = "检修施工日志预览") |
|
|
|
@ApiOperation(value = "检修施工日志预览", notes = "检修施工日志预览") |
|
|
|
public void preview(@RequestParam @ApiParam("检修施工记录Id") @NotNull @Valid Long id) { |
|
|
|
public void preview(@RequestParam @ApiParam("检修施工记录Id") @NotNull @Valid Long id) { |
|
|
|
service.preview(id); |
|
|
|
service.preview(id); |
|
|
|