Compare commits
2 Commits
1565a8e16a
...
5eb77f6ede
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5eb77f6ede | ||
|
|
5adc5525e9 |
@@ -6,6 +6,10 @@ import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import com.zt.plat.module.qms.business.reportdoc.controller.vo.*;
|
||||
import com.zt.plat.module.qms.business.reportdoc.dal.dataobject.ReportDocumentDataDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 检测报告明细 Mapper
|
||||
@@ -26,4 +30,6 @@ public interface ReportDocumentDataMapper extends BaseMapperX<ReportDocumentData
|
||||
.orderByDesc(ReportDocumentDataDO::getId));
|
||||
}
|
||||
|
||||
List<Map<String, Object>> queryBaseSampleBySourceId(@Param("sourceId") Long sourceId);
|
||||
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -108,7 +108,7 @@ public class DeviceConfigBusinessItemController extends AbstractFileUploadContro
|
||||
|
||||
Long productId = pageReqVO.getProductId();
|
||||
if (productId != null) {
|
||||
DeviceConfigBusinessRuleDO ruleDO = deviceConfigBusinessRuleService.getByProductId(productId, DeviceConstant.MAINTAIN_TYPE);
|
||||
DeviceConfigBusinessRuleDO ruleDO = deviceConfigBusinessRuleService.getByProductId(productId, pageReqVO.getBusinessDomain());
|
||||
if(ruleDO != null){
|
||||
pageReqVO.setRuleId(ruleDO.getId());
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ import jakarta.validation.*;
|
||||
import jakarta.servlet.http.*;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.LocalDate;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
@@ -103,8 +104,23 @@ public class DeviceMaintainController extends AbstractFileUploadController imple
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建设备-点检、保养记录")
|
||||
// @PreAuthorize("@ss.hasPermission('qms:device-maintain:create')")
|
||||
public CommonResult<DeviceMaintainRespVO> createDeviceMaintain(@Valid @RequestBody DeviceMaintainSaveReqVO createReqVO) {
|
||||
return success(deviceMaintainService.createDeviceMaintain(createReqVO));
|
||||
public CommonResult<DeviceMaintainVO> createDeviceMaintain(@RequestBody JSONObject jsonObject) {
|
||||
Long deviceId = jsonObject.getLong("deviceId");
|
||||
String dataType = jsonObject.getString("dataType");
|
||||
String dateStr = jsonObject.getString("date");
|
||||
if (deviceId == null || dataType == null) {
|
||||
return CommonResult.error(DEVICE_MAINTAIN_NOT_EXISTS.getCode(), "参数错误");
|
||||
}
|
||||
//检查设备状态
|
||||
CommonResult<Boolean> checkResult = deviceInfomationService.checkDeviceUsable(deviceId);
|
||||
if(!checkResult.isSuccess()){
|
||||
return checkResult.error(checkResult.getCode(), checkResult.getMsg());
|
||||
}
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
if(ObjectUtils.isEmpty(dateStr))
|
||||
dateStr = sdf.format(new Date());
|
||||
LocalDate localDate = LocalDate.parse(dateStr);
|
||||
return deviceMaintainService.create(deviceId, localDate, dataType);
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
|
||||
@@ -57,4 +57,7 @@ public class DeviceConfigBusinessItemPageReqVO extends PageParam {
|
||||
@Schema(description = "设备大类id")
|
||||
private Long productId;
|
||||
|
||||
@Schema(description = "业务类型")
|
||||
private String businessDomain;
|
||||
|
||||
}
|
||||
@@ -99,7 +99,7 @@ public class DeviceMaintainItemDO extends BusinessBaseDO {
|
||||
/**
|
||||
* 所属周期截止日期
|
||||
*/
|
||||
@TableField("FREQ_TM_STRT")
|
||||
@TableField("FREQ_TM_END")
|
||||
private LocalDateTime frequencyTimeEnd;
|
||||
/**
|
||||
* 检查标准
|
||||
|
||||
@@ -9,4 +9,13 @@
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
<select id="queryBaseSampleBySourceId" resultType="map">
|
||||
SELECT bs.*
|
||||
FROM T_BSE_SMP bs
|
||||
inner join T_CFG_BSE_SMP cbs on cbs.BSE_SMP_ID = bs.ID
|
||||
INNER JOIN T_BSN_BSE_SMP bbs on bbs.CFG_BSE_SMP_ID = cbs.ID
|
||||
INNER JOIN T_BSN_ASY_RPT_DAT d on d.BSN_BSE_SMP_ID = bbs.ID
|
||||
where d.id = #{sourceId}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user