daikun1@bosssoft.com.cn
1 year ago
146 changed files with 5010 additions and 244 deletions
@ -0,0 +1,23 @@ |
|||||
|
package com.win.module.dataacqu.controller; |
||||
|
|
||||
|
import com.win.framework.common.pojo.CommonResult; |
||||
|
import com.win.module.dataacqu.service.asynclab.AsyncLabService; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.GetMapping; |
||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||
|
import org.springframework.web.bind.annotation.RestController; |
||||
|
|
||||
|
@RestController |
||||
|
@RequestMapping("/asynclab/") |
||||
|
public class AsyncLabController { |
||||
|
|
||||
|
@Autowired |
||||
|
private AsyncLabService asyncLabService; |
||||
|
|
||||
|
|
||||
|
// @GetMapping("/asyncLab")
|
||||
|
// public CommonResult<Boolean> asyncLab(String busDate , String busType) {
|
||||
|
//
|
||||
|
// }
|
||||
|
|
||||
|
} |
@ -1,22 +0,0 @@ |
|||||
package com.win.module.dataacqu.controller; |
|
||||
|
|
||||
import com.win.module.dataacqu.service.ImpactScheduleServie; |
|
||||
import org.springframework.beans.factory.annotation.Autowired; |
|
||||
import org.springframework.web.bind.annotation.GetMapping; |
|
||||
import org.springframework.web.bind.annotation.RequestMapping; |
|
||||
import org.springframework.web.bind.annotation.RestController; |
|
||||
|
|
||||
@RestController |
|
||||
@RequestMapping("/impact") |
|
||||
public class ImpController { |
|
||||
|
|
||||
@Autowired |
|
||||
private ImpactScheduleServie impactScheduleServie; |
|
||||
|
|
||||
|
|
||||
@GetMapping("/syncImpactInfos") |
|
||||
public String syncImpactInfos() { |
|
||||
impactScheduleServie.syncImpactInfos(); |
|
||||
return "SUCCESS"; |
|
||||
} |
|
||||
} |
|
@ -1,22 +0,0 @@ |
|||||
package com.win.module.dataacqu.controller; |
|
||||
|
|
||||
import com.win.module.dataacqu.service.PlatScaleScheduleService; |
|
||||
import org.springframework.beans.factory.annotation.Autowired; |
|
||||
import org.springframework.web.bind.annotation.GetMapping; |
|
||||
import org.springframework.web.bind.annotation.RequestMapping; |
|
||||
import org.springframework.web.bind.annotation.RestController; |
|
||||
|
|
||||
@RestController |
|
||||
@RequestMapping("/pscale") |
|
||||
public class PScaleController { |
|
||||
|
|
||||
@Autowired |
|
||||
private PlatScaleScheduleService slatScaleScheduleService; |
|
||||
|
|
||||
|
|
||||
@GetMapping("/syncPlatScaleDatas") |
|
||||
public String syncPlatScaleDatas() throws Exception{ |
|
||||
slatScaleScheduleService.syncPlatScaleDatas(); |
|
||||
return "SUCCESS"; |
|
||||
} |
|
||||
} |
|
@ -1,22 +0,0 @@ |
|||||
package com.win.module.dataacqu.controller; |
|
||||
|
|
||||
import com.win.module.dataacqu.service.StretchThousandScheduleService; |
|
||||
import org.springframework.beans.factory.annotation.Autowired; |
|
||||
import org.springframework.web.bind.annotation.GetMapping; |
|
||||
import org.springframework.web.bind.annotation.RequestMapping; |
|
||||
import org.springframework.web.bind.annotation.RestController; |
|
||||
|
|
||||
@RestController |
|
||||
@RequestMapping("/stretchthousand") |
|
||||
public class SThousandController { |
|
||||
|
|
||||
@Autowired |
|
||||
private StretchThousandScheduleService stretchThousandScheduleService; |
|
||||
|
|
||||
|
|
||||
@GetMapping("/syncThousandData") |
|
||||
public String syncThousandData() throws Exception{ |
|
||||
stretchThousandScheduleService.syncThousandData(); |
|
||||
return "SUCCESS"; |
|
||||
} |
|
||||
} |
|
@ -1,22 +0,0 @@ |
|||||
package com.win.module.dataacqu.controller; |
|
||||
|
|
||||
import com.win.module.dataacqu.service.StretchThousandQxScheduleService; |
|
||||
import org.springframework.beans.factory.annotation.Autowired; |
|
||||
import org.springframework.web.bind.annotation.GetMapping; |
|
||||
import org.springframework.web.bind.annotation.RequestMapping; |
|
||||
import org.springframework.web.bind.annotation.RestController; |
|
||||
|
|
||||
@RestController |
|
||||
@RequestMapping("/sthousandqx") |
|
||||
public class SThousandQxController { |
|
||||
|
|
||||
@Autowired |
|
||||
private StretchThousandQxScheduleService stretchThousandQxScheduleService; |
|
||||
|
|
||||
|
|
||||
@GetMapping("/syncQxInfos") |
|
||||
public String syncQxInfos() { |
|
||||
stretchThousandQxScheduleService.syncQxInfos(); |
|
||||
return "SUCCESS"; |
|
||||
} |
|
||||
} |
|
@ -1,22 +0,0 @@ |
|||||
package com.win.module.dataacqu.controller; |
|
||||
|
|
||||
import com.win.module.dataacqu.service.StretchThousandnewScheduleService; |
|
||||
import org.springframework.beans.factory.annotation.Autowired; |
|
||||
import org.springframework.web.bind.annotation.GetMapping; |
|
||||
import org.springframework.web.bind.annotation.RequestMapping; |
|
||||
import org.springframework.web.bind.annotation.RestController; |
|
||||
|
|
||||
@RestController |
|
||||
@RequestMapping("/sthousandnew") |
|
||||
public class SThousandnewController { |
|
||||
|
|
||||
@Autowired |
|
||||
private StretchThousandnewScheduleService sScheduleService; |
|
||||
|
|
||||
|
|
||||
@GetMapping("/syncThousandData") |
|
||||
public String syncThousandData() throws Exception{ |
|
||||
sScheduleService.syncThousandData(); |
|
||||
return "success"; |
|
||||
} |
|
||||
} |
|
@ -1,33 +0,0 @@ |
|||||
package com.win.module.dataacqu.controller; |
|
||||
|
|
||||
|
|
||||
import com.win.module.dataacqu.service.StretchThreeQxScheduleService; |
|
||||
import com.win.module.dataacqu.service.StretchThreeScheduleService; |
|
||||
import org.springframework.beans.factory.annotation.Autowired; |
|
||||
import org.springframework.web.bind.annotation.GetMapping; |
|
||||
import org.springframework.web.bind.annotation.RequestMapping; |
|
||||
import org.springframework.web.bind.annotation.RestController; |
|
||||
|
|
||||
@RestController |
|
||||
@RequestMapping(value = "/stretch") |
|
||||
public class SThreeHundredContrller { |
|
||||
|
|
||||
@Autowired |
|
||||
private StretchThreeScheduleService stretchThreeScheduleService; |
|
||||
|
|
||||
@Autowired |
|
||||
private StretchThreeQxScheduleService stretchThreeQxScheduleService; |
|
||||
|
|
||||
|
|
||||
@GetMapping(value = "/syncThreeHundredData") |
|
||||
public String syncThreeHundredData() throws Exception{ |
|
||||
stretchThreeScheduleService.syncThreeHundredData(); |
|
||||
return "SUCCESS"; |
|
||||
} |
|
||||
|
|
||||
@GetMapping(value = "/syncQxInfos") |
|
||||
public String syncQxInfos() throws Exception{ |
|
||||
stretchThreeQxScheduleService.syncQxInfos(); |
|
||||
return "SUCCESS"; |
|
||||
} |
|
||||
} |
|
@ -1,22 +0,0 @@ |
|||||
package com.win.module.dataacqu.controller; |
|
||||
|
|
||||
import com.win.module.dataacqu.service.SpectrumScheduleService; |
|
||||
import org.springframework.beans.factory.annotation.Autowired; |
|
||||
import org.springframework.web.bind.annotation.GetMapping; |
|
||||
import org.springframework.web.bind.annotation.RequestMapping; |
|
||||
import org.springframework.web.bind.annotation.RestController; |
|
||||
|
|
||||
@RestController |
|
||||
@RequestMapping("/spect") |
|
||||
public class SpectController { |
|
||||
|
|
||||
@Autowired |
|
||||
private SpectrumScheduleService spectrumScheduleService; |
|
||||
|
|
||||
|
|
||||
@GetMapping("/syncSpectrumInfos") |
|
||||
public String syncSpectrumInfos() { |
|
||||
spectrumScheduleService.syncSpectrumInfos(); |
|
||||
return "SUCCESS"; |
|
||||
} |
|
||||
} |
|
@ -0,0 +1,33 @@ |
|||||
|
package com.win.module.dataacqu.controller; |
||||
|
|
||||
|
import com.win.module.dataacqu.service.PlatScaleScheduleService; |
||||
|
import com.win.module.dataacqu.service.StretchThousandnewScheduleService; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.GetMapping; |
||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||
|
import org.springframework.web.bind.annotation.RestController; |
||||
|
|
||||
|
@RestController |
||||
|
@RequestMapping("/ttest") |
||||
|
public class TTestController { |
||||
|
|
||||
|
@Autowired |
||||
|
private PlatScaleScheduleService platScaleScheduleService; |
||||
|
|
||||
|
@Autowired |
||||
|
private StretchThousandnewScheduleService stretchThousandnewScheduleService; |
||||
|
|
||||
|
|
||||
|
@GetMapping("/test1") |
||||
|
public String test1(String date) { |
||||
|
platScaleScheduleService.syncPlatScaleDatas(date); |
||||
|
return "SUCCESS"; |
||||
|
} |
||||
|
|
||||
|
@GetMapping("/test2") |
||||
|
public String test2(String date) throws Exception{ |
||||
|
stretchThousandnewScheduleService.syncThousandData(date); |
||||
|
return "SUCCESS"; |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,6 @@ |
|||||
|
package com.win.module.dataacqu.service.asynclab; |
||||
|
|
||||
|
public interface AsyncLabService { |
||||
|
|
||||
|
public String asyncLab(String busDate , String busType) throws Exception ; |
||||
|
} |
@ -0,0 +1,59 @@ |
|||||
|
package com.win.module.dataacqu.service.asynclab; |
||||
|
|
||||
|
import com.win.module.dataacqu.service.*; |
||||
|
import com.win.module.lab.api.asyncoprlog.AsyncOprLogApi; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
@Service |
||||
|
public class AsyncLabServiceImpl implements AsyncLabService{ |
||||
|
|
||||
|
@Autowired |
||||
|
private ImpactScheduleServie impactScheduleServie; |
||||
|
|
||||
|
@Autowired |
||||
|
private PlatScaleScheduleService platScaleScheduleService; |
||||
|
|
||||
|
@Autowired |
||||
|
private SpectrumScheduleService spectrumScheduleService; |
||||
|
|
||||
|
@Autowired |
||||
|
private StretchThousandnewScheduleService sScheduleService; |
||||
|
|
||||
|
@Autowired |
||||
|
private StretchThousandQxScheduleService sQxScheduleService; |
||||
|
|
||||
|
@Autowired |
||||
|
private StretchThreeScheduleService stretchThreeScheduleService; |
||||
|
|
||||
|
@Autowired |
||||
|
private StretchThreeQxScheduleService stretchThreeQxScheduleService; |
||||
|
|
||||
|
|
||||
|
@Override |
||||
|
public String asyncLab(String busDate , String busType) throws Exception { |
||||
|
switch (busType) { |
||||
|
case "1" : // 地衡
|
||||
|
platScaleScheduleService.syncPlatScaleDatas(busDate); |
||||
|
break; |
||||
|
case "2": // 冲击
|
||||
|
impactScheduleServie.syncImpactInfos(busDate); |
||||
|
break; |
||||
|
case "3": // 光谱
|
||||
|
// spectrumScheduleService.syncSpectrumInfos(busDate);
|
||||
|
break; |
||||
|
case "4": // 拉伸300
|
||||
|
stretchThreeScheduleService.syncThreeHundredData(busDate); |
||||
|
// stretchThreeQxScheduleService.syncQxInfos();
|
||||
|
break; |
||||
|
case "5": // 拉伸1000
|
||||
|
sScheduleService.syncThousandData(busDate); |
||||
|
// sQxScheduleService.syncQxInfos();
|
||||
|
break; |
||||
|
default: |
||||
|
break; |
||||
|
} |
||||
|
|
||||
|
return null; |
||||
|
} |
||||
|
} |
@ -0,0 +1,12 @@ |
|||||
|
package com.win.module.lab.api.asyncoprlog; |
||||
|
|
||||
|
import com.win.module.lab.api.asyncoprlog.dto.AsyncOprLogDTO; |
||||
|
|
||||
|
import java.time.LocalDate; |
||||
|
|
||||
|
public interface AsyncOprLogApi { |
||||
|
|
||||
|
public boolean saveAsyncOprLog(AsyncOprLogDTO dto); |
||||
|
|
||||
|
public boolean saveAsyncOprLog(String busType , String oprType , String oprResult , String oprMsg , LocalDate busDate); |
||||
|
} |
@ -0,0 +1,27 @@ |
|||||
|
package com.win.module.lab.api.asyncoprlog.dto; |
||||
|
|
||||
|
import java.time.LocalDate; |
||||
|
|
||||
|
public class AsyncOprLogDTO { |
||||
|
|
||||
|
/** |
||||
|
* 业务类型 |
||||
|
*/ |
||||
|
private String busType; |
||||
|
/** |
||||
|
* 操作类型 |
||||
|
*/ |
||||
|
private String oprType; |
||||
|
/** |
||||
|
* 操作结果 |
||||
|
*/ |
||||
|
private String oprResult; |
||||
|
/** |
||||
|
* 描述 |
||||
|
*/ |
||||
|
private String oprMsg; |
||||
|
/** |
||||
|
* 业务日期 |
||||
|
*/ |
||||
|
private LocalDate busDate; |
||||
|
} |
@ -0,0 +1,37 @@ |
|||||
|
package com.win.module.lab.enums; |
||||
|
|
||||
|
public enum BusTypeEnum { |
||||
|
|
||||
|
BusType_1("1" , "地衡"), |
||||
|
BusType_2("2" , "冲击"), |
||||
|
BusType_3("3" , "光谱"), |
||||
|
BusType_4("4" , "拉伸300"), |
||||
|
BusType_5("5" , "拉伸1000"), |
||||
|
BusType_6("6" , "拉伸300曲线"), |
||||
|
BusType_7("7" , "拉伸1000曲线"); |
||||
|
|
||||
|
private String code; |
||||
|
|
||||
|
private String label; |
||||
|
|
||||
|
BusTypeEnum(String code , String label) { |
||||
|
this.code = code; |
||||
|
this.label = label; |
||||
|
} |
||||
|
|
||||
|
public String getCode() { |
||||
|
return code; |
||||
|
} |
||||
|
|
||||
|
public void setCode(String code) { |
||||
|
this.code = code; |
||||
|
} |
||||
|
|
||||
|
public String getLabel() { |
||||
|
return label; |
||||
|
} |
||||
|
|
||||
|
public void setLabel(String label) { |
||||
|
this.label = label; |
||||
|
} |
||||
|
} |
@ -0,0 +1,33 @@ |
|||||
|
package com.win.module.lab.enums; |
||||
|
|
||||
|
public enum OprTypeEnum { |
||||
|
|
||||
|
OprType_1("1" , "自动同步"), |
||||
|
|
||||
|
OprType_2("2" , "手动同步"); |
||||
|
|
||||
|
private String code; |
||||
|
|
||||
|
private String label; |
||||
|
|
||||
|
OprTypeEnum (String code , String label) { |
||||
|
this.code = code; |
||||
|
this.label = label; |
||||
|
} |
||||
|
|
||||
|
public String getCode() { |
||||
|
return code; |
||||
|
} |
||||
|
|
||||
|
public void setCode(String code) { |
||||
|
this.code = code; |
||||
|
} |
||||
|
|
||||
|
public String getLabel() { |
||||
|
return label; |
||||
|
} |
||||
|
|
||||
|
public void setLabel(String label) { |
||||
|
this.label = label; |
||||
|
} |
||||
|
} |
@ -0,0 +1,36 @@ |
|||||
|
package com.win.module.lab.api.asyncoprlog; |
||||
|
|
||||
|
import com.win.module.lab.api.asyncoprlog.dto.AsyncOprLogDTO; |
||||
|
import com.win.module.lab.convert.asyncoprlog.AsyncOprLogConvert; |
||||
|
import com.win.module.lab.dal.dataobject.asyncoprlog.AsyncOprLogDO; |
||||
|
import com.win.module.lab.dal.mysql.asyncoprlog.AsyncOprLogMapper; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
import java.time.LocalDate; |
||||
|
|
||||
|
@Service |
||||
|
public class AsyncOprLogApiImpl implements AsyncOprLogApi{ |
||||
|
|
||||
|
@Autowired |
||||
|
private AsyncOprLogMapper asyncOprLogMapper; |
||||
|
|
||||
|
|
||||
|
@Override |
||||
|
public boolean saveAsyncOprLog(AsyncOprLogDTO dto) { |
||||
|
asyncOprLogMapper.insert(AsyncOprLogConvert.INSTANCE.convert(dto)); |
||||
|
return true; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public boolean saveAsyncOprLog(String busType, String oprType, String oprResult, String oprMsg, LocalDate busDate) { |
||||
|
AsyncOprLogDO ado = new AsyncOprLogDO(); |
||||
|
ado.setBusType(busType); |
||||
|
ado.setOprType(oprType); |
||||
|
ado.setOprResult(oprResult); |
||||
|
ado.setOprMsg(oprMsg); |
||||
|
ado.setBusDate(busDate); |
||||
|
asyncOprLogMapper.insert(ado); |
||||
|
return true; |
||||
|
} |
||||
|
} |
@ -0,0 +1,123 @@ |
|||||
|
package com.win.module.lab.controller.asyncoprlog; |
||||
|
|
||||
|
import io.swagger.v3.oas.annotations.Parameters; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
import javax.annotation.Resource; |
||||
|
import org.springframework.validation.annotation.Validated; |
||||
|
import io.swagger.v3.oas.annotations.tags.Tag; |
||||
|
import io.swagger.v3.oas.annotations.Parameter; |
||||
|
import io.swagger.v3.oas.annotations.Operation; |
||||
|
import javax.validation.*; |
||||
|
import javax.servlet.http.*; |
||||
|
import java.time.LocalDateTime; |
||||
|
import java.time.ZoneOffset; |
||||
|
import java.util.*; |
||||
|
import java.io.IOException; |
||||
|
|
||||
|
import com.win.framework.common.pojo.PageResult; |
||||
|
import com.win.framework.common.pojo.CommonResult; |
||||
|
import static com.win.framework.common.pojo.CommonResult.success; |
||||
|
|
||||
|
import com.win.framework.excel.core.util.ExcelUtils; |
||||
|
|
||||
|
import com.win.framework.operatelog.core.annotations.OperateLog; |
||||
|
import static com.win.framework.operatelog.core.enums.OperateTypeEnum.*; |
||||
|
|
||||
|
import com.win.module.lab.controller.asyncoprlog.vo.*; |
||||
|
import com.win.module.lab.dal.dataobject.asyncoprlog.AsyncOprLogDO; |
||||
|
import com.win.module.lab.convert.asyncoprlog.AsyncOprLogConvert; |
||||
|
import com.win.module.lab.service.asyncoprlog.AsyncOprLogService; |
||||
|
import org.springframework.web.multipart.MultipartFile; |
||||
|
|
||||
|
@Tag(name = "管理后台 - 实验室-主动同步日志") |
||||
|
@RestController |
||||
|
@RequestMapping("/lab/asyncoprlog") |
||||
|
@Validated |
||||
|
public class AsyncOprLogController { |
||||
|
|
||||
|
@Resource |
||||
|
private AsyncOprLogService asyncOprLogService; |
||||
|
|
||||
|
|
||||
|
@PostMapping("/create") |
||||
|
@Operation(summary = "创建实验室-主动同步日志") |
||||
|
public CommonResult<Long> createAsyncOprLog(@Valid @RequestBody AsyncOprLogCreateReqVO createReqVO) { |
||||
|
return success(asyncOprLogService.createAsyncOprLog(createReqVO)); |
||||
|
} |
||||
|
|
||||
|
@PutMapping("/update") |
||||
|
@Operation(summary = "更新实验室-主动同步日志") |
||||
|
public CommonResult<Boolean> updateAsyncOprLog(@Valid @RequestBody AsyncOprLogUpdateReqVO updateReqVO) { |
||||
|
asyncOprLogService.updateAsyncOprLog(updateReqVO); |
||||
|
return success(true); |
||||
|
} |
||||
|
|
||||
|
@DeleteMapping("/delete") |
||||
|
@Operation(summary = "删除实验室-主动同步日志") |
||||
|
@Parameter(name = "id", description = "编号", required = true) |
||||
|
public CommonResult<Boolean> deleteAsyncOprLog(@RequestParam("id") Long id) { |
||||
|
asyncOprLogService.deleteAsyncOprLog(id); |
||||
|
return success(true); |
||||
|
} |
||||
|
|
||||
|
@GetMapping("/get") |
||||
|
@Operation(summary = "获得实验室-主动同步日志") |
||||
|
@Parameter(name = "id", description = "编号", required = true, example = "1024") |
||||
|
public CommonResult<AsyncOprLogRespVO> getAsyncOprLog(@RequestParam("id") Long id) { |
||||
|
AsyncOprLogDO asyncOprLog = asyncOprLogService.getAsyncOprLog(id); |
||||
|
return success(AsyncOprLogConvert.INSTANCE.convert(asyncOprLog)); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
@GetMapping("/page") |
||||
|
@Operation(summary = "获得实验室-主动同步日志分页") |
||||
|
public CommonResult<PageResult<AsyncOprLogRespVO>> getAsyncOprLogPage(@Valid AsyncOprLogPageReqVO pageVO) { |
||||
|
PageResult<AsyncOprLogDO> pageResult = asyncOprLogService.getAsyncOprLogPage(pageVO); |
||||
|
return success(AsyncOprLogConvert.INSTANCE.convertPage(pageResult)); |
||||
|
} |
||||
|
|
||||
|
@GetMapping("/export-excel") |
||||
|
@Operation(summary = "导出实验室-主动同步日志 Excel") |
||||
|
@OperateLog(type = EXPORT) |
||||
|
public void exportAsyncOprLogExcel(@Valid AsyncOprLogExportReqVO exportReqVO, |
||||
|
HttpServletResponse response) throws IOException { |
||||
|
List<AsyncOprLogDO> list = asyncOprLogService.getAsyncOprLogList(exportReqVO); |
||||
|
// 导出 Excel
|
||||
|
List<AsyncOprLogExcelVO> datas = AsyncOprLogConvert.INSTANCE.convertList02(list); |
||||
|
ExcelUtils.write(response, "实验室-主动同步日志.xls", "数据", AsyncOprLogExcelVO.class, datas); |
||||
|
} |
||||
|
|
||||
|
@GetMapping("/get-import-template") |
||||
|
@Operation(summary = "获得导入实验室-主动同步日志模板") |
||||
|
public void importTemplate(HttpServletResponse response) throws IOException { |
||||
|
List<AsyncOprLogExcelVO> list = Arrays.asList(); |
||||
|
// 输出
|
||||
|
ExcelUtils.write(response, "实验室-主动同步日志基本信息导入模板.xls", "实验室-主动同步日志基本信息列表", AsyncOprLogExcelVO.class, list); |
||||
|
} |
||||
|
|
||||
|
@PostMapping("/import") |
||||
|
@Operation(summary = "导入实验室-主动同步日志基本信息") |
||||
|
@Parameters({ |
||||
|
@Parameter(name = "file", description = "Excel 文件", required = true), |
||||
|
@Parameter(name = "mode", description = "导入模式1更新2追加3覆盖", example = "1"), |
||||
|
@Parameter(name = "updatePart", description = "部分更新,默认为 true", example = "true") |
||||
|
}) |
||||
|
public CommonResult<Map<String, Object>> importExcel(HttpServletResponse response, |
||||
|
@RequestParam("file") MultipartFile file, |
||||
|
@RequestParam(value = "mode") Integer mode, |
||||
|
@RequestParam(value = "updatePart", required = false, defaultValue = "false") Boolean updatePart) throws Exception { |
||||
|
|
||||
|
List<AsyncOprLogExcelVO> list = ExcelUtils.read(file, AsyncOprLogExcelVO.class); |
||||
|
List<AsyncOprLogExcelVO> errorList = asyncOprLogService.importAsyncOprLogList(list, mode, updatePart); |
||||
|
|
||||
|
Map<String, Object> returnMap = new HashMap<>(); |
||||
|
returnMap.put("errorCount", errorList.size()); |
||||
|
if(!errorList.isEmpty()) { |
||||
|
String url = ExcelUtils.writeLocalFile("实验室-主动同步日志基本信息导入错误数据" + LocalDateTime.now().toEpochSecond(ZoneOffset.of("+8")) + ".xlsx", "错误列表", errorList); |
||||
|
returnMap.put("errorFile", url); |
||||
|
} |
||||
|
|
||||
|
return success(returnMap); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,34 @@ |
|||||
|
package com.win.module.lab.controller.asyncoprlog.vo; |
||||
|
|
||||
|
import io.swagger.v3.oas.annotations.media.Schema; |
||||
|
import lombok.*; |
||||
|
import org.springframework.format.annotation.DateTimeFormat; |
||||
|
|
||||
|
import java.time.LocalDate; |
||||
|
|
||||
|
import static com.win.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY; |
||||
|
|
||||
|
/** |
||||
|
* 实验室-主动同步日志 Base VO,提供给添加、修改、详细的子 VO 使用 |
||||
|
* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class AsyncOprLogBaseVO { |
||||
|
|
||||
|
@Schema(description = "业务类型", example = "2") |
||||
|
private String busType; |
||||
|
|
||||
|
@Schema(description = "操作类型", example = "1") |
||||
|
private String oprType; |
||||
|
|
||||
|
@Schema(description = "操作结果") |
||||
|
private String oprResult; |
||||
|
|
||||
|
@Schema(description = "描述") |
||||
|
private String oprMsg; |
||||
|
|
||||
|
@Schema(description = "业务日期") |
||||
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY) |
||||
|
private LocalDate busDate; |
||||
|
|
||||
|
} |
@ -0,0 +1,12 @@ |
|||||
|
package com.win.module.lab.controller.asyncoprlog.vo; |
||||
|
|
||||
|
import lombok.*; |
||||
|
import io.swagger.v3.oas.annotations.media.Schema; |
||||
|
|
||||
|
@Schema(description = "管理后台 - 实验室-主动同步日志创建 Request VO") |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper = true) |
||||
|
@ToString(callSuper = true) |
||||
|
public class AsyncOprLogCreateReqVO extends AsyncOprLogBaseVO { |
||||
|
|
||||
|
} |
@ -0,0 +1,39 @@ |
|||||
|
package com.win.module.lab.controller.asyncoprlog.vo; |
||||
|
|
||||
|
import lombok.*; |
||||
|
|
||||
|
import java.time.LocalDate; |
||||
|
import java.time.LocalDateTime; |
||||
|
|
||||
|
import com.alibaba.excel.annotation.ExcelProperty; |
||||
|
|
||||
|
/** |
||||
|
* 实验室-主动同步日志 Excel VO |
||||
|
* |
||||
|
* @author 超级管理员 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class AsyncOprLogExcelVO { |
||||
|
|
||||
|
@ExcelProperty("主键、自增") |
||||
|
private Long id; |
||||
|
|
||||
|
@ExcelProperty("业务类型") |
||||
|
private String busType; |
||||
|
|
||||
|
@ExcelProperty("操作类型") |
||||
|
private String oprType; |
||||
|
|
||||
|
@ExcelProperty("操作结果") |
||||
|
private String oprResult; |
||||
|
|
||||
|
@ExcelProperty("描述") |
||||
|
private String oprMsg; |
||||
|
|
||||
|
@ExcelProperty("业务日期") |
||||
|
private LocalDate busDate; |
||||
|
|
||||
|
@ExcelProperty("创建时间") |
||||
|
private LocalDateTime createTime; |
||||
|
|
||||
|
} |
@ -0,0 +1,37 @@ |
|||||
|
package com.win.module.lab.controller.asyncoprlog.vo; |
||||
|
|
||||
|
import lombok.*; |
||||
|
|
||||
|
import java.time.LocalDate; |
||||
|
import io.swagger.v3.oas.annotations.media.Schema; |
||||
|
import java.time.LocalDateTime; |
||||
|
import org.springframework.format.annotation.DateTimeFormat; |
||||
|
|
||||
|
import static com.win.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; |
||||
|
import static com.win.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY; |
||||
|
|
||||
|
@Schema(description = "管理后台 - 实验室-主动同步日志 Excel 导出 Request VO,参数和 AsyncOprLogPageReqVO 是一致的") |
||||
|
@Data |
||||
|
public class AsyncOprLogExportReqVO { |
||||
|
|
||||
|
@Schema(description = "业务类型", example = "2") |
||||
|
private String busType; |
||||
|
|
||||
|
@Schema(description = "操作类型", example = "1") |
||||
|
private String oprType; |
||||
|
|
||||
|
@Schema(description = "操作结果") |
||||
|
private String oprResult; |
||||
|
|
||||
|
@Schema(description = "描述") |
||||
|
private String oprMsg; |
||||
|
|
||||
|
@Schema(description = "业务日期") |
||||
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY) |
||||
|
private LocalDate[] busDate; |
||||
|
|
||||
|
@Schema(description = "创建时间") |
||||
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
||||
|
private LocalDateTime[] createTime; |
||||
|
|
||||
|
} |
@ -0,0 +1,39 @@ |
|||||
|
package com.win.module.lab.controller.asyncoprlog.vo; |
||||
|
|
||||
|
import lombok.*; |
||||
|
|
||||
|
import java.time.LocalDate; |
||||
|
import io.swagger.v3.oas.annotations.media.Schema; |
||||
|
import com.win.framework.common.pojo.PageParam; |
||||
|
import org.springframework.format.annotation.DateTimeFormat; |
||||
|
import java.time.LocalDateTime; |
||||
|
|
||||
|
import static com.win.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; |
||||
|
|
||||
|
@Schema(description = "管理后台 - 实验室-主动同步日志分页 Request VO") |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper = true) |
||||
|
@ToString(callSuper = true) |
||||
|
public class AsyncOprLogPageReqVO extends PageParam { |
||||
|
|
||||
|
@Schema(description = "业务类型", example = "2") |
||||
|
private String busType; |
||||
|
|
||||
|
@Schema(description = "操作类型", example = "1") |
||||
|
private String oprType; |
||||
|
|
||||
|
@Schema(description = "操作结果") |
||||
|
private String oprResult; |
||||
|
|
||||
|
@Schema(description = "描述") |
||||
|
private String oprMsg; |
||||
|
|
||||
|
@Schema(description = "业务日期") |
||||
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
||||
|
private LocalDate[] busDate; |
||||
|
|
||||
|
@Schema(description = "创建时间") |
||||
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
||||
|
private LocalDateTime[] createTime; |
||||
|
|
||||
|
} |
@ -0,0 +1,19 @@ |
|||||
|
package com.win.module.lab.controller.asyncoprlog.vo; |
||||
|
|
||||
|
import io.swagger.v3.oas.annotations.media.Schema; |
||||
|
import lombok.*; |
||||
|
import java.time.LocalDateTime; |
||||
|
|
||||
|
@Schema(description = "管理后台 - 实验室-主动同步日志 Response VO") |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper = true) |
||||
|
@ToString(callSuper = true) |
||||
|
public class AsyncOprLogRespVO extends AsyncOprLogBaseVO { |
||||
|
|
||||
|
@Schema(description = "主键、自增", requiredMode = Schema.RequiredMode.REQUIRED, example = "17285") |
||||
|
private Long id; |
||||
|
|
||||
|
@Schema(description = "创建时间") |
||||
|
private LocalDateTime createTime; |
||||
|
|
||||
|
} |
@ -0,0 +1,17 @@ |
|||||
|
package com.win.module.lab.controller.asyncoprlog.vo; |
||||
|
|
||||
|
import io.swagger.v3.oas.annotations.media.Schema; |
||||
|
import lombok.*; |
||||
|
import javax.validation.constraints.*; |
||||
|
|
||||
|
@Schema(description = "管理后台 - 实验室-主动同步日志更新 Request VO") |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper = true) |
||||
|
@ToString(callSuper = true) |
||||
|
public class AsyncOprLogUpdateReqVO extends AsyncOprLogBaseVO { |
||||
|
|
||||
|
@Schema(description = "主键、自增", requiredMode = Schema.RequiredMode.REQUIRED, example = "17285") |
||||
|
@NotNull(message = "主键、自增不能为空") |
||||
|
private Long id; |
||||
|
|
||||
|
} |
@ -0,0 +1,125 @@ |
|||||
|
package com.win.module.lab.controller.hardnessthree; |
||||
|
|
||||
|
import io.swagger.v3.oas.annotations.Parameters; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
import javax.annotation.Resource; |
||||
|
import org.springframework.validation.annotation.Validated; |
||||
|
import org.springframework.security.access.prepost.PreAuthorize; |
||||
|
import io.swagger.v3.oas.annotations.tags.Tag; |
||||
|
import io.swagger.v3.oas.annotations.Parameter; |
||||
|
import io.swagger.v3.oas.annotations.Operation; |
||||
|
|
||||
|
import javax.validation.constraints.*; |
||||
|
import javax.validation.*; |
||||
|
import javax.servlet.http.*; |
||||
|
import java.time.LocalDateTime; |
||||
|
import java.time.ZoneOffset; |
||||
|
import java.util.*; |
||||
|
import java.io.IOException; |
||||
|
|
||||
|
import com.win.framework.common.pojo.PageResult; |
||||
|
import com.win.framework.common.pojo.CommonResult; |
||||
|
import static com.win.framework.common.pojo.CommonResult.success; |
||||
|
|
||||
|
import com.win.framework.excel.core.util.ExcelUtils; |
||||
|
|
||||
|
import com.win.framework.operatelog.core.annotations.OperateLog; |
||||
|
import static com.win.framework.operatelog.core.enums.OperateTypeEnum.*; |
||||
|
|
||||
|
import com.win.module.lab.controller.hardnessthree.vo.*; |
||||
|
import com.win.module.lab.dal.dataobject.hardnessthree.HardnessThreeDO; |
||||
|
import com.win.module.lab.convert.hardnessthree.HardnessThreeConvert; |
||||
|
import com.win.module.lab.service.hardnessthree.HardnessThreeService; |
||||
|
import org.springframework.web.multipart.MultipartFile; |
||||
|
|
||||
|
@Tag(name = "管理后台 - 实验室-布氏硬度") |
||||
|
@RestController |
||||
|
@RequestMapping("/lab/hardnessthree") |
||||
|
@Validated |
||||
|
public class HardnessThreeController { |
||||
|
|
||||
|
@Resource |
||||
|
private HardnessThreeService hardnessThreeService; |
||||
|
|
||||
|
@PostMapping("/create") |
||||
|
@Operation(summary = "创建实验室-布氏硬度") |
||||
|
public CommonResult<Long> createHardnessThree(@Valid @RequestBody HardnessThreeCreateReqVO createReqVO) { |
||||
|
return success(hardnessThreeService.createHardnessThree(createReqVO)); |
||||
|
} |
||||
|
|
||||
|
@PutMapping("/update") |
||||
|
@Operation(summary = "更新实验室-布氏硬度") |
||||
|
public CommonResult<Boolean> updateHardnessThree(@Valid @RequestBody HardnessThreeUpdateReqVO updateReqVO) { |
||||
|
hardnessThreeService.updateHardnessThree(updateReqVO); |
||||
|
return success(true); |
||||
|
} |
||||
|
|
||||
|
@DeleteMapping("/delete") |
||||
|
@Operation(summary = "删除实验室-布氏硬度") |
||||
|
@Parameter(name = "id", description = "编号", required = true) |
||||
|
public CommonResult<Boolean> deleteHardnessThree(@RequestParam("id") Long id) { |
||||
|
hardnessThreeService.deleteHardnessThree(id); |
||||
|
return success(true); |
||||
|
} |
||||
|
|
||||
|
@GetMapping("/get") |
||||
|
@Operation(summary = "获得实验室-布氏硬度") |
||||
|
@Parameter(name = "id", description = "编号", required = true, example = "1024") |
||||
|
public CommonResult<HardnessThreeRespVO> getHardnessThree(@RequestParam("id") Long id) { |
||||
|
HardnessThreeDO hardnessThree = hardnessThreeService.getHardnessThree(id); |
||||
|
return success(HardnessThreeConvert.INSTANCE.convert(hardnessThree)); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
@GetMapping("/page") |
||||
|
@Operation(summary = "获得实验室-布氏硬度分页") |
||||
|
public CommonResult<PageResult<HardnessThreeRespVO>> getHardnessThreePage(@Valid HardnessThreePageReqVO pageVO) { |
||||
|
PageResult<HardnessThreeDO> pageResult = hardnessThreeService.getHardnessThreePage(pageVO); |
||||
|
return success(HardnessThreeConvert.INSTANCE.convertPage(pageResult)); |
||||
|
} |
||||
|
|
||||
|
@GetMapping("/export-excel") |
||||
|
@Operation(summary = "导出实验室-布氏硬度 Excel") |
||||
|
@OperateLog(type = EXPORT) |
||||
|
public void exportHardnessThreeExcel(@Valid HardnessThreeExportReqVO exportReqVO, |
||||
|
HttpServletResponse response) throws IOException { |
||||
|
List<HardnessThreeDO> list = hardnessThreeService.getHardnessThreeList(exportReqVO); |
||||
|
// 导出 Excel
|
||||
|
List<HardnessThreeExcelVO> datas = HardnessThreeConvert.INSTANCE.convertList02(list); |
||||
|
ExcelUtils.write(response, "实验室-布氏硬度.xls", "数据", HardnessThreeExcelVO.class, datas); |
||||
|
} |
||||
|
|
||||
|
@GetMapping("/get-import-template") |
||||
|
@Operation(summary = "获得导入实验室-布氏硬度模板") |
||||
|
public void importTemplate(HttpServletResponse response) throws IOException { |
||||
|
List<HardnessThreeExcelVO> list = Arrays.asList(); |
||||
|
// 输出
|
||||
|
ExcelUtils.write(response, "实验室-布氏硬度基本信息导入模板.xls", "实验室-布氏硬度基本信息列表", HardnessThreeExcelVO.class, list); |
||||
|
} |
||||
|
|
||||
|
@PostMapping("/import") |
||||
|
@Operation(summary = "导入实验室-布氏硬度基本信息") |
||||
|
@Parameters({ |
||||
|
@Parameter(name = "file", description = "Excel 文件", required = true), |
||||
|
@Parameter(name = "mode", description = "导入模式1更新2追加3覆盖", example = "1"), |
||||
|
@Parameter(name = "updatePart", description = "部分更新,默认为 true", example = "true") |
||||
|
}) |
||||
|
public CommonResult<Map<String, Object>> importExcel(HttpServletResponse response, |
||||
|
@RequestParam("file") MultipartFile file, |
||||
|
@RequestParam(value = "mode") Integer mode, |
||||
|
@RequestParam(value = "updatePart", required = false, defaultValue = "false") Boolean updatePart) throws Exception { |
||||
|
|
||||
|
List<HardnessThreeExcelVO> list = ExcelUtils.read(file, HardnessThreeExcelVO.class); |
||||
|
List<HardnessThreeExcelVO> errorList = hardnessThreeService.importHardnessThreeList(list, mode, updatePart); |
||||
|
|
||||
|
Map<String, Object> returnMap = new HashMap<>(); |
||||
|
returnMap.put("errorCount", errorList.size()); |
||||
|
if(!errorList.isEmpty()) { |
||||
|
String url = ExcelUtils.writeLocalFile("实验室-布氏硬度基本信息导入错误数据" + LocalDateTime.now().toEpochSecond(ZoneOffset.of("+8")) + ".xlsx", "错误列表", errorList); |
||||
|
returnMap.put("errorFile", url); |
||||
|
} |
||||
|
|
||||
|
return success(returnMap); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,48 @@ |
|||||
|
package com.win.module.lab.controller.hardnessthree.vo; |
||||
|
|
||||
|
import io.swagger.v3.oas.annotations.media.Schema; |
||||
|
import lombok.*; |
||||
|
|
||||
|
/** |
||||
|
* 实验室-布氏硬度 Base VO,提供给添加、修改、详细的子 VO 使用 |
||||
|
* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class HardnessThreeBaseVO { |
||||
|
|
||||
|
@Schema(description = "批次号") |
||||
|
private String batchNo; |
||||
|
|
||||
|
@Schema(description = "送样单位") |
||||
|
private String sydw; |
||||
|
|
||||
|
@Schema(description = "硬度") |
||||
|
private String standard; |
||||
|
|
||||
|
@Schema(description = "材质") |
||||
|
private String cz; |
||||
|
|
||||
|
@Schema(description = "规格") |
||||
|
private String guig; |
||||
|
|
||||
|
@Schema(description = "实验人") |
||||
|
private String testUser; |
||||
|
|
||||
|
@Schema(description = "实验日期") |
||||
|
private String testDate; |
||||
|
|
||||
|
@Schema(description = "实验力(KN)") |
||||
|
private String syl; |
||||
|
|
||||
|
@Schema(description = "压头尺寸(mm)") |
||||
|
private String ytcc; |
||||
|
|
||||
|
@Schema(description = "压痕直径(mm)") |
||||
|
private String yhzj; |
||||
|
|
||||
|
@Schema(description = "硬度") |
||||
|
private String testYd; |
||||
|
|
||||
|
@Schema(description = "审核状态") |
||||
|
private String auditStatus; |
||||
|
} |
@ -0,0 +1,12 @@ |
|||||
|
package com.win.module.lab.controller.hardnessthree.vo; |
||||
|
|
||||
|
import lombok.*; |
||||
|
import io.swagger.v3.oas.annotations.media.Schema; |
||||
|
|
||||
|
@Schema(description = "管理后台 - 实验室-布氏硬度创建 Request VO") |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper = true) |
||||
|
@ToString(callSuper = true) |
||||
|
public class HardnessThreeCreateReqVO extends HardnessThreeBaseVO { |
||||
|
|
||||
|
} |
@ -0,0 +1,58 @@ |
|||||
|
package com.win.module.lab.controller.hardnessthree.vo; |
||||
|
|
||||
|
import io.swagger.v3.oas.annotations.media.Schema; |
||||
|
import lombok.*; |
||||
|
import java.time.LocalDateTime; |
||||
|
|
||||
|
import com.alibaba.excel.annotation.ExcelProperty; |
||||
|
|
||||
|
/** |
||||
|
* 实验室-布氏硬度 Excel VO |
||||
|
* |
||||
|
* @author 超级管理员 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class HardnessThreeExcelVO { |
||||
|
|
||||
|
@ExcelProperty("主键、自增") |
||||
|
private Long id; |
||||
|
|
||||
|
@ExcelProperty("批次号") |
||||
|
private String batchNo; |
||||
|
|
||||
|
@ExcelProperty("送样单位") |
||||
|
private String sydw; |
||||
|
|
||||
|
@ExcelProperty("硬度") |
||||
|
private String standard; |
||||
|
|
||||
|
@ExcelProperty("材质") |
||||
|
private String cz; |
||||
|
|
||||
|
@ExcelProperty("规格") |
||||
|
private String guig; |
||||
|
|
||||
|
@ExcelProperty("实验人") |
||||
|
private String testUser; |
||||
|
|
||||
|
@ExcelProperty("实验日期") |
||||
|
private String testDate; |
||||
|
|
||||
|
@ExcelProperty("实验力(KN)") |
||||
|
private String syl; |
||||
|
|
||||
|
@ExcelProperty("压头尺寸(mm)") |
||||
|
private String ytcc; |
||||
|
|
||||
|
@ExcelProperty("压痕直径(mm)") |
||||
|
private String yhzj; |
||||
|
|
||||
|
@ExcelProperty("硬度") |
||||
|
private String testYd; |
||||
|
|
||||
|
@ExcelProperty("创建时间") |
||||
|
private LocalDateTime createTime; |
||||
|
|
||||
|
@ExcelProperty("审核状态") |
||||
|
private String auditStatus; |
||||
|
} |
@ -0,0 +1,54 @@ |
|||||
|
package com.win.module.lab.controller.hardnessthree.vo; |
||||
|
|
||||
|
import lombok.*; |
||||
|
import io.swagger.v3.oas.annotations.media.Schema; |
||||
|
import java.time.LocalDateTime; |
||||
|
import org.springframework.format.annotation.DateTimeFormat; |
||||
|
|
||||
|
import static com.win.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; |
||||
|
|
||||
|
@Schema(description = "管理后台 - 实验室-布氏硬度 Excel 导出 Request VO,参数和 HardnessThreePageReqVO 是一致的") |
||||
|
@Data |
||||
|
public class HardnessThreeExportReqVO { |
||||
|
|
||||
|
@Schema(description = "批次号") |
||||
|
private String batchNo; |
||||
|
|
||||
|
@Schema(description = "送样单位") |
||||
|
private String sydw; |
||||
|
|
||||
|
@Schema(description = "硬度") |
||||
|
private String standard; |
||||
|
|
||||
|
@Schema(description = "材质") |
||||
|
private String cz; |
||||
|
|
||||
|
@Schema(description = "规格") |
||||
|
private String guig; |
||||
|
|
||||
|
@Schema(description = "实验人") |
||||
|
private String testUser; |
||||
|
|
||||
|
@Schema(description = "实验日期") |
||||
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
||||
|
private String[] testDate; |
||||
|
|
||||
|
@Schema(description = "实验力(KN)") |
||||
|
private String syl; |
||||
|
|
||||
|
@Schema(description = "压头尺寸(mm)") |
||||
|
private String ytcc; |
||||
|
|
||||
|
@Schema(description = "压痕直径(mm)") |
||||
|
private String yhzj; |
||||
|
|
||||
|
@Schema(description = "硬度") |
||||
|
private String testYd; |
||||
|
|
||||
|
@Schema(description = "创建时间") |
||||
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
||||
|
private LocalDateTime[] createTime; |
||||
|
|
||||
|
@Schema(description = "审核状态") |
||||
|
private String auditStatus; |
||||
|
} |
@ -0,0 +1,57 @@ |
|||||
|
package com.win.module.lab.controller.hardnessthree.vo; |
||||
|
|
||||
|
import lombok.*; |
||||
|
import io.swagger.v3.oas.annotations.media.Schema; |
||||
|
import com.win.framework.common.pojo.PageParam; |
||||
|
import org.springframework.format.annotation.DateTimeFormat; |
||||
|
import java.time.LocalDateTime; |
||||
|
|
||||
|
import static com.win.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; |
||||
|
|
||||
|
@Schema(description = "管理后台 - 实验室-布氏硬度分页 Request VO") |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper = true) |
||||
|
@ToString(callSuper = true) |
||||
|
public class HardnessThreePageReqVO extends PageParam { |
||||
|
|
||||
|
@Schema(description = "批次号") |
||||
|
private String batchNo; |
||||
|
|
||||
|
@Schema(description = "送样单位") |
||||
|
private String sydw; |
||||
|
|
||||
|
@Schema(description = "硬度") |
||||
|
private String standard; |
||||
|
|
||||
|
@Schema(description = "材质") |
||||
|
private String cz; |
||||
|
|
||||
|
@Schema(description = "规格") |
||||
|
private String guig; |
||||
|
|
||||
|
@Schema(description = "实验人") |
||||
|
private String testUser; |
||||
|
|
||||
|
@Schema(description = "实验日期") |
||||
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
||||
|
private String[] testDate; |
||||
|
|
||||
|
@Schema(description = "实验力(KN)") |
||||
|
private String syl; |
||||
|
|
||||
|
@Schema(description = "压头尺寸(mm)") |
||||
|
private String ytcc; |
||||
|
|
||||
|
@Schema(description = "压痕直径(mm)") |
||||
|
private String yhzj; |
||||
|
|
||||
|
@Schema(description = "硬度") |
||||
|
private String testYd; |
||||
|
|
||||
|
@Schema(description = "创建时间") |
||||
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
||||
|
private LocalDateTime[] createTime; |
||||
|
|
||||
|
@Schema(description = "审核状态") |
||||
|
private String auditStatus; |
||||
|
} |
@ -0,0 +1,19 @@ |
|||||
|
package com.win.module.lab.controller.hardnessthree.vo; |
||||
|
|
||||
|
import io.swagger.v3.oas.annotations.media.Schema; |
||||
|
import lombok.*; |
||||
|
import java.time.LocalDateTime; |
||||
|
|
||||
|
@Schema(description = "管理后台 - 实验室-布氏硬度 Response VO") |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper = true) |
||||
|
@ToString(callSuper = true) |
||||
|
public class HardnessThreeRespVO extends HardnessThreeBaseVO { |
||||
|
|
||||
|
@Schema(description = "主键、自增", requiredMode = Schema.RequiredMode.REQUIRED, example = "28090") |
||||
|
private Long id; |
||||
|
|
||||
|
@Schema(description = "创建时间") |
||||
|
private LocalDateTime createTime; |
||||
|
|
||||
|
} |
@ -0,0 +1,17 @@ |
|||||
|
package com.win.module.lab.controller.hardnessthree.vo; |
||||
|
|
||||
|
import io.swagger.v3.oas.annotations.media.Schema; |
||||
|
import lombok.*; |
||||
|
import javax.validation.constraints.*; |
||||
|
|
||||
|
@Schema(description = "管理后台 - 实验室-布氏硬度更新 Request VO") |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper = true) |
||||
|
@ToString(callSuper = true) |
||||
|
public class HardnessThreeUpdateReqVO extends HardnessThreeBaseVO { |
||||
|
|
||||
|
@Schema(description = "主键、自增", requiredMode = Schema.RequiredMode.REQUIRED, example = "28090") |
||||
|
@NotNull(message = "主键、自增不能为空") |
||||
|
private Long id; |
||||
|
|
||||
|
} |
@ -0,0 +1,125 @@ |
|||||
|
package com.win.module.lab.controller.hardnesstwo; |
||||
|
|
||||
|
import io.swagger.v3.oas.annotations.Parameters; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
import javax.annotation.Resource; |
||||
|
import org.springframework.validation.annotation.Validated; |
||||
|
import io.swagger.v3.oas.annotations.tags.Tag; |
||||
|
import io.swagger.v3.oas.annotations.Parameter; |
||||
|
import io.swagger.v3.oas.annotations.Operation; |
||||
|
|
||||
|
import javax.validation.*; |
||||
|
import javax.servlet.http.*; |
||||
|
import java.time.LocalDateTime; |
||||
|
import java.time.ZoneOffset; |
||||
|
import java.util.*; |
||||
|
import java.io.IOException; |
||||
|
|
||||
|
import com.win.framework.common.pojo.PageResult; |
||||
|
import com.win.framework.common.pojo.CommonResult; |
||||
|
import static com.win.framework.common.pojo.CommonResult.success; |
||||
|
|
||||
|
import com.win.framework.excel.core.util.ExcelUtils; |
||||
|
|
||||
|
import com.win.framework.operatelog.core.annotations.OperateLog; |
||||
|
import static com.win.framework.operatelog.core.enums.OperateTypeEnum.*; |
||||
|
|
||||
|
import com.win.module.lab.controller.hardnesstwo.vo.*; |
||||
|
import com.win.module.lab.dal.dataobject.hardnesstwo.HardnessTwoDO; |
||||
|
import com.win.module.lab.convert.hardnesstwo.HardnessTwoConvert; |
||||
|
import com.win.module.lab.service.hardnesstwo.HardnessTwoService; |
||||
|
import org.springframework.web.multipart.MultipartFile; |
||||
|
|
||||
|
|
||||
|
@Tag(name = "管理后台 - 实验室-韦氏硬度2") |
||||
|
@RestController |
||||
|
@RequestMapping("/lab/hardnesstwo") |
||||
|
@Validated |
||||
|
public class HardnessTwoController { |
||||
|
|
||||
|
@Resource |
||||
|
private HardnessTwoService hardnessTwoService; |
||||
|
|
||||
|
|
||||
|
@PostMapping("/create") |
||||
|
@Operation(summary = "创建实验室-韦氏硬度2") |
||||
|
public CommonResult<Long> createHardnessTwo(@Valid @RequestBody HardnessTwoCreateReqVO createReqVO) { |
||||
|
return success(hardnessTwoService.createHardnessTwo(createReqVO)); |
||||
|
} |
||||
|
|
||||
|
@PutMapping("/update") |
||||
|
@Operation(summary = "更新实验室-韦氏硬度2") |
||||
|
public CommonResult<Boolean> updateHardnessTwo(@Valid @RequestBody HardnessTwoUpdateReqVO updateReqVO) { |
||||
|
hardnessTwoService.updateHardnessTwo(updateReqVO); |
||||
|
return success(true); |
||||
|
} |
||||
|
|
||||
|
@DeleteMapping("/delete") |
||||
|
@Operation(summary = "删除实验室-韦氏硬度2") |
||||
|
@Parameter(name = "id", description = "编号", required = true) |
||||
|
public CommonResult<Boolean> deleteHardnessTwo(@RequestParam("id") Long id) { |
||||
|
hardnessTwoService.deleteHardnessTwo(id); |
||||
|
return success(true); |
||||
|
} |
||||
|
|
||||
|
@GetMapping("/get") |
||||
|
@Operation(summary = "获得实验室-韦氏硬度2") |
||||
|
@Parameter(name = "id", description = "编号", required = true, example = "1024") |
||||
|
public CommonResult<HardnessTwoRespVO> getHardnessTwo(@RequestParam("id") Long id) { |
||||
|
HardnessTwoDO hardnessTwo = hardnessTwoService.getHardnessTwo(id); |
||||
|
return success(HardnessTwoConvert.INSTANCE.convert(hardnessTwo)); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
@GetMapping("/page") |
||||
|
@Operation(summary = "获得实验室-韦氏硬度2分页") |
||||
|
public CommonResult<PageResult<HardnessTwoRespVO>> getHardnessTwoPage(@Valid HardnessTwoPageReqVO pageVO) { |
||||
|
PageResult<HardnessTwoDO> pageResult = hardnessTwoService.getHardnessTwoPage(pageVO); |
||||
|
return success(HardnessTwoConvert.INSTANCE.convertPage(pageResult)); |
||||
|
} |
||||
|
|
||||
|
@GetMapping("/export-excel") |
||||
|
@Operation(summary = "导出实验室-韦氏硬度2 Excel") |
||||
|
@OperateLog(type = EXPORT) |
||||
|
public void exportHardnessTwoExcel(@Valid HardnessTwoExportReqVO exportReqVO, |
||||
|
HttpServletResponse response) throws IOException { |
||||
|
List<HardnessTwoDO> list = hardnessTwoService.getHardnessTwoList(exportReqVO); |
||||
|
// 导出 Excel
|
||||
|
List<HardnessTwoExcelVO> datas = HardnessTwoConvert.INSTANCE.convertList02(list); |
||||
|
ExcelUtils.write(response, "实验室-韦氏硬度2.xls", "数据", HardnessTwoExcelVO.class, datas); |
||||
|
} |
||||
|
|
||||
|
@GetMapping("/get-import-template") |
||||
|
@Operation(summary = "获得导入实验室-韦氏硬度2模板") |
||||
|
public void importTemplate(HttpServletResponse response) throws IOException { |
||||
|
List<HardnessTwoExcelVO> list = Arrays.asList(); |
||||
|
// 输出
|
||||
|
ExcelUtils.write(response, "实验室-韦氏硬度2基本信息导入模板.xls", "实验室-韦氏硬度2基本信息列表", HardnessTwoExcelVO.class, list); |
||||
|
} |
||||
|
|
||||
|
@PostMapping("/import") |
||||
|
@Operation(summary = "导入实验室-韦氏硬度2基本信息") |
||||
|
@Parameters({ |
||||
|
@Parameter(name = "file", description = "Excel 文件", required = true), |
||||
|
@Parameter(name = "mode", description = "导入模式1更新2追加3覆盖", example = "1"), |
||||
|
@Parameter(name = "updatePart", description = "部分更新,默认为 true", example = "true") |
||||
|
}) |
||||
|
public CommonResult<Map<String, Object>> importExcel(HttpServletResponse response, |
||||
|
@RequestParam("file") MultipartFile file, |
||||
|
@RequestParam(value = "mode") Integer mode, |
||||
|
@RequestParam(value = "updatePart", required = false, defaultValue = "false") Boolean updatePart) throws Exception { |
||||
|
|
||||
|
List<HardnessTwoExcelVO> list = ExcelUtils.read(file, HardnessTwoExcelVO.class); |
||||
|
List<HardnessTwoExcelVO> errorList = hardnessTwoService.importHardnessTwoList(list, mode, updatePart); |
||||
|
|
||||
|
Map<String, Object> returnMap = new HashMap<>(); |
||||
|
returnMap.put("errorCount", errorList.size()); |
||||
|
if(!errorList.isEmpty()) { |
||||
|
String url = ExcelUtils.writeLocalFile("实验室-韦氏硬度2基本信息导入错误数据" + LocalDateTime.now().toEpochSecond(ZoneOffset.of("+8")) + ".xlsx", "错误列表", errorList); |
||||
|
returnMap.put("errorFile", url); |
||||
|
} |
||||
|
|
||||
|
return success(returnMap); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,52 @@ |
|||||
|
package com.win.module.lab.controller.hardnesstwo.vo; |
||||
|
|
||||
|
import io.swagger.v3.oas.annotations.media.Schema; |
||||
|
import lombok.*; |
||||
|
|
||||
|
/** |
||||
|
* 实验室-韦氏硬度2 Base VO,提供给添加、修改、详细的子 VO 使用 |
||||
|
* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class HardnessTwoBaseVO { |
||||
|
|
||||
|
@Schema(description = "批次号") |
||||
|
private String batchNo; |
||||
|
|
||||
|
@Schema(description = "送样单位") |
||||
|
private String sydw; |
||||
|
|
||||
|
@Schema(description = "标准") |
||||
|
private String standard; |
||||
|
|
||||
|
@Schema(description = "材质") |
||||
|
private String cz; |
||||
|
|
||||
|
@Schema(description = "规格") |
||||
|
private String guig; |
||||
|
|
||||
|
@Schema(description = "实验人") |
||||
|
private String testUser; |
||||
|
|
||||
|
@Schema(description = "实验日期") |
||||
|
private String testDate; |
||||
|
|
||||
|
@Schema(description = "类别", example = "2") |
||||
|
private String testType; |
||||
|
|
||||
|
@Schema(description = "d1(um)") |
||||
|
private String dfirst; |
||||
|
|
||||
|
@Schema(description = "d2(um)") |
||||
|
private String dtwo; |
||||
|
|
||||
|
@Schema(description = "平均(um)") |
||||
|
private String davg; |
||||
|
|
||||
|
@Schema(description = "硬度") |
||||
|
private String testYd; |
||||
|
|
||||
|
@Schema(description = "审核状态") |
||||
|
private String auditStatus; |
||||
|
|
||||
|
} |
@ -0,0 +1,12 @@ |
|||||
|
package com.win.module.lab.controller.hardnesstwo.vo; |
||||
|
|
||||
|
import lombok.*; |
||||
|
import io.swagger.v3.oas.annotations.media.Schema; |
||||
|
|
||||
|
@Schema(description = "管理后台 - 实验室-韦氏硬度2创建 Request VO") |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper = true) |
||||
|
@ToString(callSuper = true) |
||||
|
public class HardnessTwoCreateReqVO extends HardnessTwoBaseVO { |
||||
|
|
||||
|
} |
@ -0,0 +1,60 @@ |
|||||
|
package com.win.module.lab.controller.hardnesstwo.vo; |
||||
|
|
||||
|
import io.swagger.v3.oas.annotations.media.Schema; |
||||
|
import lombok.*; |
||||
|
import java.time.LocalDateTime; |
||||
|
import com.alibaba.excel.annotation.ExcelProperty; |
||||
|
|
||||
|
/** |
||||
|
* 实验室-韦氏硬度2 Excel VO |
||||
|
* |
||||
|
* @author 超级管理员 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class HardnessTwoExcelVO { |
||||
|
|
||||
|
@ExcelProperty("主键、自增") |
||||
|
private Long id; |
||||
|
|
||||
|
@ExcelProperty("批次号") |
||||
|
private String batchNo; |
||||
|
|
||||
|
@ExcelProperty("送样单位") |
||||
|
private String sydw; |
||||
|
|
||||
|
@ExcelProperty("标准") |
||||
|
private String standard; |
||||
|
|
||||
|
@ExcelProperty("材质") |
||||
|
private String cz; |
||||
|
|
||||
|
@ExcelProperty("规格") |
||||
|
private String guig; |
||||
|
|
||||
|
@ExcelProperty("实验人") |
||||
|
private String testUser; |
||||
|
|
||||
|
@ExcelProperty("实验日期") |
||||
|
private String testDate; |
||||
|
|
||||
|
@ExcelProperty("类别") |
||||
|
private String testType; |
||||
|
|
||||
|
@ExcelProperty("d1(um)") |
||||
|
private String dfirst; |
||||
|
|
||||
|
@ExcelProperty("d2(um)") |
||||
|
private String dtwo; |
||||
|
|
||||
|
@ExcelProperty("平均(um)") |
||||
|
private String davg; |
||||
|
|
||||
|
@ExcelProperty("硬度") |
||||
|
private String testYd; |
||||
|
|
||||
|
@ExcelProperty("创建时间") |
||||
|
private LocalDateTime createTime; |
||||
|
|
||||
|
@ExcelProperty("审核状态") |
||||
|
private String auditStatus; |
||||
|
} |
@ -0,0 +1,57 @@ |
|||||
|
package com.win.module.lab.controller.hardnesstwo.vo; |
||||
|
|
||||
|
import lombok.*; |
||||
|
import io.swagger.v3.oas.annotations.media.Schema; |
||||
|
import java.time.LocalDateTime; |
||||
|
import org.springframework.format.annotation.DateTimeFormat; |
||||
|
|
||||
|
import static com.win.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; |
||||
|
|
||||
|
@Schema(description = "管理后台 - 实验室-韦氏硬度2 Excel 导出 Request VO,参数和 HardnessTwoPageReqVO 是一致的") |
||||
|
@Data |
||||
|
public class HardnessTwoExportReqVO { |
||||
|
|
||||
|
@Schema(description = "批次号") |
||||
|
private String batchNo; |
||||
|
|
||||
|
@Schema(description = "送样单位") |
||||
|
private String sydw; |
||||
|
|
||||
|
@Schema(description = "标准") |
||||
|
private String standard; |
||||
|
|
||||
|
@Schema(description = "材质") |
||||
|
private String cz; |
||||
|
|
||||
|
@Schema(description = "规格") |
||||
|
private String guig; |
||||
|
|
||||
|
@Schema(description = "实验人") |
||||
|
private String testUser; |
||||
|
|
||||
|
@Schema(description = "实验日期") |
||||
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
||||
|
private String[] testDate; |
||||
|
|
||||
|
@Schema(description = "类别", example = "2") |
||||
|
private String testType; |
||||
|
|
||||
|
@Schema(description = "d1(um)") |
||||
|
private String dfirst; |
||||
|
|
||||
|
@Schema(description = "d2(um)") |
||||
|
private String dtwo; |
||||
|
|
||||
|
@Schema(description = "平均(um)") |
||||
|
private String davg; |
||||
|
|
||||
|
@Schema(description = "硬度") |
||||
|
private String testYd; |
||||
|
|
||||
|
@Schema(description = "创建时间") |
||||
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
||||
|
private LocalDateTime[] createTime; |
||||
|
|
||||
|
@Schema(description = "审核状态") |
||||
|
private String auditStatus; |
||||
|
} |
@ -0,0 +1,60 @@ |
|||||
|
package com.win.module.lab.controller.hardnesstwo.vo; |
||||
|
|
||||
|
import lombok.*; |
||||
|
import io.swagger.v3.oas.annotations.media.Schema; |
||||
|
import com.win.framework.common.pojo.PageParam; |
||||
|
import org.springframework.format.annotation.DateTimeFormat; |
||||
|
import java.time.LocalDateTime; |
||||
|
|
||||
|
import static com.win.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; |
||||
|
|
||||
|
@Schema(description = "管理后台 - 实验室-韦氏硬度2分页 Request VO") |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper = true) |
||||
|
@ToString(callSuper = true) |
||||
|
public class HardnessTwoPageReqVO extends PageParam { |
||||
|
|
||||
|
@Schema(description = "批次号") |
||||
|
private String batchNo; |
||||
|
|
||||
|
@Schema(description = "送样单位") |
||||
|
private String sydw; |
||||
|
|
||||
|
@Schema(description = "标准") |
||||
|
private String standard; |
||||
|
|
||||
|
@Schema(description = "材质") |
||||
|
private String cz; |
||||
|
|
||||
|
@Schema(description = "规格") |
||||
|
private String guig; |
||||
|
|
||||
|
@Schema(description = "实验人") |
||||
|
private String testUser; |
||||
|
|
||||
|
@Schema(description = "实验日期") |
||||
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
||||
|
private String[] testDate; |
||||
|
|
||||
|
@Schema(description = "类别", example = "2") |
||||
|
private String testType; |
||||
|
|
||||
|
@Schema(description = "d1(um)") |
||||
|
private String dfirst; |
||||
|
|
||||
|
@Schema(description = "d2(um)") |
||||
|
private String dtwo; |
||||
|
|
||||
|
@Schema(description = "平均(um)") |
||||
|
private String davg; |
||||
|
|
||||
|
@Schema(description = "硬度") |
||||
|
private String testYd; |
||||
|
|
||||
|
@Schema(description = "创建时间") |
||||
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
||||
|
private LocalDateTime[] createTime; |
||||
|
|
||||
|
@Schema(description = "审核状态") |
||||
|
private String auditStatus; |
||||
|
} |
@ -0,0 +1,19 @@ |
|||||
|
package com.win.module.lab.controller.hardnesstwo.vo; |
||||
|
|
||||
|
import io.swagger.v3.oas.annotations.media.Schema; |
||||
|
import lombok.*; |
||||
|
import java.time.LocalDateTime; |
||||
|
|
||||
|
@Schema(description = "管理后台 - 实验室-韦氏硬度2 Response VO") |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper = true) |
||||
|
@ToString(callSuper = true) |
||||
|
public class HardnessTwoRespVO extends HardnessTwoBaseVO { |
||||
|
|
||||
|
@Schema(description = "主键、自增", requiredMode = Schema.RequiredMode.REQUIRED, example = "1589") |
||||
|
private Long id; |
||||
|
|
||||
|
@Schema(description = "创建时间") |
||||
|
private LocalDateTime createTime; |
||||
|
|
||||
|
} |
@ -0,0 +1,17 @@ |
|||||
|
package com.win.module.lab.controller.hardnesstwo.vo; |
||||
|
|
||||
|
import io.swagger.v3.oas.annotations.media.Schema; |
||||
|
import lombok.*; |
||||
|
import javax.validation.constraints.*; |
||||
|
|
||||
|
@Schema(description = "管理后台 - 实验室-韦氏硬度2更新 Request VO") |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper = true) |
||||
|
@ToString(callSuper = true) |
||||
|
public class HardnessTwoUpdateReqVO extends HardnessTwoBaseVO { |
||||
|
|
||||
|
@Schema(description = "主键、自增", requiredMode = Schema.RequiredMode.REQUIRED, example = "1589") |
||||
|
@NotNull(message = "主键、自增不能为空") |
||||
|
private Long id; |
||||
|
|
||||
|
} |
@ -0,0 +1,37 @@ |
|||||
|
package com.win.module.lab.convert.asyncoprlog; |
||||
|
|
||||
|
import java.util.*; |
||||
|
|
||||
|
import com.win.framework.common.pojo.PageResult; |
||||
|
|
||||
|
import com.win.module.lab.api.asyncoprlog.dto.AsyncOprLogDTO; |
||||
|
import org.mapstruct.Mapper; |
||||
|
import org.mapstruct.factory.Mappers; |
||||
|
import com.win.module.lab.controller.asyncoprlog.vo.*; |
||||
|
import com.win.module.lab.dal.dataobject.asyncoprlog.AsyncOprLogDO; |
||||
|
|
||||
|
/** |
||||
|
* 实验室-主动同步日志 Convert |
||||
|
* |
||||
|
* @author 超级管理员 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface AsyncOprLogConvert { |
||||
|
|
||||
|
AsyncOprLogConvert INSTANCE = Mappers.getMapper(AsyncOprLogConvert.class); |
||||
|
|
||||
|
AsyncOprLogDO convert(AsyncOprLogCreateReqVO bean); |
||||
|
|
||||
|
AsyncOprLogDO convert(AsyncOprLogUpdateReqVO bean); |
||||
|
|
||||
|
AsyncOprLogDO convert(AsyncOprLogDTO bean); |
||||
|
|
||||
|
AsyncOprLogRespVO convert(AsyncOprLogDO bean); |
||||
|
|
||||
|
List<AsyncOprLogRespVO> convertList(List<AsyncOprLogDO> list); |
||||
|
|
||||
|
PageResult<AsyncOprLogRespVO> convertPage(PageResult<AsyncOprLogDO> page); |
||||
|
|
||||
|
List<AsyncOprLogExcelVO> convertList02(List<AsyncOprLogDO> list); |
||||
|
|
||||
|
} |
@ -0,0 +1,34 @@ |
|||||
|
package com.win.module.lab.convert.hardnessthree; |
||||
|
|
||||
|
import java.util.*; |
||||
|
|
||||
|
import com.win.framework.common.pojo.PageResult; |
||||
|
|
||||
|
import org.mapstruct.Mapper; |
||||
|
import org.mapstruct.factory.Mappers; |
||||
|
import com.win.module.lab.controller.hardnessthree.vo.*; |
||||
|
import com.win.module.lab.dal.dataobject.hardnessthree.HardnessThreeDO; |
||||
|
|
||||
|
/** |
||||
|
* 实验室-布氏硬度 Convert |
||||
|
* |
||||
|
* @author 超级管理员 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface HardnessThreeConvert { |
||||
|
|
||||
|
HardnessThreeConvert INSTANCE = Mappers.getMapper(HardnessThreeConvert.class); |
||||
|
|
||||
|
HardnessThreeDO convert(HardnessThreeCreateReqVO bean); |
||||
|
|
||||
|
HardnessThreeDO convert(HardnessThreeUpdateReqVO bean); |
||||
|
|
||||
|
HardnessThreeRespVO convert(HardnessThreeDO bean); |
||||
|
|
||||
|
List<HardnessThreeRespVO> convertList(List<HardnessThreeDO> list); |
||||
|
|
||||
|
PageResult<HardnessThreeRespVO> convertPage(PageResult<HardnessThreeDO> page); |
||||
|
|
||||
|
List<HardnessThreeExcelVO> convertList02(List<HardnessThreeDO> list); |
||||
|
|
||||
|
} |
@ -0,0 +1,34 @@ |
|||||
|
package com.win.module.lab.convert.hardnesstwo; |
||||
|
|
||||
|
import java.util.*; |
||||
|
|
||||
|
import com.win.framework.common.pojo.PageResult; |
||||
|
|
||||
|
import org.mapstruct.Mapper; |
||||
|
import org.mapstruct.factory.Mappers; |
||||
|
import com.win.module.lab.controller.hardnesstwo.vo.*; |
||||
|
import com.win.module.lab.dal.dataobject.hardnesstwo.HardnessTwoDO; |
||||
|
|
||||
|
/** |
||||
|
* 实验室-韦氏硬度2 Convert |
||||
|
* |
||||
|
* @author 超级管理员 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface HardnessTwoConvert { |
||||
|
|
||||
|
HardnessTwoConvert INSTANCE = Mappers.getMapper(HardnessTwoConvert.class); |
||||
|
|
||||
|
HardnessTwoDO convert(HardnessTwoCreateReqVO bean); |
||||
|
|
||||
|
HardnessTwoDO convert(HardnessTwoUpdateReqVO bean); |
||||
|
|
||||
|
HardnessTwoRespVO convert(HardnessTwoDO bean); |
||||
|
|
||||
|
List<HardnessTwoRespVO> convertList(List<HardnessTwoDO> list); |
||||
|
|
||||
|
PageResult<HardnessTwoRespVO> convertPage(PageResult<HardnessTwoDO> page); |
||||
|
|
||||
|
List<HardnessTwoExcelVO> convertList02(List<HardnessTwoDO> list); |
||||
|
|
||||
|
} |
@ -0,0 +1,49 @@ |
|||||
|
package com.win.module.lab.dal.dataobject.asyncoprlog; |
||||
|
|
||||
|
import lombok.*; |
||||
|
|
||||
|
import java.time.LocalDate; |
||||
|
import com.baomidou.mybatisplus.annotation.*; |
||||
|
import com.win.framework.mybatis.core.dataobject.BaseDO; |
||||
|
|
||||
|
/** |
||||
|
* 实验室-主动同步日志 DO |
||||
|
* |
||||
|
* @author 超级管理员 |
||||
|
*/ |
||||
|
@TableName("lab_async_opr_log") |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper = true) |
||||
|
@ToString(callSuper = true) |
||||
|
@Builder |
||||
|
@NoArgsConstructor |
||||
|
@AllArgsConstructor |
||||
|
public class AsyncOprLogDO extends BaseDO { |
||||
|
|
||||
|
/** |
||||
|
* 主键、自增 |
||||
|
*/ |
||||
|
@TableId |
||||
|
private Long id; |
||||
|
/** |
||||
|
* 业务类型 |
||||
|
*/ |
||||
|
private String busType; |
||||
|
/** |
||||
|
* 操作类型 |
||||
|
*/ |
||||
|
private String oprType; |
||||
|
/** |
||||
|
* 操作结果 |
||||
|
*/ |
||||
|
private String oprResult; |
||||
|
/** |
||||
|
* 描述 |
||||
|
*/ |
||||
|
private String oprMsg; |
||||
|
/** |
||||
|
* 业务日期 |
||||
|
*/ |
||||
|
private LocalDate busDate; |
||||
|
|
||||
|
} |
@ -0,0 +1,74 @@ |
|||||
|
package com.win.module.lab.dal.dataobject.hardnessthree; |
||||
|
|
||||
|
import lombok.*; |
||||
|
import com.baomidou.mybatisplus.annotation.*; |
||||
|
import com.win.framework.mybatis.core.dataobject.BaseDO; |
||||
|
|
||||
|
/** |
||||
|
* 实验室-布氏硬度 DO |
||||
|
* |
||||
|
* @author 超级管理员 |
||||
|
*/ |
||||
|
@TableName("lab_hardness_three") |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper = true) |
||||
|
@ToString(callSuper = true) |
||||
|
@Builder |
||||
|
@NoArgsConstructor |
||||
|
@AllArgsConstructor |
||||
|
public class HardnessThreeDO extends BaseDO { |
||||
|
|
||||
|
/** |
||||
|
* 主键、自增 |
||||
|
*/ |
||||
|
@TableId |
||||
|
private Long id; |
||||
|
/** |
||||
|
* 批次号 |
||||
|
*/ |
||||
|
private String batchNo; |
||||
|
/** |
||||
|
* 送样单位 |
||||
|
*/ |
||||
|
private String sydw; |
||||
|
/** |
||||
|
* 硬度 |
||||
|
*/ |
||||
|
private String standard; |
||||
|
/** |
||||
|
* 材质 |
||||
|
*/ |
||||
|
private String cz; |
||||
|
/** |
||||
|
* 规格 |
||||
|
*/ |
||||
|
private String guig; |
||||
|
/** |
||||
|
* 实验人 |
||||
|
*/ |
||||
|
private String testUser; |
||||
|
/** |
||||
|
* 实验日期 |
||||
|
*/ |
||||
|
private String testDate; |
||||
|
/** |
||||
|
* 实验力(KN) |
||||
|
*/ |
||||
|
private String syl; |
||||
|
/** |
||||
|
* 压头尺寸(mm) |
||||
|
*/ |
||||
|
private String ytcc; |
||||
|
/** |
||||
|
* 压痕直径(mm) |
||||
|
*/ |
||||
|
private String yhzj; |
||||
|
/** |
||||
|
* 硬度 |
||||
|
*/ |
||||
|
private String testYd; |
||||
|
/** |
||||
|
* 审核状态 |
||||
|
*/ |
||||
|
private String auditStatus; |
||||
|
} |
@ -0,0 +1,78 @@ |
|||||
|
package com.win.module.lab.dal.dataobject.hardnesstwo; |
||||
|
|
||||
|
import lombok.*; |
||||
|
import com.baomidou.mybatisplus.annotation.*; |
||||
|
import com.win.framework.mybatis.core.dataobject.BaseDO; |
||||
|
|
||||
|
/** |
||||
|
* 实验室-韦氏硬度2 DO |
||||
|
* |
||||
|
* @author 超级管理员 |
||||
|
*/ |
||||
|
@TableName("lab_hardness_two") |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper = true) |
||||
|
@ToString(callSuper = true) |
||||
|
@Builder |
||||
|
@NoArgsConstructor |
||||
|
@AllArgsConstructor |
||||
|
public class HardnessTwoDO extends BaseDO { |
||||
|
|
||||
|
/** |
||||
|
* 主键、自增 |
||||
|
*/ |
||||
|
@TableId |
||||
|
private Long id; |
||||
|
/** |
||||
|
* 批次号 |
||||
|
*/ |
||||
|
private String batchNo; |
||||
|
/** |
||||
|
* 送样单位 |
||||
|
*/ |
||||
|
private String sydw; |
||||
|
/** |
||||
|
* 标准 |
||||
|
*/ |
||||
|
private String standard; |
||||
|
/** |
||||
|
* 材质 |
||||
|
*/ |
||||
|
private String cz; |
||||
|
/** |
||||
|
* 规格 |
||||
|
*/ |
||||
|
private String guig; |
||||
|
/** |
||||
|
* 实验人 |
||||
|
*/ |
||||
|
private String testUser; |
||||
|
/** |
||||
|
* 实验日期 |
||||
|
*/ |
||||
|
private String testDate; |
||||
|
/** |
||||
|
* 类别 |
||||
|
*/ |
||||
|
private String testType; |
||||
|
/** |
||||
|
* d1(um) |
||||
|
*/ |
||||
|
private String dfirst; |
||||
|
/** |
||||
|
* d2(um) |
||||
|
*/ |
||||
|
private String dtwo; |
||||
|
/** |
||||
|
* 平均(um) |
||||
|
*/ |
||||
|
private String davg; |
||||
|
/** |
||||
|
* 硬度 |
||||
|
*/ |
||||
|
private String testYd; |
||||
|
/** |
||||
|
* 审核状态 |
||||
|
*/ |
||||
|
private String auditStatus; |
||||
|
} |
@ -0,0 +1,42 @@ |
|||||
|
package com.win.module.lab.dal.mysql.asyncoprlog; |
||||
|
|
||||
|
import java.util.*; |
||||
|
|
||||
|
import com.win.framework.common.pojo.PageResult; |
||||
|
import com.win.framework.mybatis.core.query.LambdaQueryWrapperX; |
||||
|
import com.win.framework.mybatis.core.mapper.BaseMapperX; |
||||
|
import com.win.module.lab.dal.dataobject.asyncoprlog.AsyncOprLogDO; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
import com.win.module.lab.controller.asyncoprlog.vo.*; |
||||
|
|
||||
|
/** |
||||
|
* 实验室-主动同步日志 Mapper |
||||
|
* |
||||
|
* @author 超级管理员 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface AsyncOprLogMapper extends BaseMapperX<AsyncOprLogDO> { |
||||
|
|
||||
|
default PageResult<AsyncOprLogDO> selectPage(AsyncOprLogPageReqVO reqVO) { |
||||
|
return selectPage(reqVO, new LambdaQueryWrapperX<AsyncOprLogDO>() |
||||
|
.eqIfPresent(AsyncOprLogDO::getBusType, reqVO.getBusType()) |
||||
|
.eqIfPresent(AsyncOprLogDO::getOprType, reqVO.getOprType()) |
||||
|
.eqIfPresent(AsyncOprLogDO::getOprResult, reqVO.getOprResult()) |
||||
|
.eqIfPresent(AsyncOprLogDO::getOprMsg, reqVO.getOprMsg()) |
||||
|
.betweenIfPresent(AsyncOprLogDO::getBusDate, reqVO.getBusDate()) |
||||
|
.betweenIfPresent(AsyncOprLogDO::getCreateTime, reqVO.getCreateTime()) |
||||
|
.orderByDesc(AsyncOprLogDO::getId)); |
||||
|
} |
||||
|
|
||||
|
default List<AsyncOprLogDO> selectList(AsyncOprLogExportReqVO reqVO) { |
||||
|
return selectList(new LambdaQueryWrapperX<AsyncOprLogDO>() |
||||
|
.eqIfPresent(AsyncOprLogDO::getBusType, reqVO.getBusType()) |
||||
|
.eqIfPresent(AsyncOprLogDO::getOprType, reqVO.getOprType()) |
||||
|
.eqIfPresent(AsyncOprLogDO::getOprResult, reqVO.getOprResult()) |
||||
|
.eqIfPresent(AsyncOprLogDO::getOprMsg, reqVO.getOprMsg()) |
||||
|
.betweenIfPresent(AsyncOprLogDO::getBusDate, reqVO.getBusDate()) |
||||
|
.betweenIfPresent(AsyncOprLogDO::getCreateTime, reqVO.getCreateTime()) |
||||
|
.orderByDesc(AsyncOprLogDO::getId)); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,56 @@ |
|||||
|
package com.win.module.lab.dal.mysql.hardnessthree; |
||||
|
|
||||
|
import java.util.*; |
||||
|
|
||||
|
import com.win.framework.common.pojo.PageResult; |
||||
|
import com.win.framework.mybatis.core.query.LambdaQueryWrapperX; |
||||
|
import com.win.framework.mybatis.core.mapper.BaseMapperX; |
||||
|
import com.win.module.lab.dal.dataobject.hardnessthree.HardnessThreeDO; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
import com.win.module.lab.controller.hardnessthree.vo.*; |
||||
|
|
||||
|
/** |
||||
|
* 实验室-布氏硬度 Mapper |
||||
|
* |
||||
|
* @author 超级管理员 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface HardnessThreeMapper extends BaseMapperX<HardnessThreeDO> { |
||||
|
|
||||
|
default PageResult<HardnessThreeDO> selectPage(HardnessThreePageReqVO reqVO) { |
||||
|
return selectPage(reqVO, new LambdaQueryWrapperX<HardnessThreeDO>() |
||||
|
.eqIfPresent(HardnessThreeDO::getBatchNo, reqVO.getBatchNo()) |
||||
|
.eqIfPresent(HardnessThreeDO::getSydw, reqVO.getSydw()) |
||||
|
.eqIfPresent(HardnessThreeDO::getStandard, reqVO.getStandard()) |
||||
|
.eqIfPresent(HardnessThreeDO::getCz, reqVO.getCz()) |
||||
|
.eqIfPresent(HardnessThreeDO::getGuig, reqVO.getGuig()) |
||||
|
.eqIfPresent(HardnessThreeDO::getTestUser, reqVO.getTestUser()) |
||||
|
.betweenIfPresent(HardnessThreeDO::getTestDate, reqVO.getTestDate()) |
||||
|
.eqIfPresent(HardnessThreeDO::getSyl, reqVO.getSyl()) |
||||
|
.eqIfPresent(HardnessThreeDO::getYtcc, reqVO.getYtcc()) |
||||
|
.eqIfPresent(HardnessThreeDO::getYhzj, reqVO.getYhzj()) |
||||
|
.eqIfPresent(HardnessThreeDO::getTestYd, reqVO.getTestYd()) |
||||
|
.betweenIfPresent(HardnessThreeDO::getCreateTime, reqVO.getCreateTime()) |
||||
|
.eqIfPresent(HardnessThreeDO::getAuditStatus, reqVO.getAuditStatus()) |
||||
|
.orderByDesc(HardnessThreeDO::getId)); |
||||
|
} |
||||
|
|
||||
|
default List<HardnessThreeDO> selectList(HardnessThreeExportReqVO reqVO) { |
||||
|
return selectList(new LambdaQueryWrapperX<HardnessThreeDO>() |
||||
|
.eqIfPresent(HardnessThreeDO::getBatchNo, reqVO.getBatchNo()) |
||||
|
.eqIfPresent(HardnessThreeDO::getSydw, reqVO.getSydw()) |
||||
|
.eqIfPresent(HardnessThreeDO::getStandard, reqVO.getStandard()) |
||||
|
.eqIfPresent(HardnessThreeDO::getCz, reqVO.getCz()) |
||||
|
.eqIfPresent(HardnessThreeDO::getGuig, reqVO.getGuig()) |
||||
|
.eqIfPresent(HardnessThreeDO::getTestUser, reqVO.getTestUser()) |
||||
|
.betweenIfPresent(HardnessThreeDO::getTestDate, reqVO.getTestDate()) |
||||
|
.eqIfPresent(HardnessThreeDO::getSyl, reqVO.getSyl()) |
||||
|
.eqIfPresent(HardnessThreeDO::getYtcc, reqVO.getYtcc()) |
||||
|
.eqIfPresent(HardnessThreeDO::getYhzj, reqVO.getYhzj()) |
||||
|
.eqIfPresent(HardnessThreeDO::getTestYd, reqVO.getTestYd()) |
||||
|
.betweenIfPresent(HardnessThreeDO::getCreateTime, reqVO.getCreateTime()) |
||||
|
.eqIfPresent(HardnessThreeDO::getAuditStatus, reqVO.getAuditStatus()) |
||||
|
.orderByDesc(HardnessThreeDO::getId)); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,58 @@ |
|||||
|
package com.win.module.lab.dal.mysql.hardnesstwo; |
||||
|
|
||||
|
import java.util.*; |
||||
|
|
||||
|
import com.win.framework.common.pojo.PageResult; |
||||
|
import com.win.framework.mybatis.core.query.LambdaQueryWrapperX; |
||||
|
import com.win.framework.mybatis.core.mapper.BaseMapperX; |
||||
|
import com.win.module.lab.dal.dataobject.hardnesstwo.HardnessTwoDO; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
import com.win.module.lab.controller.hardnesstwo.vo.*; |
||||
|
|
||||
|
/** |
||||
|
* 实验室-韦氏硬度2 Mapper |
||||
|
* |
||||
|
* @author 超级管理员 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface HardnessTwoMapper extends BaseMapperX<HardnessTwoDO> { |
||||
|
|
||||
|
default PageResult<HardnessTwoDO> selectPage(HardnessTwoPageReqVO reqVO) { |
||||
|
return selectPage(reqVO, new LambdaQueryWrapperX<HardnessTwoDO>() |
||||
|
.eqIfPresent(HardnessTwoDO::getBatchNo, reqVO.getBatchNo()) |
||||
|
.eqIfPresent(HardnessTwoDO::getSydw, reqVO.getSydw()) |
||||
|
.eqIfPresent(HardnessTwoDO::getStandard, reqVO.getStandard()) |
||||
|
.eqIfPresent(HardnessTwoDO::getCz, reqVO.getCz()) |
||||
|
.eqIfPresent(HardnessTwoDO::getGuig, reqVO.getGuig()) |
||||
|
.eqIfPresent(HardnessTwoDO::getTestUser, reqVO.getTestUser()) |
||||
|
.betweenIfPresent(HardnessTwoDO::getTestDate, reqVO.getTestDate()) |
||||
|
.eqIfPresent(HardnessTwoDO::getTestType, reqVO.getTestType()) |
||||
|
.eqIfPresent(HardnessTwoDO::getDfirst, reqVO.getDfirst()) |
||||
|
.eqIfPresent(HardnessTwoDO::getDtwo, reqVO.getDtwo()) |
||||
|
.eqIfPresent(HardnessTwoDO::getDavg, reqVO.getDavg()) |
||||
|
.eqIfPresent(HardnessTwoDO::getTestYd, reqVO.getTestYd()) |
||||
|
.betweenIfPresent(HardnessTwoDO::getCreateTime, reqVO.getCreateTime()) |
||||
|
.eqIfPresent(HardnessTwoDO::getAuditStatus, reqVO.getAuditStatus()) |
||||
|
.orderByDesc(HardnessTwoDO::getId)); |
||||
|
} |
||||
|
|
||||
|
default List<HardnessTwoDO> selectList(HardnessTwoExportReqVO reqVO) { |
||||
|
return selectList(new LambdaQueryWrapperX<HardnessTwoDO>() |
||||
|
.eqIfPresent(HardnessTwoDO::getBatchNo, reqVO.getBatchNo()) |
||||
|
.eqIfPresent(HardnessTwoDO::getSydw, reqVO.getSydw()) |
||||
|
.eqIfPresent(HardnessTwoDO::getStandard, reqVO.getStandard()) |
||||
|
.eqIfPresent(HardnessTwoDO::getCz, reqVO.getCz()) |
||||
|
.eqIfPresent(HardnessTwoDO::getGuig, reqVO.getGuig()) |
||||
|
.eqIfPresent(HardnessTwoDO::getTestUser, reqVO.getTestUser()) |
||||
|
.betweenIfPresent(HardnessTwoDO::getTestDate, reqVO.getTestDate()) |
||||
|
.eqIfPresent(HardnessTwoDO::getTestType, reqVO.getTestType()) |
||||
|
.eqIfPresent(HardnessTwoDO::getDfirst, reqVO.getDfirst()) |
||||
|
.eqIfPresent(HardnessTwoDO::getDtwo, reqVO.getDtwo()) |
||||
|
.eqIfPresent(HardnessTwoDO::getDavg, reqVO.getDavg()) |
||||
|
.eqIfPresent(HardnessTwoDO::getTestYd, reqVO.getTestYd()) |
||||
|
.betweenIfPresent(HardnessTwoDO::getCreateTime, reqVO.getCreateTime()) |
||||
|
.eqIfPresent(HardnessTwoDO::getAuditStatus, reqVO.getAuditStatus()) |
||||
|
.orderByDesc(HardnessTwoDO::getId)); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,79 @@ |
|||||
|
package com.win.module.lab.service.asyncoprlog; |
||||
|
|
||||
|
import java.util.*; |
||||
|
import javax.validation.*; |
||||
|
import com.win.module.lab.controller.asyncoprlog.vo.*; |
||||
|
import com.win.module.lab.dal.dataobject.asyncoprlog.AsyncOprLogDO; |
||||
|
import com.win.framework.common.pojo.PageResult; |
||||
|
|
||||
|
/** |
||||
|
* 实验室-主动同步日志 Service 接口 |
||||
|
* |
||||
|
* @author 超级管理员 |
||||
|
*/ |
||||
|
public interface AsyncOprLogService { |
||||
|
|
||||
|
/** |
||||
|
* 创建实验室-主动同步日志 |
||||
|
* |
||||
|
* @param createReqVO 创建信息 |
||||
|
* @return 编号 |
||||
|
*/ |
||||
|
Long createAsyncOprLog(@Valid AsyncOprLogCreateReqVO createReqVO); |
||||
|
|
||||
|
/** |
||||
|
* 更新实验室-主动同步日志 |
||||
|
* |
||||
|
* @param updateReqVO 更新信息 |
||||
|
*/ |
||||
|
void updateAsyncOprLog(@Valid AsyncOprLogUpdateReqVO updateReqVO); |
||||
|
|
||||
|
/** |
||||
|
* 删除实验室-主动同步日志 |
||||
|
* |
||||
|
* @param id 编号 |
||||
|
*/ |
||||
|
void deleteAsyncOprLog(Long id); |
||||
|
|
||||
|
/** |
||||
|
* 获得实验室-主动同步日志 |
||||
|
* |
||||
|
* @param id 编号 |
||||
|
* @return 实验室-主动同步日志 |
||||
|
*/ |
||||
|
AsyncOprLogDO getAsyncOprLog(Long id); |
||||
|
|
||||
|
/** |
||||
|
* 获得实验室-主动同步日志列表 |
||||
|
* |
||||
|
* @param ids 编号 |
||||
|
* @return 实验室-主动同步日志列表 |
||||
|
*/ |
||||
|
List<AsyncOprLogDO> getAsyncOprLogList(Collection<Long> ids); |
||||
|
|
||||
|
/** |
||||
|
* 获得实验室-主动同步日志分页 |
||||
|
* |
||||
|
* @param pageReqVO 分页查询 |
||||
|
* @return 实验室-主动同步日志分页 |
||||
|
*/ |
||||
|
PageResult<AsyncOprLogDO> getAsyncOprLogPage(AsyncOprLogPageReqVO pageReqVO); |
||||
|
|
||||
|
/** |
||||
|
* 获得实验室-主动同步日志列表, 用于 Excel 导出 |
||||
|
* |
||||
|
* @param exportReqVO 查询条件 |
||||
|
* @return 实验室-主动同步日志列表 |
||||
|
*/ |
||||
|
List<AsyncOprLogDO> getAsyncOprLogList(AsyncOprLogExportReqVO exportReqVO); |
||||
|
|
||||
|
/** |
||||
|
* 导入实验室-主动同步日志主信息 |
||||
|
* |
||||
|
* @param datas 导入实验室-主动同步日志主信息列表 |
||||
|
* @param mode 导入模式1更新2追加3覆盖 |
||||
|
* @param updatePart 是否支持更新 |
||||
|
* @return 导入结果 |
||||
|
*/ |
||||
|
public List<AsyncOprLogExcelVO> importAsyncOprLogList(List<AsyncOprLogExcelVO> datas, Integer mode, boolean updatePart); |
||||
|
} |
@ -0,0 +1,107 @@ |
|||||
|
package com.win.module.lab.service.asyncoprlog; |
||||
|
|
||||
|
import com.win.module.lab.enums.ErrorCodeEnum; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import javax.annotation.Resource; |
||||
|
import org.springframework.validation.annotation.Validated; |
||||
|
|
||||
|
import java.util.*; |
||||
|
import com.win.module.lab.controller.asyncoprlog.vo.*; |
||||
|
import com.win.module.lab.dal.dataobject.asyncoprlog.AsyncOprLogDO; |
||||
|
import com.win.framework.common.pojo.PageResult; |
||||
|
|
||||
|
import com.win.module.lab.convert.asyncoprlog.AsyncOprLogConvert; |
||||
|
import com.win.module.lab.dal.mysql.asyncoprlog.AsyncOprLogMapper; |
||||
|
|
||||
|
import static com.win.framework.common.exception.util.ServiceExceptionUtil.exception; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 实验室-主动同步日志 Service 实现类 |
||||
|
* |
||||
|
* @author 超级管理员 |
||||
|
*/ |
||||
|
@Service |
||||
|
@Validated |
||||
|
public class AsyncOprLogServiceImpl implements AsyncOprLogService { |
||||
|
|
||||
|
@Resource |
||||
|
private AsyncOprLogMapper asyncOprLogMapper; |
||||
|
|
||||
|
@Override |
||||
|
public Long createAsyncOprLog(AsyncOprLogCreateReqVO createReqVO) { |
||||
|
// 插入
|
||||
|
AsyncOprLogDO asyncOprLog = AsyncOprLogConvert.INSTANCE.convert(createReqVO); |
||||
|
asyncOprLogMapper.insert(asyncOprLog); |
||||
|
// 返回
|
||||
|
return asyncOprLog.getId(); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public void updateAsyncOprLog(AsyncOprLogUpdateReqVO updateReqVO) { |
||||
|
// 校验存在
|
||||
|
validateAsyncOprLogExists(updateReqVO.getId()); |
||||
|
// 更新
|
||||
|
AsyncOprLogDO updateObj = AsyncOprLogConvert.INSTANCE.convert(updateReqVO); |
||||
|
asyncOprLogMapper.updateById(updateObj); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public void deleteAsyncOprLog(Long id) { |
||||
|
// 校验存在
|
||||
|
validateAsyncOprLogExists(id); |
||||
|
// 删除
|
||||
|
asyncOprLogMapper.deleteById(id); |
||||
|
} |
||||
|
|
||||
|
private void validateAsyncOprLogExists(Long id) { |
||||
|
if (asyncOprLogMapper.selectById(id) == null) { |
||||
|
throw exception(ErrorCodeEnum.ASYNC_OPR_LOG_NOT_EXISTS.getCode() , ErrorCodeEnum.ASYNC_OPR_LOG_NOT_EXISTS.getLabel()); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public AsyncOprLogDO getAsyncOprLog(Long id) { |
||||
|
return asyncOprLogMapper.selectById(id); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<AsyncOprLogDO> getAsyncOprLogList(Collection<Long> ids) { |
||||
|
return asyncOprLogMapper.selectBatchIds(ids); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public PageResult<AsyncOprLogDO> getAsyncOprLogPage(AsyncOprLogPageReqVO pageReqVO) { |
||||
|
return asyncOprLogMapper.selectPage(pageReqVO); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<AsyncOprLogDO> getAsyncOprLogList(AsyncOprLogExportReqVO exportReqVO) { |
||||
|
return asyncOprLogMapper.selectList(exportReqVO); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<AsyncOprLogExcelVO> importAsyncOprLogList(List<AsyncOprLogExcelVO> datas, Integer mode, boolean updatePart) { |
||||
|
// if (CollUtil.isEmpty(datas)) {
|
||||
|
// throw exception(ASYNC_OPR_LOG_IMPORT_LIST_IS_EMPTY);
|
||||
|
// }
|
||||
|
|
||||
|
List<AsyncOprLogExcelVO> errorList = new ArrayList<>(); |
||||
|
// datas.forEach(item -> {
|
||||
|
// if(errorList == null){
|
||||
|
// // 判断如果不存在,在进行插入
|
||||
|
// AsyncOprLogDO obj = asyncOprLogMapper.selectByCode(item.getCode());
|
||||
|
// if (obj == null&& mode != 3) {
|
||||
|
// asyncOprLogMapper.insert(AsyncOprLogConvert.INSTANCE.convert(item));
|
||||
|
// }
|
||||
|
// else if (obj != null && mode != 2) {// 如果存在,判断是否允许更新
|
||||
|
// AsyncOprLogDO asyncOprLogDO = AsyncOprLogConvert.INSTANCE.convert(item);
|
||||
|
// asyncOprLogDO.setId(obj.getId());
|
||||
|
// asyncOprLogMapper.updateById(obj);
|
||||
|
// }
|
||||
|
// }
|
||||
|
// });
|
||||
|
|
||||
|
return errorList; |
||||
|
} |
||||
|
} |
@ -0,0 +1,79 @@ |
|||||
|
package com.win.module.lab.service.hardnessthree; |
||||
|
|
||||
|
import java.util.*; |
||||
|
import javax.validation.*; |
||||
|
import com.win.module.lab.controller.hardnessthree.vo.*; |
||||
|
import com.win.module.lab.dal.dataobject.hardnessthree.HardnessThreeDO; |
||||
|
import com.win.framework.common.pojo.PageResult; |
||||
|
|
||||
|
/** |
||||
|
* 实验室-布氏硬度 Service 接口 |
||||
|
* |
||||
|
* @author 超级管理员 |
||||
|
*/ |
||||
|
public interface HardnessThreeService { |
||||
|
|
||||
|
/** |
||||
|
* 创建实验室-布氏硬度 |
||||
|
* |
||||
|
* @param createReqVO 创建信息 |
||||
|
* @return 编号 |
||||
|
*/ |
||||
|
Long createHardnessThree(@Valid HardnessThreeCreateReqVO createReqVO); |
||||
|
|
||||
|
/** |
||||
|
* 更新实验室-布氏硬度 |
||||
|
* |
||||
|
* @param updateReqVO 更新信息 |
||||
|
*/ |
||||
|
void updateHardnessThree(@Valid HardnessThreeUpdateReqVO updateReqVO); |
||||
|
|
||||
|
/** |
||||
|
* 删除实验室-布氏硬度 |
||||
|
* |
||||
|
* @param id 编号 |
||||
|
*/ |
||||
|
void deleteHardnessThree(Long id); |
||||
|
|
||||
|
/** |
||||
|
* 获得实验室-布氏硬度 |
||||
|
* |
||||
|
* @param id 编号 |
||||
|
* @return 实验室-布氏硬度 |
||||
|
*/ |
||||
|
HardnessThreeDO getHardnessThree(Long id); |
||||
|
|
||||
|
/** |
||||
|
* 获得实验室-布氏硬度列表 |
||||
|
* |
||||
|
* @param ids 编号 |
||||
|
* @return 实验室-布氏硬度列表 |
||||
|
*/ |
||||
|
List<HardnessThreeDO> getHardnessThreeList(Collection<Long> ids); |
||||
|
|
||||
|
/** |
||||
|
* 获得实验室-布氏硬度分页 |
||||
|
* |
||||
|
* @param pageReqVO 分页查询 |
||||
|
* @return 实验室-布氏硬度分页 |
||||
|
*/ |
||||
|
PageResult<HardnessThreeDO> getHardnessThreePage(HardnessThreePageReqVO pageReqVO); |
||||
|
|
||||
|
/** |
||||
|
* 获得实验室-布氏硬度列表, 用于 Excel 导出 |
||||
|
* |
||||
|
* @param exportReqVO 查询条件 |
||||
|
* @return 实验室-布氏硬度列表 |
||||
|
*/ |
||||
|
List<HardnessThreeDO> getHardnessThreeList(HardnessThreeExportReqVO exportReqVO); |
||||
|
|
||||
|
/** |
||||
|
* 导入实验室-布氏硬度主信息 |
||||
|
* |
||||
|
* @param datas 导入实验室-布氏硬度主信息列表 |
||||
|
* @param mode 导入模式1更新2追加3覆盖 |
||||
|
* @param updatePart 是否支持更新 |
||||
|
* @return 导入结果 |
||||
|
*/ |
||||
|
public List<HardnessThreeExcelVO> importHardnessThreeList(List<HardnessThreeExcelVO> datas, Integer mode, boolean updatePart); |
||||
|
} |
@ -0,0 +1,106 @@ |
|||||
|
package com.win.module.lab.service.hardnessthree; |
||||
|
|
||||
|
import com.win.module.lab.enums.ErrorCodeEnum; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import javax.annotation.Resource; |
||||
|
import org.springframework.validation.annotation.Validated; |
||||
|
|
||||
|
import java.util.*; |
||||
|
import com.win.module.lab.controller.hardnessthree.vo.*; |
||||
|
import com.win.module.lab.dal.dataobject.hardnessthree.HardnessThreeDO; |
||||
|
import com.win.framework.common.pojo.PageResult; |
||||
|
|
||||
|
import com.win.module.lab.convert.hardnessthree.HardnessThreeConvert; |
||||
|
import com.win.module.lab.dal.mysql.hardnessthree.HardnessThreeMapper; |
||||
|
|
||||
|
import static com.win.framework.common.exception.util.ServiceExceptionUtil.exception; |
||||
|
|
||||
|
/** |
||||
|
* 实验室-布氏硬度 Service 实现类 |
||||
|
* |
||||
|
* @author 超级管理员 |
||||
|
*/ |
||||
|
@Service |
||||
|
@Validated |
||||
|
public class HardnessThreeServiceImpl implements HardnessThreeService { |
||||
|
|
||||
|
@Resource |
||||
|
private HardnessThreeMapper hardnessThreeMapper; |
||||
|
|
||||
|
@Override |
||||
|
public Long createHardnessThree(HardnessThreeCreateReqVO createReqVO) { |
||||
|
// 插入
|
||||
|
HardnessThreeDO hardnessThree = HardnessThreeConvert.INSTANCE.convert(createReqVO); |
||||
|
hardnessThreeMapper.insert(hardnessThree); |
||||
|
// 返回
|
||||
|
return hardnessThree.getId(); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public void updateHardnessThree(HardnessThreeUpdateReqVO updateReqVO) { |
||||
|
// 校验存在
|
||||
|
validateHardnessThreeExists(updateReqVO.getId()); |
||||
|
// 更新
|
||||
|
HardnessThreeDO updateObj = HardnessThreeConvert.INSTANCE.convert(updateReqVO); |
||||
|
hardnessThreeMapper.updateById(updateObj); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public void deleteHardnessThree(Long id) { |
||||
|
// 校验存在
|
||||
|
validateHardnessThreeExists(id); |
||||
|
// 删除
|
||||
|
hardnessThreeMapper.deleteById(id); |
||||
|
} |
||||
|
|
||||
|
private void validateHardnessThreeExists(Long id) { |
||||
|
if (hardnessThreeMapper.selectById(id) == null) { |
||||
|
throw exception(ErrorCodeEnum.HARDNESS_THREE_NOT_EXISTS.getCode() , ErrorCodeEnum.HARDNESS_THREE_NOT_EXISTS.getLabel()); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public HardnessThreeDO getHardnessThree(Long id) { |
||||
|
return hardnessThreeMapper.selectById(id); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<HardnessThreeDO> getHardnessThreeList(Collection<Long> ids) { |
||||
|
return hardnessThreeMapper.selectBatchIds(ids); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public PageResult<HardnessThreeDO> getHardnessThreePage(HardnessThreePageReqVO pageReqVO) { |
||||
|
return hardnessThreeMapper.selectPage(pageReqVO); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<HardnessThreeDO> getHardnessThreeList(HardnessThreeExportReqVO exportReqVO) { |
||||
|
return hardnessThreeMapper.selectList(exportReqVO); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<HardnessThreeExcelVO> importHardnessThreeList(List<HardnessThreeExcelVO> datas, Integer mode, boolean updatePart) { |
||||
|
// if (CollUtil.isEmpty(datas)) {
|
||||
|
// throw exception(HARDNESS_THREE_IMPORT_LIST_IS_EMPTY);
|
||||
|
// }
|
||||
|
|
||||
|
List<HardnessThreeExcelVO> errorList = new ArrayList<>(); |
||||
|
// datas.forEach(item -> {
|
||||
|
// if(errorList == null){
|
||||
|
// // 判断如果不存在,在进行插入
|
||||
|
// HardnessThreeDO obj = hardnessThreeMapper.selectByCode(item.getCode());
|
||||
|
// if (obj == null&& mode != 3) {
|
||||
|
// hardnessThreeMapper.insert(HardnessThreeConvert.INSTANCE.convert(item));
|
||||
|
// }
|
||||
|
// else if (obj != null && mode != 2) {// 如果存在,判断是否允许更新
|
||||
|
// HardnessThreeDO hardnessThreeDO = HardnessThreeConvert.INSTANCE.convert(item);
|
||||
|
// hardnessThreeDO.setId(obj.getId());
|
||||
|
// hardnessThreeMapper.updateById(obj);
|
||||
|
// }
|
||||
|
// }
|
||||
|
// });
|
||||
|
|
||||
|
return errorList; |
||||
|
} |
||||
|
} |
@ -0,0 +1,79 @@ |
|||||
|
package com.win.module.lab.service.hardnesstwo; |
||||
|
|
||||
|
import java.util.*; |
||||
|
import javax.validation.*; |
||||
|
import com.win.module.lab.controller.hardnesstwo.vo.*; |
||||
|
import com.win.module.lab.dal.dataobject.hardnesstwo.HardnessTwoDO; |
||||
|
import com.win.framework.common.pojo.PageResult; |
||||
|
|
||||
|
/** |
||||
|
* 实验室-韦氏硬度2 Service 接口 |
||||
|
* |
||||
|
* @author 超级管理员 |
||||
|
*/ |
||||
|
public interface HardnessTwoService { |
||||
|
|
||||
|
/** |
||||
|
* 创建实验室-韦氏硬度2 |
||||
|
* |
||||
|
* @param createReqVO 创建信息 |
||||
|
* @return 编号 |
||||
|
*/ |
||||
|
Long createHardnessTwo(@Valid HardnessTwoCreateReqVO createReqVO); |
||||
|
|
||||
|
/** |
||||
|
* 更新实验室-韦氏硬度2 |
||||
|
* |
||||
|
* @param updateReqVO 更新信息 |
||||
|
*/ |
||||
|
void updateHardnessTwo(@Valid HardnessTwoUpdateReqVO updateReqVO); |
||||
|
|
||||
|
/** |
||||
|
* 删除实验室-韦氏硬度2 |
||||
|
* |
||||
|
* @param id 编号 |
||||
|
*/ |
||||
|
void deleteHardnessTwo(Long id); |
||||
|
|
||||
|
/** |
||||
|
* 获得实验室-韦氏硬度2 |
||||
|
* |
||||
|
* @param id 编号 |
||||
|
* @return 实验室-韦氏硬度2 |
||||
|
*/ |
||||
|
HardnessTwoDO getHardnessTwo(Long id); |
||||
|
|
||||
|
/** |
||||
|
* 获得实验室-韦氏硬度2列表 |
||||
|
* |
||||
|
* @param ids 编号 |
||||
|
* @return 实验室-韦氏硬度2列表 |
||||
|
*/ |
||||
|
List<HardnessTwoDO> getHardnessTwoList(Collection<Long> ids); |
||||
|
|
||||
|
/** |
||||
|
* 获得实验室-韦氏硬度2分页 |
||||
|
* |
||||
|
* @param pageReqVO 分页查询 |
||||
|
* @return 实验室-韦氏硬度2分页 |
||||
|
*/ |
||||
|
PageResult<HardnessTwoDO> getHardnessTwoPage(HardnessTwoPageReqVO pageReqVO); |
||||
|
|
||||
|
/** |
||||
|
* 获得实验室-韦氏硬度2列表, 用于 Excel 导出 |
||||
|
* |
||||
|
* @param exportReqVO 查询条件 |
||||
|
* @return 实验室-韦氏硬度2列表 |
||||
|
*/ |
||||
|
List<HardnessTwoDO> getHardnessTwoList(HardnessTwoExportReqVO exportReqVO); |
||||
|
|
||||
|
/** |
||||
|
* 导入实验室-韦氏硬度2主信息 |
||||
|
* |
||||
|
* @param datas 导入实验室-韦氏硬度2主信息列表 |
||||
|
* @param mode 导入模式1更新2追加3覆盖 |
||||
|
* @param updatePart 是否支持更新 |
||||
|
* @return 导入结果 |
||||
|
*/ |
||||
|
public List<HardnessTwoExcelVO> importHardnessTwoList(List<HardnessTwoExcelVO> datas, Integer mode, boolean updatePart); |
||||
|
} |
@ -0,0 +1,107 @@ |
|||||
|
package com.win.module.lab.service.hardnesstwo; |
||||
|
|
||||
|
import com.win.module.lab.enums.ErrorCodeEnum; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import javax.annotation.Resource; |
||||
|
import org.springframework.validation.annotation.Validated; |
||||
|
|
||||
|
import java.util.*; |
||||
|
import com.win.module.lab.controller.hardnesstwo.vo.*; |
||||
|
import com.win.module.lab.dal.dataobject.hardnesstwo.HardnessTwoDO; |
||||
|
import com.win.framework.common.pojo.PageResult; |
||||
|
|
||||
|
import com.win.module.lab.convert.hardnesstwo.HardnessTwoConvert; |
||||
|
import com.win.module.lab.dal.mysql.hardnesstwo.HardnessTwoMapper; |
||||
|
|
||||
|
import static com.win.framework.common.exception.util.ServiceExceptionUtil.exception; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 实验室-韦氏硬度2 Service 实现类 |
||||
|
* |
||||
|
* @author 超级管理员 |
||||
|
*/ |
||||
|
@Service |
||||
|
@Validated |
||||
|
public class HardnessTwoServiceImpl implements HardnessTwoService { |
||||
|
|
||||
|
@Resource |
||||
|
private HardnessTwoMapper hardnessTwoMapper; |
||||
|
|
||||
|
@Override |
||||
|
public Long createHardnessTwo(HardnessTwoCreateReqVO createReqVO) { |
||||
|
// 插入
|
||||
|
HardnessTwoDO hardnessTwo = HardnessTwoConvert.INSTANCE.convert(createReqVO); |
||||
|
hardnessTwoMapper.insert(hardnessTwo); |
||||
|
// 返回
|
||||
|
return hardnessTwo.getId(); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public void updateHardnessTwo(HardnessTwoUpdateReqVO updateReqVO) { |
||||
|
// 校验存在
|
||||
|
validateHardnessTwoExists(updateReqVO.getId()); |
||||
|
// 更新
|
||||
|
HardnessTwoDO updateObj = HardnessTwoConvert.INSTANCE.convert(updateReqVO); |
||||
|
hardnessTwoMapper.updateById(updateObj); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public void deleteHardnessTwo(Long id) { |
||||
|
// 校验存在
|
||||
|
validateHardnessTwoExists(id); |
||||
|
// 删除
|
||||
|
hardnessTwoMapper.deleteById(id); |
||||
|
} |
||||
|
|
||||
|
private void validateHardnessTwoExists(Long id) { |
||||
|
if (hardnessTwoMapper.selectById(id) == null) { |
||||
|
throw exception(ErrorCodeEnum.HARDNESS_TWO_NOT_EXISTS.getCode() , ErrorCodeEnum.HARDNESS_TWO_NOT_EXISTS.getLabel()); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public HardnessTwoDO getHardnessTwo(Long id) { |
||||
|
return hardnessTwoMapper.selectById(id); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<HardnessTwoDO> getHardnessTwoList(Collection<Long> ids) { |
||||
|
return hardnessTwoMapper.selectBatchIds(ids); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public PageResult<HardnessTwoDO> getHardnessTwoPage(HardnessTwoPageReqVO pageReqVO) { |
||||
|
return hardnessTwoMapper.selectPage(pageReqVO); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<HardnessTwoDO> getHardnessTwoList(HardnessTwoExportReqVO exportReqVO) { |
||||
|
return hardnessTwoMapper.selectList(exportReqVO); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<HardnessTwoExcelVO> importHardnessTwoList(List<HardnessTwoExcelVO> datas, Integer mode, boolean updatePart) { |
||||
|
// if (CollUtil.isEmpty(datas)) {
|
||||
|
// throw exception(HARDNESS_TWO_IMPORT_LIST_IS_EMPTY);
|
||||
|
// }
|
||||
|
|
||||
|
List<HardnessTwoExcelVO> errorList = new ArrayList<>(); |
||||
|
// datas.forEach(item -> {
|
||||
|
// if(errorList == null){
|
||||
|
// // 判断如果不存在,在进行插入
|
||||
|
// HardnessTwoDO obj = hardnessTwoMapper.selectByCode(item.getCode());
|
||||
|
// if (obj == null&& mode != 3) {
|
||||
|
// hardnessTwoMapper.insert(HardnessTwoConvert.INSTANCE.convert(item));
|
||||
|
// }
|
||||
|
// else if (obj != null && mode != 2) {// 如果存在,判断是否允许更新
|
||||
|
// HardnessTwoDO hardnessTwoDO = HardnessTwoConvert.INSTANCE.convert(item);
|
||||
|
// hardnessTwoDO.setId(obj.getId());
|
||||
|
// hardnessTwoMapper.updateById(obj);
|
||||
|
// }
|
||||
|
// }
|
||||
|
// });
|
||||
|
|
||||
|
return errorList; |
||||
|
} |
||||
|
} |
@ -0,0 +1,12 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
<mapper namespace="com.win.module.lab.dal.mysql.asyncoprlog.AsyncOprLogMapper"> |
||||
|
|
||||
|
<!-- |
||||
|
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。 |
||||
|
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。 |
||||
|
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。 |
||||
|
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/ |
||||
|
--> |
||||
|
|
||||
|
</mapper> |
@ -0,0 +1,12 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
<mapper namespace="com.win.module.lab.dal.mysql.hardnessthree.HardnessThreeMapper"> |
||||
|
|
||||
|
<!-- |
||||
|
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。 |
||||
|
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。 |
||||
|
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。 |
||||
|
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/ |
||||
|
--> |
||||
|
|
||||
|
</mapper> |
@ -0,0 +1,12 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
<mapper namespace="com.win.module.lab.dal.mysql.hardnesstwo.HardnessTwoMapper"> |
||||
|
|
||||
|
<!-- |
||||
|
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。 |
||||
|
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。 |
||||
|
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。 |
||||
|
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/ |
||||
|
--> |
||||
|
|
||||
|
</mapper> |
@ -0,0 +1,9 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
<mapper namespace="com.win.module.lab.dal.mysql.stretchthousandqx.StretchThousandQxMapper"> |
||||
|
|
||||
|
<delete id="deleteByBusDate" parameterType="java.lang.String"> |
||||
|
delete from lab_stretch_1000_qx where DATE_FORMAT(create_time , '%Y-%m-%d') = #{busDate} |
||||
|
</delete> |
||||
|
|
||||
|
</mapper> |
@ -0,0 +1,18 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" |
||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
||||
|
<parent> |
||||
|
<artifactId>win</artifactId> |
||||
|
<groupId>com.win</groupId> |
||||
|
<version>3.0.0</version> |
||||
|
</parent> |
||||
|
<modelVersion>4.0.0</modelVersion> |
||||
|
|
||||
|
<artifactId>win-module-pszc</artifactId> |
||||
|
<packaging>pom</packaging> |
||||
|
<modules> |
||||
|
<module>win-module-pszc-api</module> |
||||
|
<module>win-module-pszc-biz</module> |
||||
|
</modules> |
||||
|
</project> |
@ -0,0 +1,29 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" |
||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
||||
|
<parent> |
||||
|
<artifactId>win-module-pszc</artifactId> |
||||
|
<groupId>com.win</groupId> |
||||
|
<version>3.0.0</version> |
||||
|
</parent> |
||||
|
<modelVersion>4.0.0</modelVersion> |
||||
|
|
||||
|
<artifactId>win-module-pszc-api</artifactId> |
||||
|
|
||||
|
<dependencies> |
||||
|
<dependency> |
||||
|
<groupId>com.win</groupId> |
||||
|
<artifactId>win-common</artifactId> |
||||
|
</dependency> |
||||
|
|
||||
|
<!-- 参数校验 --> |
||||
|
<dependency> |
||||
|
<groupId>org.springframework.boot</groupId> |
||||
|
<artifactId>spring-boot-starter-validation</artifactId> |
||||
|
<optional>true</optional> |
||||
|
</dependency> |
||||
|
|
||||
|
</dependencies> |
||||
|
|
||||
|
</project> |
@ -0,0 +1,41 @@ |
|||||
|
package com.win.module.pszc.enums; |
||||
|
|
||||
|
public enum PszcErrorCode { |
||||
|
|
||||
|
PS_ELECTRICDATA_NOT_EXISTS(5001 , "智能电表数据不存在"), |
||||
|
|
||||
|
PS_ELECTRICDATA_IMPORT_LIST_IS_EMPTY(5002 , "导入智能电表数据不存在"), |
||||
|
|
||||
|
PS_IREALDATA_NOT_EXISTS(5003 , "一次主表数据不存在"), |
||||
|
|
||||
|
PS_IREALDATA_IMPORT_LIST_IS_EMPTY(5004 , "导入一次主表数据不存在"), |
||||
|
|
||||
|
PS_PUMPDATA_NOT_EXISTS(5005 , "泵站数据不存在"), |
||||
|
|
||||
|
PS_PUMPDATA_IMPORT_LIST_IS_EMPTY(5006 , "导入泵站数据不存在"); |
||||
|
|
||||
|
private Integer code; |
||||
|
|
||||
|
private String label; |
||||
|
|
||||
|
PszcErrorCode(Integer code , String label) { |
||||
|
this.code = code; |
||||
|
this.label = label; |
||||
|
} |
||||
|
|
||||
|
public Integer getCode() { |
||||
|
return code; |
||||
|
} |
||||
|
|
||||
|
public void setCode(Integer code) { |
||||
|
this.code = code; |
||||
|
} |
||||
|
|
||||
|
public String getLabel() { |
||||
|
return label; |
||||
|
} |
||||
|
|
||||
|
public void setLabel(String label) { |
||||
|
this.label = label; |
||||
|
} |
||||
|
} |
@ -0,0 +1,96 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" |
||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
||||
|
<parent> |
||||
|
<artifactId>win-module-pszc</artifactId> |
||||
|
<groupId>com.win</groupId> |
||||
|
<version>3.0.0</version> |
||||
|
</parent> |
||||
|
<modelVersion>4.0.0</modelVersion> |
||||
|
|
||||
|
<artifactId>win-module-pszc-biz</artifactId> |
||||
|
|
||||
|
<dependencies> |
||||
|
<dependency> |
||||
|
<groupId>com.win</groupId> |
||||
|
<artifactId>win-module-pszc-api</artifactId> |
||||
|
<version>${revision}</version> |
||||
|
</dependency> |
||||
|
|
||||
|
<!-- 业务组件 --> |
||||
|
<dependency> |
||||
|
<groupId>com.win</groupId> |
||||
|
<artifactId>win-spring-boot-starter-biz-operatelog</artifactId> |
||||
|
</dependency> |
||||
|
|
||||
|
<dependency> |
||||
|
<groupId>com.win</groupId> |
||||
|
<artifactId>win-spring-boot-starter-biz-dict</artifactId> |
||||
|
</dependency> |
||||
|
|
||||
|
<!-- Web 相关 --> |
||||
|
<dependency> |
||||
|
<groupId>com.win</groupId> |
||||
|
<artifactId>win-spring-boot-starter-security</artifactId> |
||||
|
</dependency> |
||||
|
|
||||
|
<dependency> |
||||
|
<groupId>org.springframework.boot</groupId> |
||||
|
<artifactId>spring-boot-starter-validation</artifactId> |
||||
|
</dependency> |
||||
|
|
||||
|
<!-- DB 相关 --> |
||||
|
<dependency> |
||||
|
<groupId>com.win</groupId> |
||||
|
<artifactId>win-spring-boot-starter-mybatis</artifactId> |
||||
|
</dependency> |
||||
|
|
||||
|
<dependency> |
||||
|
<groupId>com.win</groupId> |
||||
|
<artifactId>win-spring-boot-starter-redis</artifactId> |
||||
|
</dependency> |
||||
|
|
||||
|
<!-- Job 定时任务相关 --> |
||||
|
<dependency> |
||||
|
<groupId>com.win</groupId> |
||||
|
<artifactId>win-spring-boot-starter-job</artifactId> |
||||
|
</dependency> |
||||
|
|
||||
|
<!-- 工具类相关 --> |
||||
|
<dependency> |
||||
|
<groupId>com.win</groupId> |
||||
|
<artifactId>win-spring-boot-starter-excel</artifactId> |
||||
|
</dependency> |
||||
|
|
||||
|
<dependency> |
||||
|
<groupId>com.win</groupId> |
||||
|
<artifactId>win-spring-boot-starter-captcha</artifactId> |
||||
|
</dependency> |
||||
|
|
||||
|
<dependency> |
||||
|
<groupId>org.springframework.boot</groupId> |
||||
|
<artifactId>spring-boot-starter-mail</artifactId> |
||||
|
</dependency> |
||||
|
<dependency> |
||||
|
<groupId>com.win</groupId> |
||||
|
<artifactId>win-spring-boot-starter-job</artifactId> |
||||
|
</dependency> |
||||
|
<dependency> |
||||
|
<groupId>org.apache.poi</groupId> |
||||
|
<artifactId>poi</artifactId> |
||||
|
<version>4.1.2</version> |
||||
|
</dependency> |
||||
|
<dependency> |
||||
|
<groupId>org.apache.poi</groupId> |
||||
|
<artifactId>poi-ooxml</artifactId> |
||||
|
<version>4.1.2</version> |
||||
|
</dependency> |
||||
|
<dependency> |
||||
|
<groupId>org.apache.poi</groupId> |
||||
|
<artifactId>poi-scratchpad</artifactId> |
||||
|
<version>4.1.2</version> |
||||
|
</dependency> |
||||
|
</dependencies> |
||||
|
|
||||
|
</project> |
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue