fix: 根据站码修改修改数据报错问题
This commit is contained in:
parent
a3618ba688
commit
7cc2ff6798
@ -40,9 +40,8 @@ public class SdAiboxBHController {
|
|||||||
|
|
||||||
@PostMapping("/update")
|
@PostMapping("/update")
|
||||||
@Operation(summary = "修改")
|
@Operation(summary = "修改")
|
||||||
public ResponseResult update(@RequestBody SdEngInfoBHOperateRequest request) {
|
public ResponseResult update(@RequestBody SdEngInfoBHOperateRequest request) throws Exception {
|
||||||
SdAiboxBH entity = request == null || request.getEngInfo() == null ? null : objectMapper.convertValue(request.getEngInfo(), SdAiboxBH.class);
|
boolean result = service.update(request == null ? null : request.getEngInfo(), request == null ? null : request.getSource());
|
||||||
boolean result = service.update(entity, request == null ? null : request.getSource());
|
|
||||||
return result ? ResponseResult.success("修改成功") : ResponseResult.error("修改失败");
|
return result ? ResponseResult.success("修改成功") : ResponseResult.error("修改失败");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -44,10 +44,8 @@ public class SdAimonitorBHController {
|
|||||||
|
|
||||||
@PostMapping("/update")
|
@PostMapping("/update")
|
||||||
@Operation(summary = "修改")
|
@Operation(summary = "修改")
|
||||||
public ResponseResult update(@RequestBody SdEngInfoBHOperateRequest request) {
|
public ResponseResult update(@RequestBody SdEngInfoBHOperateRequest request) throws Exception {
|
||||||
SdAimonitorBH entity = request == null || request.getEngInfo() == null ? null
|
boolean result = service.update(request == null ? null : request.getEngInfo(), request == null ? null : request.getSource());
|
||||||
: objectMapper.convertValue(request.getEngInfo(), SdAimonitorBH.class);
|
|
||||||
boolean result = service.update(entity, request == null ? null : request.getSource());
|
|
||||||
return result ? ResponseResult.success("修改成功") : ResponseResult.error("修改失败");
|
return result ? ResponseResult.success("修改成功") : ResponseResult.error("修改失败");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -40,9 +40,8 @@ public class SdArtsgBHController {
|
|||||||
|
|
||||||
@PostMapping("/update")
|
@PostMapping("/update")
|
||||||
@Operation(summary = "修改")
|
@Operation(summary = "修改")
|
||||||
public ResponseResult update(@RequestBody SdEngInfoBHOperateRequest request) {
|
public ResponseResult update(@RequestBody SdEngInfoBHOperateRequest request) throws Exception {
|
||||||
SdArtsgBH entity = request == null || request.getEngInfo() == null ? null : objectMapper.convertValue(request.getEngInfo(), SdArtsgBH.class);
|
boolean result = service.update(request == null ? null : request.getEngInfo(), request == null ? null : request.getSource());
|
||||||
boolean result = service.update(entity, request == null ? null : request.getSource());
|
|
||||||
return result ? ResponseResult.success("修改成功") : ResponseResult.error("修改失败");
|
return result ? ResponseResult.success("修改成功") : ResponseResult.error("修改失败");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -40,9 +40,8 @@ public class SdDwBHController {
|
|||||||
|
|
||||||
@PostMapping("/update")
|
@PostMapping("/update")
|
||||||
@Operation(summary = "修改")
|
@Operation(summary = "修改")
|
||||||
public ResponseResult update(@RequestBody SdEngInfoBHOperateRequest request) {
|
public ResponseResult update(@RequestBody SdEngInfoBHOperateRequest request) throws Exception {
|
||||||
SdDwBH entity = request == null || request.getEngInfo() == null ? null : objectMapper.convertValue(request.getEngInfo(), SdDwBH.class);
|
boolean result = service.update(request == null ? null : request.getEngInfo(), request == null ? null : request.getSource());
|
||||||
boolean result = service.update(entity, request == null ? null : request.getSource());
|
|
||||||
return result ? ResponseResult.success("修改成功") : ResponseResult.error("修改失败");
|
return result ? ResponseResult.success("修改成功") : ResponseResult.error("修改失败");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -40,9 +40,8 @@ public class SdEqBHController {
|
|||||||
|
|
||||||
@PostMapping("/update")
|
@PostMapping("/update")
|
||||||
@Operation(summary = "修改")
|
@Operation(summary = "修改")
|
||||||
public ResponseResult update(@RequestBody SdEngInfoBHOperateRequest request) {
|
public ResponseResult update(@RequestBody SdEngInfoBHOperateRequest request) throws Exception {
|
||||||
SdEqBH entity = request == null || request.getEngInfo() == null ? null : objectMapper.convertValue(request.getEngInfo(), SdEqBH.class);
|
boolean result = service.update(request == null ? null : request.getEngInfo(), request == null ? null : request.getSource());
|
||||||
boolean result = service.update(entity, request == null ? null : request.getSource());
|
|
||||||
return result ? ResponseResult.success("修改成功") : ResponseResult.error("修改失败");
|
return result ? ResponseResult.success("修改成功") : ResponseResult.error("修改失败");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -40,9 +40,8 @@ public class SdFbrdBHController {
|
|||||||
|
|
||||||
@PostMapping("/update")
|
@PostMapping("/update")
|
||||||
@Operation(summary = "修改")
|
@Operation(summary = "修改")
|
||||||
public ResponseResult update(@RequestBody SdEngInfoBHOperateRequest request) {
|
public ResponseResult update(@RequestBody SdEngInfoBHOperateRequest request) throws Exception {
|
||||||
SdFbrdBH entity = request == null || request.getEngInfo() == null ? null : objectMapper.convertValue(request.getEngInfo(), SdFbrdBH.class);
|
boolean result = service.update(request == null ? null : request.getEngInfo(), request == null ? null : request.getSource());
|
||||||
boolean result = service.update(entity, request == null ? null : request.getSource());
|
|
||||||
return result ? ResponseResult.success("修改成功") : ResponseResult.error("修改失败");
|
return result ? ResponseResult.success("修改成功") : ResponseResult.error("修改失败");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -40,9 +40,8 @@ public class SdFhbtBHController {
|
|||||||
|
|
||||||
@PostMapping("/update")
|
@PostMapping("/update")
|
||||||
@Operation(summary = "修改")
|
@Operation(summary = "修改")
|
||||||
public ResponseResult update(@RequestBody SdEngInfoBHOperateRequest request) {
|
public ResponseResult update(@RequestBody SdEngInfoBHOperateRequest request) throws Exception {
|
||||||
SdFhbtBH entity = request == null || request.getEngInfo() == null ? null : objectMapper.convertValue(request.getEngInfo(), SdFhbtBH.class);
|
boolean result = service.update(request == null ? null : request.getEngInfo(), request == null ? null : request.getSource());
|
||||||
boolean result = service.update(entity, request == null ? null : request.getSource());
|
|
||||||
return result ? ResponseResult.success("修改成功") : ResponseResult.error("修改失败");
|
return result ? ResponseResult.success("修改成功") : ResponseResult.error("修改失败");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -89,9 +89,8 @@ public class SdFpssBHController {
|
|||||||
@Log(module = "过鱼设施管理", value = "修改过鱼设施")
|
@Log(module = "过鱼设施管理", value = "修改过鱼设施")
|
||||||
@PostMapping("/update")
|
@PostMapping("/update")
|
||||||
@Operation(summary = "修改过鱼设施")
|
@Operation(summary = "修改过鱼设施")
|
||||||
public ResponseResult update(@RequestBody SdEngInfoBHOperateRequest request) {
|
public ResponseResult update(@RequestBody SdEngInfoBHOperateRequest request) throws Exception {
|
||||||
SdFpssBH entity = request == null || request.getEngInfo() == null ? null : objectMapper.convertValue(request.getEngInfo(), SdFpssBH.class);
|
boolean result = sdFpssBHService.update(request == null ? null : request.getEngInfo(), request == null ? null : request.getSource());
|
||||||
boolean result = sdFpssBHService.updateById(entity, request == null ? null : request.getSource());
|
|
||||||
return result ? ResponseResult.success("修改成功") : ResponseResult.error("修改失败");
|
return result ? ResponseResult.success("修改成功") : ResponseResult.error("修改失败");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -40,9 +40,8 @@ public class SdOpinfoBHController {
|
|||||||
|
|
||||||
@PostMapping("/update")
|
@PostMapping("/update")
|
||||||
@Operation(summary = "修改")
|
@Operation(summary = "修改")
|
||||||
public ResponseResult update(@RequestBody SdEngInfoBHOperateRequest request) {
|
public ResponseResult update(@RequestBody SdEngInfoBHOperateRequest request) throws Exception {
|
||||||
SdOpinfoBH entity = request == null || request.getEngInfo() == null ? null : objectMapper.convertValue(request.getEngInfo(), SdOpinfoBH.class);
|
boolean result = service.update(request == null ? null : request.getEngInfo(), request == null ? null : request.getSource());
|
||||||
boolean result = service.update(entity, request == null ? null : request.getSource());
|
|
||||||
return result ? ResponseResult.success("修改成功") : ResponseResult.error("修改失败");
|
return result ? ResponseResult.success("修改成功") : ResponseResult.error("修改失败");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -40,9 +40,8 @@ public class SdOtteBHController {
|
|||||||
|
|
||||||
@PostMapping("/update")
|
@PostMapping("/update")
|
||||||
@Operation(summary = "修改")
|
@Operation(summary = "修改")
|
||||||
public ResponseResult update(@RequestBody SdEngInfoBHOperateRequest request) {
|
public ResponseResult update(@RequestBody SdEngInfoBHOperateRequest request) throws Exception {
|
||||||
SdOtteBH entity = request == null || request.getEngInfo() == null ? null : objectMapper.convertValue(request.getEngInfo(), SdOtteBH.class);
|
boolean result = service.update(request == null ? null : request.getEngInfo(), request == null ? null : request.getSource());
|
||||||
boolean result = service.update(entity, request == null ? null : request.getSource());
|
|
||||||
return result ? ResponseResult.success("修改成功") : ResponseResult.error("修改失败");
|
return result ? ResponseResult.success("修改成功") : ResponseResult.error("修改失败");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -40,9 +40,8 @@ public class SdOtweBHController {
|
|||||||
|
|
||||||
@PostMapping("/update")
|
@PostMapping("/update")
|
||||||
@Operation(summary = "修改")
|
@Operation(summary = "修改")
|
||||||
public ResponseResult update(@RequestBody SdEngInfoBHOperateRequest request) {
|
public ResponseResult update(@RequestBody SdEngInfoBHOperateRequest request) throws Exception {
|
||||||
SdOtweBH entity = request == null || request.getEngInfo() == null ? null : objectMapper.convertValue(request.getEngInfo(), SdOtweBH.class);
|
boolean result = service.update(request == null ? null : request.getEngInfo(), request == null ? null : request.getSource());
|
||||||
boolean result = service.update(entity, request == null ? null : request.getSource());
|
|
||||||
return result ? ResponseResult.success("修改成功") : ResponseResult.error("修改失败");
|
return result ? ResponseResult.success("修改成功") : ResponseResult.error("修改失败");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -40,9 +40,8 @@ public class SdSonarBHController {
|
|||||||
|
|
||||||
@PostMapping("/update")
|
@PostMapping("/update")
|
||||||
@Operation(summary = "修改")
|
@Operation(summary = "修改")
|
||||||
public ResponseResult update(@RequestBody SdEngInfoBHOperateRequest request) {
|
public ResponseResult update(@RequestBody SdEngInfoBHOperateRequest request) throws Exception {
|
||||||
SdSonarBH entity = request == null || request.getEngInfo() == null ? null : objectMapper.convertValue(request.getEngInfo(), SdSonarBH.class);
|
boolean result = service.update(request == null ? null : request.getEngInfo(), request == null ? null : request.getSource());
|
||||||
boolean result = service.update(entity, request == null ? null : request.getSource());
|
|
||||||
return result ? ResponseResult.success("修改成功") : ResponseResult.error("修改失败");
|
return result ? ResponseResult.success("修改成功") : ResponseResult.error("修改失败");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -40,9 +40,8 @@ public class SdTeBHController {
|
|||||||
|
|
||||||
@PostMapping("/update")
|
@PostMapping("/update")
|
||||||
@Operation(summary = "修改")
|
@Operation(summary = "修改")
|
||||||
public ResponseResult update(@RequestBody SdEngInfoBHOperateRequest request) {
|
public ResponseResult update(@RequestBody SdEngInfoBHOperateRequest request) throws Exception {
|
||||||
SdTeBH entity = request == null || request.getEngInfo() == null ? null : objectMapper.convertValue(request.getEngInfo(), SdTeBH.class);
|
boolean result = service.update(request == null ? null : request.getEngInfo(), request == null ? null : request.getSource());
|
||||||
boolean result = service.update(entity, request == null ? null : request.getSource());
|
|
||||||
return result ? ResponseResult.success("修改成功") : ResponseResult.error("修改失败");
|
return result ? ResponseResult.success("修改成功") : ResponseResult.error("修改失败");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -40,9 +40,8 @@ public class SdVaBHController {
|
|||||||
|
|
||||||
@PostMapping("/update")
|
@PostMapping("/update")
|
||||||
@Operation(summary = "修改")
|
@Operation(summary = "修改")
|
||||||
public ResponseResult update(@RequestBody SdEngInfoBHOperateRequest request) {
|
public ResponseResult update(@RequestBody SdEngInfoBHOperateRequest request) throws Exception {
|
||||||
SdVaBH entity = request == null || request.getEngInfo() == null ? null : objectMapper.convertValue(request.getEngInfo(), SdVaBH.class);
|
boolean result = service.update(request == null ? null : request.getEngInfo(), request == null ? null : request.getSource());
|
||||||
boolean result = service.update(entity, request == null ? null : request.getSource());
|
|
||||||
return result ? ResponseResult.success("修改成功") : ResponseResult.error("修改失败");
|
return result ? ResponseResult.success("修改成功") : ResponseResult.error("修改失败");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -40,9 +40,8 @@ public class SdVdinfoBController {
|
|||||||
|
|
||||||
@PostMapping("/update")
|
@PostMapping("/update")
|
||||||
@Operation(summary = "修改")
|
@Operation(summary = "修改")
|
||||||
public ResponseResult update(@RequestBody SdEngInfoBHOperateRequest request) {
|
public ResponseResult update(@RequestBody SdEngInfoBHOperateRequest request) throws Exception {
|
||||||
SdVdinfoB entity = request == null || request.getEngInfo() == null ? null : objectMapper.convertValue(request.getEngInfo(), SdVdinfoB.class);
|
boolean result = service.update(request == null ? null : request.getEngInfo(), request == null ? null : request.getSource());
|
||||||
boolean result = service.update(entity, request == null ? null : request.getSource());
|
|
||||||
return result ? ResponseResult.success("修改成功") : ResponseResult.error("修改失败");
|
return result ? ResponseResult.success("修改成功") : ResponseResult.error("修改失败");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -40,9 +40,8 @@ public class SdVpBHController {
|
|||||||
|
|
||||||
@PostMapping("/update")
|
@PostMapping("/update")
|
||||||
@Operation(summary = "修改")
|
@Operation(summary = "修改")
|
||||||
public ResponseResult update(@RequestBody SdEngInfoBHOperateRequest request) {
|
public ResponseResult update(@RequestBody SdEngInfoBHOperateRequest request) throws Exception {
|
||||||
SdVpBH entity = request == null || request.getEngInfo() == null ? null : objectMapper.convertValue(request.getEngInfo(), SdVpBH.class);
|
boolean result = service.update(request == null ? null : request.getEngInfo(), request == null ? null : request.getSource());
|
||||||
boolean result = service.update(entity, request == null ? null : request.getSource());
|
|
||||||
return result ? ResponseResult.success("修改成功") : ResponseResult.error("修改失败");
|
return result ? ResponseResult.success("修改成功") : ResponseResult.error("修改失败");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -40,9 +40,8 @@ public class SdWeBHController {
|
|||||||
|
|
||||||
@PostMapping("/update")
|
@PostMapping("/update")
|
||||||
@Operation(summary = "修改")
|
@Operation(summary = "修改")
|
||||||
public ResponseResult update(@RequestBody SdEngInfoBHOperateRequest request) {
|
public ResponseResult update(@RequestBody SdEngInfoBHOperateRequest request) throws Exception {
|
||||||
SdWeBH entity = request == null || request.getEngInfo() == null ? null : objectMapper.convertValue(request.getEngInfo(), SdWeBH.class);
|
boolean result = service.update(request == null ? null : request.getEngInfo(), request == null ? null : request.getSource());
|
||||||
boolean result = service.update(entity, request == null ? null : request.getSource());
|
|
||||||
return result ? ResponseResult.success("修改成功") : ResponseResult.error("修改失败");
|
return result ? ResponseResult.success("修改成功") : ResponseResult.error("修改失败");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -40,9 +40,8 @@ public class SdWqBHController {
|
|||||||
|
|
||||||
@PostMapping("/update")
|
@PostMapping("/update")
|
||||||
@Operation(summary = "修改")
|
@Operation(summary = "修改")
|
||||||
public ResponseResult update(@RequestBody SdEngInfoBHOperateRequest request) {
|
public ResponseResult update(@RequestBody SdEngInfoBHOperateRequest request) throws Exception {
|
||||||
SdWqBH entity = request == null || request.getEngInfo() == null ? null : objectMapper.convertValue(request.getEngInfo(), SdWqBH.class);
|
boolean result = service.update(request == null ? null : request.getEngInfo(), request == null ? null : request.getSource());
|
||||||
boolean result = service.update(entity, request == null ? null : request.getSource());
|
|
||||||
return result ? ResponseResult.success("修改成功") : ResponseResult.error("修改失败");
|
return result ? ResponseResult.success("修改成功") : ResponseResult.error("修改失败");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -40,9 +40,8 @@ public class SdWtBHController {
|
|||||||
|
|
||||||
@PostMapping("/update")
|
@PostMapping("/update")
|
||||||
@Operation(summary = "修改")
|
@Operation(summary = "修改")
|
||||||
public ResponseResult update(@RequestBody SdEngInfoBHOperateRequest request) {
|
public ResponseResult update(@RequestBody SdEngInfoBHOperateRequest request) throws Exception {
|
||||||
SdWtBH entity = request == null || request.getEngInfo() == null ? null : objectMapper.convertValue(request.getEngInfo(), SdWtBH.class);
|
boolean result = service.update(request == null ? null : request.getEngInfo(), request == null ? null : request.getSource());
|
||||||
boolean result = service.update(entity, request == null ? null : request.getSource());
|
|
||||||
return result ? ResponseResult.success("修改成功") : ResponseResult.error("修改失败");
|
return result ? ResponseResult.success("修改成功") : ResponseResult.error("修改失败");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -6,6 +6,7 @@ import com.yfd.platform.common.DataSourceRequest;
|
|||||||
import com.yfd.platform.qgc_base.domain.SdAiboxBH;
|
import com.yfd.platform.qgc_base.domain.SdAiboxBH;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@ -28,6 +29,7 @@ public interface ISdAiboxBHService extends IService<SdAiboxBH> {
|
|||||||
* 修改
|
* 修改
|
||||||
*/
|
*/
|
||||||
boolean update(SdAiboxBH entity, String source);
|
boolean update(SdAiboxBH entity, String source);
|
||||||
|
boolean update(Map<String, Object> engInfoPatch, String source) throws Exception;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除
|
* 删除
|
||||||
|
|||||||
@ -6,6 +6,7 @@ import com.yfd.platform.common.DataSourceRequest;
|
|||||||
import com.yfd.platform.qgc_base.domain.SdAimonitorBH;
|
import com.yfd.platform.qgc_base.domain.SdAimonitorBH;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* AI智能监测装置 Service 接口
|
* AI智能监测装置 Service 接口
|
||||||
@ -14,5 +15,6 @@ public interface ISdAimonitorBHService extends IService<SdAimonitorBH> {
|
|||||||
Page<SdAimonitorBH> queryPageList(DataSourceRequest request);
|
Page<SdAimonitorBH> queryPageList(DataSourceRequest request);
|
||||||
boolean add(SdAimonitorBH entity, String source);
|
boolean add(SdAimonitorBH entity, String source);
|
||||||
boolean update(SdAimonitorBH entity, String source);
|
boolean update(SdAimonitorBH entity, String source);
|
||||||
|
boolean update(Map<String, Object> engInfoPatch, String source) throws Exception;
|
||||||
boolean delete(List<String> stcds, String source);
|
boolean delete(List<String> stcds, String source);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,6 +6,7 @@ import com.yfd.platform.common.DataSourceRequest;
|
|||||||
import com.yfd.platform.qgc_base.domain.SdArtsgBH;
|
import com.yfd.platform.qgc_base.domain.SdArtsgBH;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@ -28,6 +29,7 @@ public interface ISdArtsgBHService extends IService<SdArtsgBH> {
|
|||||||
* 修改
|
* 修改
|
||||||
*/
|
*/
|
||||||
boolean update(SdArtsgBH entity, String source);
|
boolean update(SdArtsgBH entity, String source);
|
||||||
|
boolean update(Map<String, Object> engInfoPatch, String source) throws Exception;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除
|
* 删除
|
||||||
|
|||||||
@ -6,6 +6,7 @@ import com.yfd.platform.common.DataSourceRequest;
|
|||||||
import com.yfd.platform.qgc_base.domain.SdDwBH;
|
import com.yfd.platform.qgc_base.domain.SdDwBH;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@ -28,6 +29,7 @@ public interface ISdDwBHService extends IService<SdDwBH> {
|
|||||||
* 修改
|
* 修改
|
||||||
*/
|
*/
|
||||||
boolean update(SdDwBH entity, String source);
|
boolean update(SdDwBH entity, String source);
|
||||||
|
boolean update(Map<String, Object> engInfoPatch, String source) throws Exception;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除
|
* 删除
|
||||||
|
|||||||
@ -6,6 +6,7 @@ import com.yfd.platform.common.DataSourceRequest;
|
|||||||
import com.yfd.platform.qgc_base.domain.SdEqBH;
|
import com.yfd.platform.qgc_base.domain.SdEqBH;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@ -28,6 +29,7 @@ public interface ISdEqBHService extends IService<SdEqBH> {
|
|||||||
* 修改
|
* 修改
|
||||||
*/
|
*/
|
||||||
boolean update(SdEqBH entity, String source);
|
boolean update(SdEqBH entity, String source);
|
||||||
|
boolean update(Map<String, Object> engInfoPatch, String source) throws Exception;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除
|
* 删除
|
||||||
|
|||||||
@ -6,6 +6,7 @@ import com.yfd.platform.common.DataSourceRequest;
|
|||||||
import com.yfd.platform.qgc_base.domain.SdFbrdBH;
|
import com.yfd.platform.qgc_base.domain.SdFbrdBH;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@ -28,6 +29,7 @@ public interface ISdFbrdBHService extends IService<SdFbrdBH> {
|
|||||||
* 修改
|
* 修改
|
||||||
*/
|
*/
|
||||||
boolean update(SdFbrdBH entity, String source);
|
boolean update(SdFbrdBH entity, String source);
|
||||||
|
boolean update(Map<String, Object> engInfoPatch, String source) throws Exception;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除
|
* 删除
|
||||||
|
|||||||
@ -6,6 +6,7 @@ import com.yfd.platform.common.DataSourceRequest;
|
|||||||
import com.yfd.platform.qgc_base.domain.SdFhbtBH;
|
import com.yfd.platform.qgc_base.domain.SdFhbtBH;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@ -28,6 +29,7 @@ public interface ISdFhbtBHService extends IService<SdFhbtBH> {
|
|||||||
* 修改
|
* 修改
|
||||||
*/
|
*/
|
||||||
boolean update(SdFhbtBH entity, String source);
|
boolean update(SdFhbtBH entity, String source);
|
||||||
|
boolean update(Map<String, Object> engInfoPatch, String source) throws Exception;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除
|
* 删除
|
||||||
|
|||||||
@ -7,6 +7,7 @@ import com.yfd.platform.qgc_base.domain.SdFhbtBH;
|
|||||||
import com.yfd.platform.qgc_base.domain.SdFpssBH;
|
import com.yfd.platform.qgc_base.domain.SdFpssBH;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
public interface ISdFpssBHService extends IService<SdFpssBH> {
|
public interface ISdFpssBHService extends IService<SdFpssBH> {
|
||||||
@ -25,6 +26,7 @@ public interface ISdFpssBHService extends IService<SdFpssBH> {
|
|||||||
boolean add(SdFpssBH sdFpssBH, String source);
|
boolean add(SdFpssBH sdFpssBH, String source);
|
||||||
|
|
||||||
boolean updateById(SdFpssBH sdFpssBH, String source);
|
boolean updateById(SdFpssBH sdFpssBH, String source);
|
||||||
|
boolean update(Map<String, Object> engInfoPatch, String source) throws Exception;
|
||||||
|
|
||||||
boolean deleteById(String stcd, String sttp);
|
boolean deleteById(String stcd, String sttp);
|
||||||
|
|
||||||
|
|||||||
@ -6,10 +6,12 @@ import com.yfd.platform.common.DataSourceRequest;
|
|||||||
import com.yfd.platform.qgc_base.domain.SdOpinfoBH;
|
import com.yfd.platform.qgc_base.domain.SdOpinfoBH;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
public interface ISdOpinfoBHService extends IService<SdOpinfoBH> {
|
public interface ISdOpinfoBHService extends IService<SdOpinfoBH> {
|
||||||
Page<SdOpinfoBH> queryPageList(DataSourceRequest request);
|
Page<SdOpinfoBH> queryPageList(DataSourceRequest request);
|
||||||
boolean add(SdOpinfoBH entity, String source);
|
boolean add(SdOpinfoBH entity, String source);
|
||||||
boolean update(SdOpinfoBH entity, String source);
|
boolean update(SdOpinfoBH entity, String source);
|
||||||
|
boolean update(Map<String, Object> engInfoPatch, String source) throws Exception;
|
||||||
boolean delete(List<String> stcds, String source);
|
boolean delete(List<String> stcds, String source);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,10 +6,12 @@ import com.yfd.platform.common.DataSourceRequest;
|
|||||||
import com.yfd.platform.qgc_base.domain.SdOtteBH;
|
import com.yfd.platform.qgc_base.domain.SdOtteBH;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
public interface ISdOtteBHService extends IService<SdOtteBH> {
|
public interface ISdOtteBHService extends IService<SdOtteBH> {
|
||||||
Page<SdOtteBH> queryPageList(DataSourceRequest request);
|
Page<SdOtteBH> queryPageList(DataSourceRequest request);
|
||||||
boolean add(SdOtteBH entity, String source);
|
boolean add(SdOtteBH entity, String source);
|
||||||
boolean update(SdOtteBH entity, String source);
|
boolean update(SdOtteBH entity, String source);
|
||||||
|
boolean update(Map<String, Object> engInfoPatch, String source) throws Exception;
|
||||||
boolean delete(List<String> stcds, String source);
|
boolean delete(List<String> stcds, String source);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,10 +6,12 @@ import com.yfd.platform.common.DataSourceRequest;
|
|||||||
import com.yfd.platform.qgc_base.domain.SdOtweBH;
|
import com.yfd.platform.qgc_base.domain.SdOtweBH;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
public interface ISdOtweBHService extends IService<SdOtweBH> {
|
public interface ISdOtweBHService extends IService<SdOtweBH> {
|
||||||
Page<SdOtweBH> queryPageList(DataSourceRequest request);
|
Page<SdOtweBH> queryPageList(DataSourceRequest request);
|
||||||
boolean add(SdOtweBH entity, String source);
|
boolean add(SdOtweBH entity, String source);
|
||||||
boolean update(SdOtweBH entity, String source);
|
boolean update(SdOtweBH entity, String source);
|
||||||
|
boolean update(Map<String, Object> engInfoPatch, String source) throws Exception;
|
||||||
boolean delete(List<String> stcds, String source);
|
boolean delete(List<String> stcds, String source);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,10 +6,12 @@ import com.yfd.platform.common.DataSourceRequest;
|
|||||||
import com.yfd.platform.qgc_base.domain.SdSonarBH;
|
import com.yfd.platform.qgc_base.domain.SdSonarBH;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
public interface ISdSonarBHService extends IService<SdSonarBH> {
|
public interface ISdSonarBHService extends IService<SdSonarBH> {
|
||||||
Page<SdSonarBH> queryPageList(DataSourceRequest request);
|
Page<SdSonarBH> queryPageList(DataSourceRequest request);
|
||||||
boolean add(SdSonarBH entity, String source);
|
boolean add(SdSonarBH entity, String source);
|
||||||
boolean update(SdSonarBH entity, String source);
|
boolean update(SdSonarBH entity, String source);
|
||||||
|
boolean update(Map<String, Object> engInfoPatch, String source) throws Exception;
|
||||||
boolean delete(List<String> stcds, String source);
|
boolean delete(List<String> stcds, String source);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,10 +6,12 @@ import com.yfd.platform.common.DataSourceRequest;
|
|||||||
import com.yfd.platform.qgc_base.domain.SdTeBH;
|
import com.yfd.platform.qgc_base.domain.SdTeBH;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
public interface ISdTeBHService extends IService<SdTeBH> {
|
public interface ISdTeBHService extends IService<SdTeBH> {
|
||||||
Page<SdTeBH> queryPageList(DataSourceRequest request);
|
Page<SdTeBH> queryPageList(DataSourceRequest request);
|
||||||
boolean add(SdTeBH entity, String source);
|
boolean add(SdTeBH entity, String source);
|
||||||
boolean update(SdTeBH entity, String source);
|
boolean update(SdTeBH entity, String source);
|
||||||
|
boolean update(Map<String, Object> engInfoPatch, String source) throws Exception;
|
||||||
boolean delete(List<String> stcds, String source);
|
boolean delete(List<String> stcds, String source);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,10 +6,12 @@ import com.yfd.platform.common.DataSourceRequest;
|
|||||||
import com.yfd.platform.qgc_base.domain.SdVaBH;
|
import com.yfd.platform.qgc_base.domain.SdVaBH;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
public interface ISdVaBHService extends IService<SdVaBH> {
|
public interface ISdVaBHService extends IService<SdVaBH> {
|
||||||
Page<SdVaBH> queryPageList(DataSourceRequest request);
|
Page<SdVaBH> queryPageList(DataSourceRequest request);
|
||||||
boolean add(SdVaBH entity, String source);
|
boolean add(SdVaBH entity, String source);
|
||||||
boolean update(SdVaBH entity, String source);
|
boolean update(SdVaBH entity, String source);
|
||||||
|
boolean update(Map<String, Object> engInfoPatch, String source) throws Exception;
|
||||||
boolean delete(List<String> stcds, String source);
|
boolean delete(List<String> stcds, String source);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,10 +6,12 @@ import com.yfd.platform.common.DataSourceRequest;
|
|||||||
import com.yfd.platform.qgc_base.domain.SdVdinfoB;
|
import com.yfd.platform.qgc_base.domain.SdVdinfoB;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
public interface ISdVdinfoBService extends IService<SdVdinfoB> {
|
public interface ISdVdinfoBService extends IService<SdVdinfoB> {
|
||||||
Page<SdVdinfoB> queryPageList(DataSourceRequest request);
|
Page<SdVdinfoB> queryPageList(DataSourceRequest request);
|
||||||
boolean add(SdVdinfoB entity, String source);
|
boolean add(SdVdinfoB entity, String source);
|
||||||
boolean update(SdVdinfoB entity, String source);
|
boolean update(SdVdinfoB entity, String source);
|
||||||
|
boolean update(Map<String, Object> engInfoPatch, String source) throws Exception;
|
||||||
boolean delete(List<String> stcds, String source);
|
boolean delete(List<String> stcds, String source);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,10 +6,12 @@ import com.yfd.platform.common.DataSourceRequest;
|
|||||||
import com.yfd.platform.qgc_base.domain.SdVpBH;
|
import com.yfd.platform.qgc_base.domain.SdVpBH;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
public interface ISdVpBHService extends IService<SdVpBH> {
|
public interface ISdVpBHService extends IService<SdVpBH> {
|
||||||
Page<SdVpBH> queryPageList(DataSourceRequest request);
|
Page<SdVpBH> queryPageList(DataSourceRequest request);
|
||||||
boolean add(SdVpBH entity, String source);
|
boolean add(SdVpBH entity, String source);
|
||||||
boolean update(SdVpBH entity, String source);
|
boolean update(SdVpBH entity, String source);
|
||||||
|
boolean update(Map<String, Object> engInfoPatch, String source) throws Exception;
|
||||||
boolean delete(List<String> stcds, String source);
|
boolean delete(List<String> stcds, String source);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,10 +6,12 @@ import com.yfd.platform.common.DataSourceRequest;
|
|||||||
import com.yfd.platform.qgc_base.domain.SdWeBH;
|
import com.yfd.platform.qgc_base.domain.SdWeBH;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
public interface ISdWeBHService extends IService<SdWeBH> {
|
public interface ISdWeBHService extends IService<SdWeBH> {
|
||||||
Page<SdWeBH> queryPageList(DataSourceRequest request);
|
Page<SdWeBH> queryPageList(DataSourceRequest request);
|
||||||
boolean add(SdWeBH entity, String source);
|
boolean add(SdWeBH entity, String source);
|
||||||
boolean update(SdWeBH entity, String source);
|
boolean update(SdWeBH entity, String source);
|
||||||
|
boolean update(Map<String, Object> engInfoPatch, String source) throws Exception;
|
||||||
boolean delete(List<String> stcds, String source);
|
boolean delete(List<String> stcds, String source);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,10 +6,12 @@ import com.yfd.platform.common.DataSourceRequest;
|
|||||||
import com.yfd.platform.qgc_base.domain.SdWqBH;
|
import com.yfd.platform.qgc_base.domain.SdWqBH;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
public interface ISdWqBHService extends IService<SdWqBH> {
|
public interface ISdWqBHService extends IService<SdWqBH> {
|
||||||
Page<SdWqBH> queryPageList(DataSourceRequest request);
|
Page<SdWqBH> queryPageList(DataSourceRequest request);
|
||||||
boolean add(SdWqBH entity, String source);
|
boolean add(SdWqBH entity, String source);
|
||||||
boolean update(SdWqBH entity, String source);
|
boolean update(SdWqBH entity, String source);
|
||||||
|
boolean update(Map<String, Object> engInfoPatch, String source) throws Exception;
|
||||||
boolean delete(List<String> stcds, String source);
|
boolean delete(List<String> stcds, String source);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,121 @@
|
|||||||
|
package com.yfd.platform.qgc_base.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
|
import com.yfd.platform.common.exception.BizException;
|
||||||
|
import com.yfd.platform.qgc_base.service.IMsOperationLogService;
|
||||||
|
import com.yfd.platform.utils.CodeToNameMetadataBo;
|
||||||
|
import com.yfd.platform.utils.DictCodeToNameConverter;
|
||||||
|
import jakarta.annotation.Resource;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.lang.reflect.Field;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 公共 Patch 更新辅助工具,按前端 Map patch 显式更新实体字段(含 null 值置空)。
|
||||||
|
* <p>
|
||||||
|
* MyBatis-Plus 的 updateById 默认忽略 null 字段,前端传 "baseId": null 表示要将该字段置空,
|
||||||
|
* 通过本工具 engInfoPatch.containsKey(fieldName) 判断前端显式传入的字段,
|
||||||
|
* 对 null 值使用 SET column = NULL 实现置空。
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* 使用示例:
|
||||||
|
* @Resource
|
||||||
|
* private PatchUpdateHelper patchUpdateHelper;
|
||||||
|
*
|
||||||
|
* public boolean update(Map<String, Object> engInfoPatch, String source) throws Exception {
|
||||||
|
* return patchUpdateHelper.execute(
|
||||||
|
* this, engInfoPatch, source, TABLE_NAME, SdWtBH.class,
|
||||||
|
* TRANSIENT_FIELDS, CODE_TO_NAME_META_LIST);
|
||||||
|
* }
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
@Component
|
||||||
|
public class PatchUpdateHelper {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ObjectMapper objectMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IMsOperationLogService msOperationLogService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private DictCodeToNameConverter dictCodeToNameConverter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 执行 patch 更新:仅更新前端显式传入的字段(包括 null 值),未传入的字段保持原值。
|
||||||
|
*
|
||||||
|
* @param service 对应实体的 IService(用于 getById 和 update)
|
||||||
|
* @param engInfoPatch 前端传入的字段 Map(key=字段名, value=字段值, 显式包含 null)
|
||||||
|
* @param source 操作来源(用于日志)
|
||||||
|
* @param tableName 数据库表名(用于日志)
|
||||||
|
* @param entityClass 实体类
|
||||||
|
* @param transientFields 需跳过的瞬态字段集合(如 @TableField(exist=false)、serialVersionUID)
|
||||||
|
* @param codeToNameMetaList 字典代码转名称配置(用于操作日志)
|
||||||
|
* @param <T> 实体类型
|
||||||
|
* @return true=更新成功
|
||||||
|
* @throws Exception Jackson 类型转换异常等
|
||||||
|
*/
|
||||||
|
public <T> boolean execute(
|
||||||
|
IService<T> service,
|
||||||
|
Map<String, Object> engInfoPatch,
|
||||||
|
String source,
|
||||||
|
String tableName,
|
||||||
|
Class<T> entityClass,
|
||||||
|
Set<String> transientFields,
|
||||||
|
List<CodeToNameMetadataBo> codeToNameMetaList) throws Exception {
|
||||||
|
|
||||||
|
String stcd = engInfoPatch == null ? null : (String) engInfoPatch.get("stcd");
|
||||||
|
if (StrUtil.isBlank(stcd)) {
|
||||||
|
throw new BizException("站点编码不能为空");
|
||||||
|
}
|
||||||
|
T before = service.getById(stcd);
|
||||||
|
if (before == null) {
|
||||||
|
throw new BizException("测站不存在: " + stcd);
|
||||||
|
}
|
||||||
|
|
||||||
|
T after = entityClass.getDeclaredConstructor().newInstance();
|
||||||
|
BeanUtil.copyProperties(before, after);
|
||||||
|
objectMapper.updateValue(after, engInfoPatch);
|
||||||
|
|
||||||
|
UpdateWrapper<T> updateWrapper = new UpdateWrapper<>();
|
||||||
|
updateWrapper.eq("STCD", stcd);
|
||||||
|
boolean hasUpdate = false;
|
||||||
|
for (Field field : entityClass.getDeclaredFields()) {
|
||||||
|
String fieldName = field.getName();
|
||||||
|
if (transientFields.contains(fieldName) || "stcd".equals(fieldName)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (!engInfoPatch.containsKey(fieldName)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
String column = StrUtil.toUnderlineCase(fieldName).toUpperCase();
|
||||||
|
field.setAccessible(true);
|
||||||
|
Object value = field.get(after);
|
||||||
|
if (value == null) {
|
||||||
|
updateWrapper.setSql(column + " = NULL");
|
||||||
|
} else {
|
||||||
|
updateWrapper.set(column, value);
|
||||||
|
}
|
||||||
|
hasUpdate = true;
|
||||||
|
}
|
||||||
|
if (!hasUpdate) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
boolean result = service.update(updateWrapper);
|
||||||
|
if (result) {
|
||||||
|
dictCodeToNameConverter.convertCodeToName(before, codeToNameMetaList);
|
||||||
|
dictCodeToNameConverter.convertCodeToName(after, codeToNameMetaList);
|
||||||
|
msOperationLogService.recordModifyDetailLog(stcd, tableName, before, after, source, codeToNameMetaList);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -10,6 +10,7 @@ import com.yfd.platform.qgc_base.domain.SdAiboxBH;
|
|||||||
import com.yfd.platform.qgc_base.mapper.SdAiboxBHMapper;
|
import com.yfd.platform.qgc_base.mapper.SdAiboxBHMapper;
|
||||||
import com.yfd.platform.qgc_base.service.IMsOperationLogService;
|
import com.yfd.platform.qgc_base.service.IMsOperationLogService;
|
||||||
import com.yfd.platform.qgc_base.service.ISdAiboxBHService;
|
import com.yfd.platform.qgc_base.service.ISdAiboxBHService;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.yfd.platform.utils.CodeToNameMetadataBo;
|
import com.yfd.platform.utils.CodeToNameMetadataBo;
|
||||||
import com.yfd.platform.utils.DataSourceRequestUtil;
|
import com.yfd.platform.utils.DataSourceRequestUtil;
|
||||||
import com.yfd.platform.utils.DictCodeToNameConverter;
|
import com.yfd.platform.utils.DictCodeToNameConverter;
|
||||||
@ -19,9 +20,7 @@ import jakarta.annotation.Resource;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
public class SdAiboxBHServiceImpl extends ServiceImpl<SdAiboxBHMapper, SdAiboxBH> implements ISdAiboxBHService {
|
public class SdAiboxBHServiceImpl extends ServiceImpl<SdAiboxBHMapper, SdAiboxBH> implements ISdAiboxBHService {
|
||||||
@ -37,6 +36,11 @@ public class SdAiboxBHServiceImpl extends ServiceImpl<SdAiboxBHMapper, SdAiboxBH
|
|||||||
@Resource
|
@Resource
|
||||||
private StcdUniqueValidator stcdUniqueValidator;
|
private StcdUniqueValidator stcdUniqueValidator;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private PatchUpdateHelper patchUpdateHelper;
|
||||||
|
|
||||||
|
private static final Set<String> TRANSIENT_FIELDS = Set.of("sttpName", "bldsttCodeName", "usflName", "dtinName", "mwayName", "ennm", "baseName", "rvnm", "serialVersionUID");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 代码转名称元数据配置列表(静态初始化)
|
* 代码转名称元数据配置列表(静态初始化)
|
||||||
* <p>
|
* <p>
|
||||||
@ -103,6 +107,14 @@ public class SdAiboxBHServiceImpl extends ServiceImpl<SdAiboxBHMapper, SdAiboxBH
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public boolean update(Map<String, Object> engInfoPatch, String source) throws Exception {
|
||||||
|
return patchUpdateHelper.execute(
|
||||||
|
this, engInfoPatch, source, TABLE_NAME, SdAiboxBH.class,
|
||||||
|
TRANSIENT_FIELDS, CODE_TO_NAME_META_LIST);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public boolean delete(List<String> stcds, String source) {
|
public boolean delete(List<String> stcds, String source) {
|
||||||
|
|||||||
@ -10,14 +10,13 @@ import com.yfd.platform.qgc_base.domain.SdAimonitorBH;
|
|||||||
import com.yfd.platform.qgc_base.mapper.SdAimonitorBHMapper;
|
import com.yfd.platform.qgc_base.mapper.SdAimonitorBHMapper;
|
||||||
import com.yfd.platform.qgc_base.service.IMsOperationLogService;
|
import com.yfd.platform.qgc_base.service.IMsOperationLogService;
|
||||||
import com.yfd.platform.qgc_base.service.ISdAimonitorBHService;
|
import com.yfd.platform.qgc_base.service.ISdAimonitorBHService;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.yfd.platform.utils.*;
|
import com.yfd.platform.utils.*;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* AI智能监测装置 Service 实现类
|
* AI智能监测装置 Service 实现类
|
||||||
@ -34,6 +33,12 @@ public class SdAimonitorBHServiceImpl extends ServiceImpl<SdAimonitorBHMapper, S
|
|||||||
private DictCodeToNameConverter dictCodeToNameConverter;
|
private DictCodeToNameConverter dictCodeToNameConverter;
|
||||||
@Resource
|
@Resource
|
||||||
private StcdUniqueValidator stcdUniqueValidator;
|
private StcdUniqueValidator stcdUniqueValidator;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private PatchUpdateHelper patchUpdateHelper;
|
||||||
|
|
||||||
|
private static final Set<String> TRANSIENT_FIELDS = Set.of("sttpName", "bldsttCodeName", "dtinName", "mwayName", "ennm", "baseName", "rvnm", "serialVersionUID");
|
||||||
|
|
||||||
private static final List<CodeToNameMetadataBo> CODE_TO_NAME_META_LIST = new ArrayList<>();
|
private static final List<CodeToNameMetadataBo> CODE_TO_NAME_META_LIST = new ArrayList<>();
|
||||||
|
|
||||||
static {
|
static {
|
||||||
@ -83,6 +88,14 @@ public class SdAimonitorBHServiceImpl extends ServiceImpl<SdAimonitorBHMapper, S
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public boolean update(Map<String, Object> engInfoPatch, String source) throws Exception {
|
||||||
|
return patchUpdateHelper.execute(
|
||||||
|
this, engInfoPatch, source, TABLE_NAME, SdAimonitorBH.class,
|
||||||
|
TRANSIENT_FIELDS, CODE_TO_NAME_META_LIST);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public boolean delete(List<String> stcds, String source) {
|
public boolean delete(List<String> stcds, String source) {
|
||||||
|
|||||||
@ -9,6 +9,7 @@ import com.yfd.platform.qgc_base.domain.SdArtsgBH;
|
|||||||
import com.yfd.platform.qgc_base.mapper.SdArtsgBHMapper;
|
import com.yfd.platform.qgc_base.mapper.SdArtsgBHMapper;
|
||||||
import com.yfd.platform.qgc_base.service.IMsOperationLogService;
|
import com.yfd.platform.qgc_base.service.IMsOperationLogService;
|
||||||
import com.yfd.platform.qgc_base.service.ISdArtsgBHService;
|
import com.yfd.platform.qgc_base.service.ISdArtsgBHService;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.yfd.platform.utils.CodeToNameMetadataBo;
|
import com.yfd.platform.utils.CodeToNameMetadataBo;
|
||||||
import com.yfd.platform.utils.DataSourceRequestUtil;
|
import com.yfd.platform.utils.DataSourceRequestUtil;
|
||||||
import com.yfd.platform.utils.DictCodeToNameConverter;
|
import com.yfd.platform.utils.DictCodeToNameConverter;
|
||||||
@ -17,8 +18,7 @@ import jakarta.annotation.Resource;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
public class SdArtsgBHServiceImpl extends ServiceImpl<SdArtsgBHMapper, SdArtsgBH> implements ISdArtsgBHService {
|
public class SdArtsgBHServiceImpl extends ServiceImpl<SdArtsgBHMapper, SdArtsgBH> implements ISdArtsgBHService {
|
||||||
@ -29,6 +29,12 @@ public class SdArtsgBHServiceImpl extends ServiceImpl<SdArtsgBHMapper, SdArtsgBH
|
|||||||
private DictCodeToNameConverter dictCodeToNameConverter;
|
private DictCodeToNameConverter dictCodeToNameConverter;
|
||||||
@Resource
|
@Resource
|
||||||
private StcdUniqueValidator stcdUniqueValidator;
|
private StcdUniqueValidator stcdUniqueValidator;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private PatchUpdateHelper patchUpdateHelper;
|
||||||
|
|
||||||
|
private static final Set<String> TRANSIENT_FIELDS = Set.of("sttpName", "dtinName", "ennm", "baseName", "rvnm", "bldsttCodeName", "serialVersionUID");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 代码转名称元数据配置列表(静态初始化)
|
* 代码转名称元数据配置列表(静态初始化)
|
||||||
* <p>
|
* <p>
|
||||||
@ -94,6 +100,14 @@ public class SdArtsgBHServiceImpl extends ServiceImpl<SdArtsgBHMapper, SdArtsgBH
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public boolean update(Map<String, Object> engInfoPatch, String source) throws Exception {
|
||||||
|
return patchUpdateHelper.execute(
|
||||||
|
this, engInfoPatch, source, TABLE_NAME, SdArtsgBH.class,
|
||||||
|
TRANSIENT_FIELDS, CODE_TO_NAME_META_LIST);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public boolean delete(List<String> stcds, String source) {
|
public boolean delete(List<String> stcds, String source) {
|
||||||
|
|||||||
@ -10,14 +10,13 @@ import com.yfd.platform.qgc_base.domain.SdDwBH;
|
|||||||
import com.yfd.platform.qgc_base.mapper.SdDwBHMapper;
|
import com.yfd.platform.qgc_base.mapper.SdDwBHMapper;
|
||||||
import com.yfd.platform.qgc_base.service.IMsOperationLogService;
|
import com.yfd.platform.qgc_base.service.IMsOperationLogService;
|
||||||
import com.yfd.platform.qgc_base.service.ISdDwBHService;
|
import com.yfd.platform.qgc_base.service.ISdDwBHService;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.yfd.platform.utils.*;
|
import com.yfd.platform.utils.*;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
public class SdDwBHServiceImpl extends ServiceImpl<SdDwBHMapper, SdDwBH> implements ISdDwBHService {
|
public class SdDwBHServiceImpl extends ServiceImpl<SdDwBHMapper, SdDwBH> implements ISdDwBHService {
|
||||||
@ -31,6 +30,12 @@ public class SdDwBHServiceImpl extends ServiceImpl<SdDwBHMapper, SdDwBH> impleme
|
|||||||
private DictCodeToNameConverter dictCodeToNameConverter;
|
private DictCodeToNameConverter dictCodeToNameConverter;
|
||||||
@Resource
|
@Resource
|
||||||
private StcdUniqueValidator stcdUniqueValidator;
|
private StcdUniqueValidator stcdUniqueValidator;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private PatchUpdateHelper patchUpdateHelper;
|
||||||
|
|
||||||
|
private static final Set<String> TRANSIENT_FIELDS = Set.of("sttpName", "dtinName", "baseName", "ennm", "bldsttCodeName", "serialVersionUID");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 代码转名称元数据配置列表(静态初始化)
|
* 代码转名称元数据配置列表(静态初始化)
|
||||||
* <p>
|
* <p>
|
||||||
@ -92,6 +97,14 @@ public class SdDwBHServiceImpl extends ServiceImpl<SdDwBHMapper, SdDwBH> impleme
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public boolean update(Map<String, Object> engInfoPatch, String source) throws Exception {
|
||||||
|
return patchUpdateHelper.execute(
|
||||||
|
this, engInfoPatch, source, TABLE_NAME, SdDwBH.class,
|
||||||
|
TRANSIENT_FIELDS, CODE_TO_NAME_META_LIST);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public boolean delete(List<String> stcds, String source) {
|
public boolean delete(List<String> stcds, String source) {
|
||||||
|
|||||||
@ -138,6 +138,11 @@ public class SdEngInfoBHServiceImpl extends ServiceImpl<SdEngInfoBHMapper, SdEng
|
|||||||
@Resource
|
@Resource
|
||||||
private StcdUniqueValidator stcdUniqueValidator;
|
private StcdUniqueValidator stcdUniqueValidator;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private PatchUpdateHelper patchUpdateHelper;
|
||||||
|
|
||||||
|
private static final Set<String> TRANSIENT_FIELDS = Set.of("usflName", "sttpName", "bldsttCodeName", "engtpName", "scrscName", "prgrName", "fnName", "adjustEngName", "ishvrgrgName", "rgcpName", "dmatName", "dmtpName", "dvtpName", "cntpName", "blsysName", "impdstrzName", "chngrdName", "chiefbasinengName", "dtinEnvName", "runStateName", "warnStateName", "coenvwStateName", "serialVersionUID");
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private IAdminAuthService adminAuthService;
|
private IAdminAuthService adminAuthService;
|
||||||
|
|
||||||
@ -333,29 +338,10 @@ public class SdEngInfoBHServiceImpl extends ServiceImpl<SdEngInfoBHMapper, SdEng
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public boolean updateEngInfo(Map<String, Object> engInfoPatch, String source) throws JsonMappingException {
|
public boolean updateEngInfo(Map<String, Object> engInfoPatch, String source) throws Exception {
|
||||||
Map<String, Object> filteredPatch = filterEngInfoPatchFields(engInfoPatch);
|
return patchUpdateHelper.execute(
|
||||||
if (filteredPatch.isEmpty()) {
|
this, engInfoPatch, source, TABLE_NAME, SdEngInfoBH.class,
|
||||||
return false;
|
TRANSIENT_FIELDS, CODE_TO_NAME_META_LIST);
|
||||||
}
|
|
||||||
String stcd = toTextValue(filteredPatch.get("stcd"));
|
|
||||||
if (!StringUtils.hasText(stcd)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
SdEngInfoBH before = this.getById(stcd);
|
|
||||||
if (before == null) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
SdEngInfoBH after = BeanUtil.copyProperties(before, SdEngInfoBH.class);
|
|
||||||
objectMapper.updateValue(after, filteredPatch);
|
|
||||||
fillRelatedNameFields(after);
|
|
||||||
boolean result = updateEngInfoByPatch(stcd, after, filteredPatch);
|
|
||||||
if (result) {
|
|
||||||
dictCodeToNameConverter.convertCodeToName(after, CODE_TO_NAME_META_LIST);
|
|
||||||
dictCodeToNameConverter.convertCodeToName(before, CODE_TO_NAME_META_LIST);
|
|
||||||
msOperationLogService.recordModifyDetailLog(before.getStcd(),TABLE_NAME,before, after, source, CODE_TO_NAME_META_LIST);
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean updateEngInfoByPatch(String stcd, SdEngInfoBH after, Map<String, Object> engInfoPatch) {
|
private boolean updateEngInfoByPatch(String stcd, SdEngInfoBH after, Map<String, Object> engInfoPatch) {
|
||||||
|
|||||||
@ -10,14 +10,13 @@ import com.yfd.platform.qgc_base.domain.SdEqBH;
|
|||||||
import com.yfd.platform.qgc_base.mapper.SdEqBHMapper;
|
import com.yfd.platform.qgc_base.mapper.SdEqBHMapper;
|
||||||
import com.yfd.platform.qgc_base.service.IMsOperationLogService;
|
import com.yfd.platform.qgc_base.service.IMsOperationLogService;
|
||||||
import com.yfd.platform.qgc_base.service.ISdEqBHService;
|
import com.yfd.platform.qgc_base.service.ISdEqBHService;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.yfd.platform.utils.*;
|
import com.yfd.platform.utils.*;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
public class SdEqBHServiceImpl extends ServiceImpl<SdEqBHMapper, SdEqBH> implements ISdEqBHService {
|
public class SdEqBHServiceImpl extends ServiceImpl<SdEqBHMapper, SdEqBH> implements ISdEqBHService {
|
||||||
@ -31,6 +30,12 @@ public class SdEqBHServiceImpl extends ServiceImpl<SdEqBHMapper, SdEqBH> impleme
|
|||||||
private DictCodeToNameConverter dictCodeToNameConverter;
|
private DictCodeToNameConverter dictCodeToNameConverter;
|
||||||
@Resource
|
@Resource
|
||||||
private StcdUniqueValidator stcdUniqueValidator;
|
private StcdUniqueValidator stcdUniqueValidator;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private PatchUpdateHelper patchUpdateHelper;
|
||||||
|
|
||||||
|
private static final Set<String> TRANSIENT_FIELDS = Set.of("sttpName", "dtinName", "ennm", "baseName", "bldsttCodeName", "serialVersionUID");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 代码转名称元数据配置列表(静态初始化)
|
* 代码转名称元数据配置列表(静态初始化)
|
||||||
* <p>
|
* <p>
|
||||||
@ -92,6 +97,14 @@ public class SdEqBHServiceImpl extends ServiceImpl<SdEqBHMapper, SdEqBH> impleme
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public boolean update(Map<String, Object> engInfoPatch, String source) throws Exception {
|
||||||
|
return patchUpdateHelper.execute(
|
||||||
|
this, engInfoPatch, source, TABLE_NAME, SdEqBH.class,
|
||||||
|
TRANSIENT_FIELDS, CODE_TO_NAME_META_LIST);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public boolean delete(List<String> stcds, String source) {
|
public boolean delete(List<String> stcds, String source) {
|
||||||
|
|||||||
@ -9,6 +9,7 @@ import com.yfd.platform.qgc_base.domain.SdFbrdBH;
|
|||||||
import com.yfd.platform.qgc_base.mapper.SdFbrdBHMapper;
|
import com.yfd.platform.qgc_base.mapper.SdFbrdBHMapper;
|
||||||
import com.yfd.platform.qgc_base.service.IMsOperationLogService;
|
import com.yfd.platform.qgc_base.service.IMsOperationLogService;
|
||||||
import com.yfd.platform.qgc_base.service.ISdFbrdBHService;
|
import com.yfd.platform.qgc_base.service.ISdFbrdBHService;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.yfd.platform.utils.CodeToNameMetadataBo;
|
import com.yfd.platform.utils.CodeToNameMetadataBo;
|
||||||
import com.yfd.platform.utils.DataSourceRequestUtil;
|
import com.yfd.platform.utils.DataSourceRequestUtil;
|
||||||
import com.yfd.platform.utils.DictCodeToNameConverter;
|
import com.yfd.platform.utils.DictCodeToNameConverter;
|
||||||
@ -17,8 +18,7 @@ import jakarta.annotation.Resource;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
public class SdFbrdBHServiceImpl extends ServiceImpl<SdFbrdBHMapper, SdFbrdBH> implements ISdFbrdBHService {
|
public class SdFbrdBHServiceImpl extends ServiceImpl<SdFbrdBHMapper, SdFbrdBH> implements ISdFbrdBHService {
|
||||||
@ -32,6 +32,12 @@ public class SdFbrdBHServiceImpl extends ServiceImpl<SdFbrdBHMapper, SdFbrdBH> i
|
|||||||
private DictCodeToNameConverter dictCodeToNameConverter;
|
private DictCodeToNameConverter dictCodeToNameConverter;
|
||||||
@Resource
|
@Resource
|
||||||
private StcdUniqueValidator stcdUniqueValidator;
|
private StcdUniqueValidator stcdUniqueValidator;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private PatchUpdateHelper patchUpdateHelper;
|
||||||
|
|
||||||
|
private static final Set<String> TRANSIENT_FIELDS = Set.of("sttpName", "dtinName", "ennm", "baseName", "bldsttCodeName", "serialVersionUID");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 代码转名称元数据配置列表(静态初始化)
|
* 代码转名称元数据配置列表(静态初始化)
|
||||||
* <p>
|
* <p>
|
||||||
@ -93,6 +99,14 @@ public class SdFbrdBHServiceImpl extends ServiceImpl<SdFbrdBHMapper, SdFbrdBH> i
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public boolean update(Map<String, Object> engInfoPatch, String source) throws Exception {
|
||||||
|
return patchUpdateHelper.execute(
|
||||||
|
this, engInfoPatch, source, TABLE_NAME, SdFbrdBH.class,
|
||||||
|
TRANSIENT_FIELDS, CODE_TO_NAME_META_LIST);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public boolean delete(List<String> stcds, String source) {
|
public boolean delete(List<String> stcds, String source) {
|
||||||
|
|||||||
@ -10,14 +10,13 @@ import com.yfd.platform.qgc_base.domain.SdFhbtBH;
|
|||||||
import com.yfd.platform.qgc_base.mapper.SdFhbtBHMapper;
|
import com.yfd.platform.qgc_base.mapper.SdFhbtBHMapper;
|
||||||
import com.yfd.platform.qgc_base.service.IMsOperationLogService;
|
import com.yfd.platform.qgc_base.service.IMsOperationLogService;
|
||||||
import com.yfd.platform.qgc_base.service.ISdFhbtBHService;
|
import com.yfd.platform.qgc_base.service.ISdFhbtBHService;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.yfd.platform.utils.*;
|
import com.yfd.platform.utils.*;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
public class SdFhbtBHServiceImpl extends ServiceImpl<SdFhbtBHMapper, SdFhbtBH> implements ISdFhbtBHService {
|
public class SdFhbtBHServiceImpl extends ServiceImpl<SdFhbtBHMapper, SdFhbtBH> implements ISdFhbtBHService {
|
||||||
@ -31,6 +30,12 @@ public class SdFhbtBHServiceImpl extends ServiceImpl<SdFhbtBHMapper, SdFhbtBH> i
|
|||||||
private DictCodeToNameConverter dictCodeToNameConverter;
|
private DictCodeToNameConverter dictCodeToNameConverter;
|
||||||
@Resource
|
@Resource
|
||||||
private StcdUniqueValidator stcdUniqueValidator;
|
private StcdUniqueValidator stcdUniqueValidator;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private PatchUpdateHelper patchUpdateHelper;
|
||||||
|
|
||||||
|
private static final Set<String> TRANSIENT_FIELDS = Set.of("sttpName", "dtinName", "ennm", "baseName", "bldsttCodeName", "serialVersionUID");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 代码转名称元数据配置列表(静态初始化)
|
* 代码转名称元数据配置列表(静态初始化)
|
||||||
* <p>
|
* <p>
|
||||||
@ -93,6 +98,14 @@ public class SdFhbtBHServiceImpl extends ServiceImpl<SdFhbtBHMapper, SdFhbtBH> i
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public boolean update(Map<String, Object> engInfoPatch, String source) throws Exception {
|
||||||
|
return patchUpdateHelper.execute(
|
||||||
|
this, engInfoPatch, source, TABLE_NAME, SdFhbtBH.class,
|
||||||
|
TRANSIENT_FIELDS, CODE_TO_NAME_META_LIST);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public boolean delete(List<String> stcds, String source) {
|
public boolean delete(List<String> stcds, String source) {
|
||||||
|
|||||||
@ -16,9 +16,11 @@ import com.yfd.platform.qgc_base.service.ISdFpssBHService;
|
|||||||
import com.yfd.platform.qgc_data.domain.SysUserDataScope;
|
import com.yfd.platform.qgc_data.domain.SysUserDataScope;
|
||||||
import com.yfd.platform.qgc_data.mapper.SysUserDataScopeMapper;
|
import com.yfd.platform.qgc_data.mapper.SysUserDataScopeMapper;
|
||||||
import com.yfd.platform.system.service.IAdminAuthService;
|
import com.yfd.platform.system.service.IAdminAuthService;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.yfd.platform.utils.*;
|
import com.yfd.platform.utils.*;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import org.springframework.util.StringUtils;
|
import org.springframework.util.StringUtils;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
@ -43,6 +45,12 @@ public class SdFpssBHServiceImpl extends ServiceImpl<SdFpssBHMapper, SdFpssBH> i
|
|||||||
private IMsOperationLogService msOperationLogService;
|
private IMsOperationLogService msOperationLogService;
|
||||||
@Resource
|
@Resource
|
||||||
private StcdUniqueValidator stcdUniqueValidator;
|
private StcdUniqueValidator stcdUniqueValidator;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private PatchUpdateHelper patchUpdateHelper;
|
||||||
|
|
||||||
|
private static final Set<String> TRANSIENT_FIELDS = Set.of("sttpName", "baseName", "dtinName", "ennm", "bldsttCodeName", "isUpName", "isDownName", "mwayName", "serialVersionUID");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 代码转名称元数据配置列表(静态初始化)
|
* 代码转名称元数据配置列表(静态初始化)
|
||||||
* <p>
|
* <p>
|
||||||
@ -239,6 +247,14 @@ public class SdFpssBHServiceImpl extends ServiceImpl<SdFpssBHMapper, SdFpssBH> i
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public boolean update(Map<String, Object> engInfoPatch, String source) throws Exception {
|
||||||
|
return patchUpdateHelper.execute(
|
||||||
|
this, engInfoPatch, source, TABLE_NAME, SdFpssBH.class,
|
||||||
|
TRANSIENT_FIELDS, CODE_TO_NAME_META_LIST);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean deleteById(String stcd, String sttp) {
|
public boolean deleteById(String stcd, String sttp) {
|
||||||
LambdaQueryWrapper<SdFpssBH> wrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<SdFpssBH> wrapper = new LambdaQueryWrapper<>();
|
||||||
|
|||||||
@ -10,14 +10,13 @@ import com.yfd.platform.qgc_base.domain.SdOpinfoBH;
|
|||||||
import com.yfd.platform.qgc_base.mapper.SdOpinfoBHMapper;
|
import com.yfd.platform.qgc_base.mapper.SdOpinfoBHMapper;
|
||||||
import com.yfd.platform.qgc_base.service.IMsOperationLogService;
|
import com.yfd.platform.qgc_base.service.IMsOperationLogService;
|
||||||
import com.yfd.platform.qgc_base.service.ISdOpinfoBHService;
|
import com.yfd.platform.qgc_base.service.ISdOpinfoBHService;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.yfd.platform.utils.*;
|
import com.yfd.platform.utils.*;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
public class SdOpinfoBHServiceImpl extends ServiceImpl<SdOpinfoBHMapper, SdOpinfoBH> implements ISdOpinfoBHService {
|
public class SdOpinfoBHServiceImpl extends ServiceImpl<SdOpinfoBHMapper, SdOpinfoBH> implements ISdOpinfoBHService {
|
||||||
@ -31,6 +30,12 @@ public class SdOpinfoBHServiceImpl extends ServiceImpl<SdOpinfoBHMapper, SdOpinf
|
|||||||
private DictCodeToNameConverter dictCodeToNameConverter;
|
private DictCodeToNameConverter dictCodeToNameConverter;
|
||||||
@Resource
|
@Resource
|
||||||
private StcdUniqueValidator stcdUniqueValidator;
|
private StcdUniqueValidator stcdUniqueValidator;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private PatchUpdateHelper patchUpdateHelper;
|
||||||
|
|
||||||
|
private static final Set<String> TRANSIENT_FIELDS = Set.of("dtinName", "ennm", "baseName", "rvnm", "serialVersionUID");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 代码转名称元数据配置列表(静态初始化)
|
* 代码转名称元数据配置列表(静态初始化)
|
||||||
* <p>
|
* <p>
|
||||||
@ -93,6 +98,14 @@ public class SdOpinfoBHServiceImpl extends ServiceImpl<SdOpinfoBHMapper, SdOpinf
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public boolean update(Map<String, Object> engInfoPatch, String source) throws Exception {
|
||||||
|
return patchUpdateHelper.execute(
|
||||||
|
this, engInfoPatch, source, TABLE_NAME, SdOpinfoBH.class,
|
||||||
|
TRANSIENT_FIELDS, CODE_TO_NAME_META_LIST);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public boolean delete(List<String> stcds, String source) {
|
public boolean delete(List<String> stcds, String source) {
|
||||||
|
|||||||
@ -9,6 +9,7 @@ import com.yfd.platform.qgc_base.domain.SdOtteBH;
|
|||||||
import com.yfd.platform.qgc_base.mapper.SdOtteBHMapper;
|
import com.yfd.platform.qgc_base.mapper.SdOtteBHMapper;
|
||||||
import com.yfd.platform.qgc_base.service.IMsOperationLogService;
|
import com.yfd.platform.qgc_base.service.IMsOperationLogService;
|
||||||
import com.yfd.platform.qgc_base.service.ISdOtteBHService;
|
import com.yfd.platform.qgc_base.service.ISdOtteBHService;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.yfd.platform.utils.CodeToNameMetadataBo;
|
import com.yfd.platform.utils.CodeToNameMetadataBo;
|
||||||
import com.yfd.platform.utils.DataSourceRequestUtil;
|
import com.yfd.platform.utils.DataSourceRequestUtil;
|
||||||
import com.yfd.platform.utils.DictCodeToNameConverter;
|
import com.yfd.platform.utils.DictCodeToNameConverter;
|
||||||
@ -17,8 +18,7 @@ import jakarta.annotation.Resource;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
public class SdOtteBHServiceImpl extends ServiceImpl<SdOtteBHMapper, SdOtteBH> implements ISdOtteBHService {
|
public class SdOtteBHServiceImpl extends ServiceImpl<SdOtteBHMapper, SdOtteBH> implements ISdOtteBHService {
|
||||||
@ -32,6 +32,12 @@ public class SdOtteBHServiceImpl extends ServiceImpl<SdOtteBHMapper, SdOtteBH> i
|
|||||||
private DictCodeToNameConverter dictCodeToNameConverter;
|
private DictCodeToNameConverter dictCodeToNameConverter;
|
||||||
@Resource
|
@Resource
|
||||||
private StcdUniqueValidator stcdUniqueValidator;
|
private StcdUniqueValidator stcdUniqueValidator;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private PatchUpdateHelper patchUpdateHelper;
|
||||||
|
|
||||||
|
private static final Set<String> TRANSIENT_FIELDS = Set.of("sttpName", "bldsttCodeName", "usflName", "dtinName", "mwayName", "ennm", "baseName", "rvnm", "serialVersionUID");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 代码转名称元数据配置列表(静态初始化)
|
* 代码转名称元数据配置列表(静态初始化)
|
||||||
* <p>
|
* <p>
|
||||||
@ -96,6 +102,14 @@ public class SdOtteBHServiceImpl extends ServiceImpl<SdOtteBHMapper, SdOtteBH> i
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public boolean update(Map<String, Object> engInfoPatch, String source) throws Exception {
|
||||||
|
return patchUpdateHelper.execute(
|
||||||
|
this, engInfoPatch, source, TABLE_NAME, SdOtteBH.class,
|
||||||
|
TRANSIENT_FIELDS, CODE_TO_NAME_META_LIST);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public boolean delete(List<String> stcds, String source) {
|
public boolean delete(List<String> stcds, String source) {
|
||||||
|
|||||||
@ -9,6 +9,7 @@ import com.yfd.platform.qgc_base.domain.SdOtweBH;
|
|||||||
import com.yfd.platform.qgc_base.mapper.SdOtweBHMapper;
|
import com.yfd.platform.qgc_base.mapper.SdOtweBHMapper;
|
||||||
import com.yfd.platform.qgc_base.service.IMsOperationLogService;
|
import com.yfd.platform.qgc_base.service.IMsOperationLogService;
|
||||||
import com.yfd.platform.qgc_base.service.ISdOtweBHService;
|
import com.yfd.platform.qgc_base.service.ISdOtweBHService;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.yfd.platform.utils.CodeToNameMetadataBo;
|
import com.yfd.platform.utils.CodeToNameMetadataBo;
|
||||||
import com.yfd.platform.utils.DataSourceRequestUtil;
|
import com.yfd.platform.utils.DataSourceRequestUtil;
|
||||||
import com.yfd.platform.utils.DictCodeToNameConverter;
|
import com.yfd.platform.utils.DictCodeToNameConverter;
|
||||||
@ -17,8 +18,7 @@ import jakarta.annotation.Resource;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
public class SdOtweBHServiceImpl extends ServiceImpl<SdOtweBHMapper, SdOtweBH> implements ISdOtweBHService {
|
public class SdOtweBHServiceImpl extends ServiceImpl<SdOtweBHMapper, SdOtweBH> implements ISdOtweBHService {
|
||||||
@ -31,6 +31,12 @@ public class SdOtweBHServiceImpl extends ServiceImpl<SdOtweBHMapper, SdOtweBH> i
|
|||||||
private DictCodeToNameConverter dictCodeToNameConverter;
|
private DictCodeToNameConverter dictCodeToNameConverter;
|
||||||
@Resource
|
@Resource
|
||||||
private StcdUniqueValidator stcdUniqueValidator;
|
private StcdUniqueValidator stcdUniqueValidator;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private PatchUpdateHelper patchUpdateHelper;
|
||||||
|
|
||||||
|
private static final Set<String> TRANSIENT_FIELDS = Set.of("sttpName", "usflName", "dtinName", "ennm", "baseName", "rvnm", "bldsttCodeName", "serialVersionUID");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 代码转名称元数据配置列表(静态初始化)
|
* 代码转名称元数据配置列表(静态初始化)
|
||||||
* <p>
|
* <p>
|
||||||
@ -94,6 +100,14 @@ public class SdOtweBHServiceImpl extends ServiceImpl<SdOtweBHMapper, SdOtweBH> i
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public boolean update(Map<String, Object> engInfoPatch, String source) throws Exception {
|
||||||
|
return patchUpdateHelper.execute(
|
||||||
|
this, engInfoPatch, source, TABLE_NAME, SdOtweBH.class,
|
||||||
|
TRANSIENT_FIELDS, CODE_TO_NAME_META_LIST);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public boolean delete(List<String> stcds, String source) {
|
public boolean delete(List<String> stcds, String source) {
|
||||||
|
|||||||
@ -10,14 +10,13 @@ import com.yfd.platform.qgc_base.domain.SdSonarBH;
|
|||||||
import com.yfd.platform.qgc_base.mapper.SdSonarBHMapper;
|
import com.yfd.platform.qgc_base.mapper.SdSonarBHMapper;
|
||||||
import com.yfd.platform.qgc_base.service.IMsOperationLogService;
|
import com.yfd.platform.qgc_base.service.IMsOperationLogService;
|
||||||
import com.yfd.platform.qgc_base.service.ISdSonarBHService;
|
import com.yfd.platform.qgc_base.service.ISdSonarBHService;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.yfd.platform.utils.*;
|
import com.yfd.platform.utils.*;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
public class SdSonarBHServiceImpl extends ServiceImpl<SdSonarBHMapper, SdSonarBH> implements ISdSonarBHService {
|
public class SdSonarBHServiceImpl extends ServiceImpl<SdSonarBHMapper, SdSonarBH> implements ISdSonarBHService {
|
||||||
@ -30,6 +29,12 @@ public class SdSonarBHServiceImpl extends ServiceImpl<SdSonarBHMapper, SdSonarBH
|
|||||||
private DictCodeToNameConverter dictCodeToNameConverter;
|
private DictCodeToNameConverter dictCodeToNameConverter;
|
||||||
@Resource
|
@Resource
|
||||||
private StcdUniqueValidator stcdUniqueValidator;
|
private StcdUniqueValidator stcdUniqueValidator;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private PatchUpdateHelper patchUpdateHelper;
|
||||||
|
|
||||||
|
private static final Set<String> TRANSIENT_FIELDS = Set.of("sttpName", "bldsttCodeName", "usflName", "dtinName", "mwayName", "ennm", "baseName", "rvnm", "serialVersionUID");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 代码转名称元数据配置列表(静态初始化)
|
* 代码转名称元数据配置列表(静态初始化)
|
||||||
* <p>
|
* <p>
|
||||||
@ -95,6 +100,14 @@ public class SdSonarBHServiceImpl extends ServiceImpl<SdSonarBHMapper, SdSonarBH
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public boolean update(Map<String, Object> engInfoPatch, String source) throws Exception {
|
||||||
|
return patchUpdateHelper.execute(
|
||||||
|
this, engInfoPatch, source, TABLE_NAME, SdSonarBH.class,
|
||||||
|
TRANSIENT_FIELDS, CODE_TO_NAME_META_LIST);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public boolean delete(List<String> stcds, String source) {
|
public boolean delete(List<String> stcds, String source) {
|
||||||
|
|||||||
@ -9,6 +9,7 @@ import com.yfd.platform.qgc_base.domain.SdTeBH;
|
|||||||
import com.yfd.platform.qgc_base.mapper.SdTeBHMapper;
|
import com.yfd.platform.qgc_base.mapper.SdTeBHMapper;
|
||||||
import com.yfd.platform.qgc_base.service.IMsOperationLogService;
|
import com.yfd.platform.qgc_base.service.IMsOperationLogService;
|
||||||
import com.yfd.platform.qgc_base.service.ISdTeBHService;
|
import com.yfd.platform.qgc_base.service.ISdTeBHService;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.yfd.platform.utils.CodeToNameMetadataBo;
|
import com.yfd.platform.utils.CodeToNameMetadataBo;
|
||||||
import com.yfd.platform.utils.DataSourceRequestUtil;
|
import com.yfd.platform.utils.DataSourceRequestUtil;
|
||||||
import com.yfd.platform.utils.DictCodeToNameConverter;
|
import com.yfd.platform.utils.DictCodeToNameConverter;
|
||||||
@ -17,8 +18,7 @@ import jakarta.annotation.Resource;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
public class SdTeBHServiceImpl extends ServiceImpl<SdTeBHMapper, SdTeBH> implements ISdTeBHService {
|
public class SdTeBHServiceImpl extends ServiceImpl<SdTeBHMapper, SdTeBH> implements ISdTeBHService {
|
||||||
@ -31,6 +31,12 @@ public class SdTeBHServiceImpl extends ServiceImpl<SdTeBHMapper, SdTeBH> impleme
|
|||||||
private DictCodeToNameConverter dictCodeToNameConverter;
|
private DictCodeToNameConverter dictCodeToNameConverter;
|
||||||
@Resource
|
@Resource
|
||||||
private StcdUniqueValidator stcdUniqueValidator;
|
private StcdUniqueValidator stcdUniqueValidator;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private PatchUpdateHelper patchUpdateHelper;
|
||||||
|
|
||||||
|
private static final Set<String> TRANSIENT_FIELDS = Set.of("sttpName", "dtinName", "ennm", "baseName", "rvnm", "bldsttCodeName", "serialVersionUID");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 代码转名称元数据配置列表(静态初始化)
|
* 代码转名称元数据配置列表(静态初始化)
|
||||||
* <p>
|
* <p>
|
||||||
@ -94,6 +100,14 @@ public class SdTeBHServiceImpl extends ServiceImpl<SdTeBHMapper, SdTeBH> impleme
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public boolean update(Map<String, Object> engInfoPatch, String source) throws Exception {
|
||||||
|
return patchUpdateHelper.execute(
|
||||||
|
this, engInfoPatch, source, TABLE_NAME, SdTeBH.class,
|
||||||
|
TRANSIENT_FIELDS, CODE_TO_NAME_META_LIST);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public boolean delete(List<String> stcds, String source) {
|
public boolean delete(List<String> stcds, String source) {
|
||||||
|
|||||||
@ -10,14 +10,13 @@ import com.yfd.platform.qgc_base.domain.SdVaBH;
|
|||||||
import com.yfd.platform.qgc_base.mapper.SdVaBHMapper;
|
import com.yfd.platform.qgc_base.mapper.SdVaBHMapper;
|
||||||
import com.yfd.platform.qgc_base.service.IMsOperationLogService;
|
import com.yfd.platform.qgc_base.service.IMsOperationLogService;
|
||||||
import com.yfd.platform.qgc_base.service.ISdVaBHService;
|
import com.yfd.platform.qgc_base.service.ISdVaBHService;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.yfd.platform.utils.*;
|
import com.yfd.platform.utils.*;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
public class SdVaBHServiceImpl extends ServiceImpl<SdVaBHMapper, SdVaBH> implements ISdVaBHService {
|
public class SdVaBHServiceImpl extends ServiceImpl<SdVaBHMapper, SdVaBH> implements ISdVaBHService {
|
||||||
@ -30,6 +29,12 @@ public class SdVaBHServiceImpl extends ServiceImpl<SdVaBHMapper, SdVaBH> impleme
|
|||||||
private DictCodeToNameConverter dictCodeToNameConverter;
|
private DictCodeToNameConverter dictCodeToNameConverter;
|
||||||
@Resource
|
@Resource
|
||||||
private StcdUniqueValidator stcdUniqueValidator;
|
private StcdUniqueValidator stcdUniqueValidator;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private PatchUpdateHelper patchUpdateHelper;
|
||||||
|
|
||||||
|
private static final Set<String> TRANSIENT_FIELDS = Set.of("sttpName", "usflName", "dtinName", "ennm", "baseName", "bldsttCodeName", "serialVersionUID");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 代码转名称元数据配置列表(静态初始化)
|
* 代码转名称元数据配置列表(静态初始化)
|
||||||
* <p>
|
* <p>
|
||||||
@ -91,6 +96,14 @@ public class SdVaBHServiceImpl extends ServiceImpl<SdVaBHMapper, SdVaBH> impleme
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public boolean update(Map<String, Object> engInfoPatch, String source) throws Exception {
|
||||||
|
return patchUpdateHelper.execute(
|
||||||
|
this, engInfoPatch, source, TABLE_NAME, SdVaBH.class,
|
||||||
|
TRANSIENT_FIELDS, CODE_TO_NAME_META_LIST);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public boolean delete(List<String> stcds, String source) {
|
public boolean delete(List<String> stcds, String source) {
|
||||||
|
|||||||
@ -9,17 +9,16 @@ import com.yfd.platform.qgc_base.domain.SdVdinfoB;
|
|||||||
import com.yfd.platform.qgc_base.mapper.SdVdinfoBMapper;
|
import com.yfd.platform.qgc_base.mapper.SdVdinfoBMapper;
|
||||||
import com.yfd.platform.qgc_base.service.IMsOperationLogService;
|
import com.yfd.platform.qgc_base.service.IMsOperationLogService;
|
||||||
import com.yfd.platform.qgc_base.service.ISdVdinfoBService;
|
import com.yfd.platform.qgc_base.service.ISdVdinfoBService;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.yfd.platform.utils.CodeToNameMetadataBo;
|
import com.yfd.platform.utils.CodeToNameMetadataBo;
|
||||||
import com.yfd.platform.utils.DataSourceRequestUtil;
|
import com.yfd.platform.utils.DataSourceRequestUtil;
|
||||||
import com.yfd.platform.utils.DictCodeToNameConverter;
|
import com.yfd.platform.utils.DictCodeToNameConverter;
|
||||||
import com.yfd.platform.utils.StcdUniqueValidator;
|
import com.yfd.platform.utils.StcdUniqueValidator;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import org.checkerframework.checker.units.qual.C;
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
public class SdVdinfoBServiceImpl extends ServiceImpl<SdVdinfoBMapper, SdVdinfoB> implements ISdVdinfoBService {
|
public class SdVdinfoBServiceImpl extends ServiceImpl<SdVdinfoBMapper, SdVdinfoB> implements ISdVdinfoBService {
|
||||||
@ -32,6 +31,12 @@ public class SdVdinfoBServiceImpl extends ServiceImpl<SdVdinfoBMapper, SdVdinfoB
|
|||||||
private DictCodeToNameConverter dictCodeToNameConverter;
|
private DictCodeToNameConverter dictCodeToNameConverter;
|
||||||
@Resource
|
@Resource
|
||||||
private StcdUniqueValidator stcdUniqueValidator;
|
private StcdUniqueValidator stcdUniqueValidator;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private PatchUpdateHelper patchUpdateHelper;
|
||||||
|
|
||||||
|
private static final Set<String> TRANSIENT_FIELDS = Set.of("sttpName", "ennm", "rvnm", "addvcdName", "baseName", "bldsttCodeName", "dtinName", "serialVersionUID");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 代码转名称元数据配置列表(静态初始化)
|
* 代码转名称元数据配置列表(静态初始化)
|
||||||
* <p>
|
* <p>
|
||||||
@ -99,6 +104,14 @@ public class SdVdinfoBServiceImpl extends ServiceImpl<SdVdinfoBMapper, SdVdinfoB
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public boolean update(Map<String, Object> engInfoPatch, String source) throws Exception {
|
||||||
|
return patchUpdateHelper.execute(
|
||||||
|
this, engInfoPatch, source, TABLE_NAME, SdVdinfoB.class,
|
||||||
|
TRANSIENT_FIELDS, CODE_TO_NAME_META_LIST);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public boolean delete(List<String> stcds, String source) {
|
public boolean delete(List<String> stcds, String source) {
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
package com.yfd.platform.qgc_base.service.impl;
|
package com.yfd.platform.qgc_base.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
@ -15,9 +16,7 @@ import jakarta.annotation.Resource;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
public class SdVpBHServiceImpl extends ServiceImpl<SdVpBHMapper, SdVpBH> implements ISdVpBHService {
|
public class SdVpBHServiceImpl extends ServiceImpl<SdVpBHMapper, SdVpBH> implements ISdVpBHService {
|
||||||
@ -30,6 +29,13 @@ public class SdVpBHServiceImpl extends ServiceImpl<SdVpBHMapper, SdVpBH> impleme
|
|||||||
private DictCodeToNameConverter dictCodeToNameConverter;
|
private DictCodeToNameConverter dictCodeToNameConverter;
|
||||||
@Resource
|
@Resource
|
||||||
private StcdUniqueValidator stcdUniqueValidator;
|
private StcdUniqueValidator stcdUniqueValidator;
|
||||||
|
@Resource
|
||||||
|
private PatchUpdateHelper patchUpdateHelper;
|
||||||
|
|
||||||
|
/** SdVpBH 中 @TableField(exist = false) 的字段名 + serialVersionUID */
|
||||||
|
private static final Set<String> TRANSIENT_FIELDS = Set.of(
|
||||||
|
"sttpName", "dtinName", "ennm", "baseName", "bldsttCodeName", "serialVersionUID"
|
||||||
|
);
|
||||||
/**
|
/**
|
||||||
* 代码转名称元数据配置列表(静态初始化)
|
* 代码转名称元数据配置列表(静态初始化)
|
||||||
* <p>
|
* <p>
|
||||||
@ -90,6 +96,14 @@ public class SdVpBHServiceImpl extends ServiceImpl<SdVpBHMapper, SdVpBH> impleme
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public boolean update(Map<String, Object> engInfoPatch, String source) throws Exception {
|
||||||
|
return patchUpdateHelper.execute(
|
||||||
|
this, engInfoPatch, source, TABLE_NAME, SdVpBH.class,
|
||||||
|
TRANSIENT_FIELDS, CODE_TO_NAME_META_LIST);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public boolean delete(List<String> stcds, String source) {
|
public boolean delete(List<String> stcds, String source) {
|
||||||
|
|||||||
@ -17,8 +17,7 @@ import jakarta.annotation.Resource;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
public class SdWeBHServiceImpl extends ServiceImpl<SdWeBHMapper, SdWeBH> implements ISdWeBHService {
|
public class SdWeBHServiceImpl extends ServiceImpl<SdWeBHMapper, SdWeBH> implements ISdWeBHService {
|
||||||
@ -32,6 +31,13 @@ public class SdWeBHServiceImpl extends ServiceImpl<SdWeBHMapper, SdWeBH> impleme
|
|||||||
private DictCodeToNameConverter dictCodeToNameConverter;
|
private DictCodeToNameConverter dictCodeToNameConverter;
|
||||||
@Resource
|
@Resource
|
||||||
private StcdUniqueValidator stcdUniqueValidator;
|
private StcdUniqueValidator stcdUniqueValidator;
|
||||||
|
@Resource
|
||||||
|
private PatchUpdateHelper patchUpdateHelper;
|
||||||
|
|
||||||
|
/** SdWeBH 中 @TableField(exist = false) 的字段名 + serialVersionUID */
|
||||||
|
private static final Set<String> TRANSIENT_FIELDS = Set.of(
|
||||||
|
"sttpName", "dtinName", "ennm", "baseName", "rvnm", "bldsttCodeName", "serialVersionUID"
|
||||||
|
);
|
||||||
/**
|
/**
|
||||||
* 代码转名称元数据配置列表(静态初始化)
|
* 代码转名称元数据配置列表(静态初始化)
|
||||||
* <p>
|
* <p>
|
||||||
@ -96,6 +102,14 @@ public class SdWeBHServiceImpl extends ServiceImpl<SdWeBHMapper, SdWeBH> impleme
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public boolean update(Map<String, Object> engInfoPatch, String source) throws Exception {
|
||||||
|
return patchUpdateHelper.execute(
|
||||||
|
this, engInfoPatch, source, TABLE_NAME, SdWeBH.class,
|
||||||
|
TRANSIENT_FIELDS, CODE_TO_NAME_META_LIST);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public boolean delete(List<String> stcds, String source) {
|
public boolean delete(List<String> stcds, String source) {
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
package com.yfd.platform.qgc_base.service.impl;
|
package com.yfd.platform.qgc_base.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
@ -15,9 +16,7 @@ import jakarta.annotation.Resource;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
public class SdWqBHServiceImpl extends ServiceImpl<SdWqBHMapper, SdWqBH> implements ISdWqBHService {
|
public class SdWqBHServiceImpl extends ServiceImpl<SdWqBHMapper, SdWqBH> implements ISdWqBHService {
|
||||||
@ -31,6 +30,14 @@ public class SdWqBHServiceImpl extends ServiceImpl<SdWqBHMapper, SdWqBH> impleme
|
|||||||
private DictCodeToNameConverter dictCodeToNameConverter;
|
private DictCodeToNameConverter dictCodeToNameConverter;
|
||||||
@Resource
|
@Resource
|
||||||
private StcdUniqueValidator stcdUniqueValidator;
|
private StcdUniqueValidator stcdUniqueValidator;
|
||||||
|
@Resource
|
||||||
|
private PatchUpdateHelper patchUpdateHelper;
|
||||||
|
|
||||||
|
/** SdWqBH 中 @TableField(exist = false) 的字段名 + serialVersionUID */
|
||||||
|
private static final Set<String> TRANSIENT_FIELDS = Set.of(
|
||||||
|
"sttpName", "wwqtgName", "bldsttCodeName", "dtinName",
|
||||||
|
"dtinTypeName", "mwayName", "ennm", "baseName", "serialVersionUID"
|
||||||
|
);
|
||||||
/**
|
/**
|
||||||
* 代码转名称元数据配置列表(静态初始化)
|
* 代码转名称元数据配置列表(静态初始化)
|
||||||
* <p>
|
* <p>
|
||||||
@ -93,6 +100,14 @@ public class SdWqBHServiceImpl extends ServiceImpl<SdWqBHMapper, SdWqBH> impleme
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public boolean update(Map<String, Object> engInfoPatch, String source) throws Exception {
|
||||||
|
return patchUpdateHelper.execute(
|
||||||
|
this, engInfoPatch, source, TABLE_NAME, SdWqBH.class,
|
||||||
|
TRANSIENT_FIELDS, CODE_TO_NAME_META_LIST);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public boolean delete(List<String> stcds, String source) {
|
public boolean delete(List<String> stcds, String source) {
|
||||||
|
|||||||
@ -16,9 +16,7 @@ import jakarta.annotation.Resource;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
public class SdWtBHServiceImpl extends ServiceImpl<SdWtBHMapper, SdWtBH> implements ISdWtBHService {
|
public class SdWtBHServiceImpl extends ServiceImpl<SdWtBHMapper, SdWtBH> implements ISdWtBHService {
|
||||||
@ -33,6 +31,14 @@ public class SdWtBHServiceImpl extends ServiceImpl<SdWtBHMapper, SdWtBH> impleme
|
|||||||
private DictCodeToNameConverter dictCodeToNameConverter;
|
private DictCodeToNameConverter dictCodeToNameConverter;
|
||||||
@Resource
|
@Resource
|
||||||
private StcdUniqueValidator stcdUniqueValidator;
|
private StcdUniqueValidator stcdUniqueValidator;
|
||||||
|
@Resource
|
||||||
|
private PatchUpdateHelper patchUpdateHelper;
|
||||||
|
|
||||||
|
/** SdWtBH 中 @TableField(exist = false) 的字段名 + serialVersionUID */
|
||||||
|
private static final Set<String> WT_TRANSIENT_FIELDS = Set.of(
|
||||||
|
"sttpName", "bldsttCodeName", "dtinName", "dtinTypeName",
|
||||||
|
"mwayName", "ennm", "baseName", "serialVersionUID"
|
||||||
|
);
|
||||||
/**
|
/**
|
||||||
* 代码转名称元数据配置列表(静态初始化)
|
* 代码转名称元数据配置列表(静态初始化)
|
||||||
* <p>
|
* <p>
|
||||||
@ -96,6 +102,14 @@ public class SdWtBHServiceImpl extends ServiceImpl<SdWtBHMapper, SdWtBH> impleme
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public boolean update(Map<String, Object> engInfoPatch, String source) throws Exception {
|
||||||
|
return patchUpdateHelper.execute(
|
||||||
|
this, engInfoPatch, source, TABLE_NAME, SdWtBH.class,
|
||||||
|
WT_TRANSIENT_FIELDS, CODE_TO_NAME_META_LIST);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public boolean delete(List<String> stcds, String source) {
|
public boolean delete(List<String> stcds, String source) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user