diff --git a/hbt-msds/hbt-msds-api/hbt-api-system.iml b/hbt-msds/hbt-msds-api/hbt-api-system.iml new file mode 100644 index 0000000..19acc17 --- /dev/null +++ b/hbt-msds/hbt-msds-api/hbt-api-system.iml @@ -0,0 +1,108 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/hbt-msds/hbt-msds-api/pom.xml b/hbt-msds/hbt-msds-api/pom.xml new file mode 100644 index 0000000..10e9cb0 --- /dev/null +++ b/hbt-msds/hbt-msds-api/pom.xml @@ -0,0 +1,32 @@ + + + + com.hbt + hbt-msds + 1.0-SNAPSHOT + + 4.0.0 + + hbt-msds-api + + + hbt-msds-api系统接口模块 + + + + + + + com.hbt + hbt-common-core + + + org.projectlombok + lombok + + + + + \ No newline at end of file diff --git a/hbt-msds/hbt-msds-api/src/main/java/com/hbt/msds/api/RemoteMsdsService.java b/hbt-msds/hbt-msds-api/src/main/java/com/hbt/msds/api/RemoteMsdsService.java new file mode 100644 index 0000000..dfb59f7 --- /dev/null +++ b/hbt-msds/hbt-msds-api/src/main/java/com/hbt/msds/api/RemoteMsdsService.java @@ -0,0 +1,32 @@ +package com.hbt.msds.api; + +import com.hbt.msds.api.domain.Msds; +import com.hbt.msds.api.factory.RemoteMsdsFallbackFactory; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestHeader; +import com.hbt.common.core.constant.SecurityConstants; +import com.hbt.common.core.domain.R; +import org.springframework.web.bind.annotation.RequestParam; + +/** + * 化学品信息服务 + * + * 通过fegin调用接口的形式,且所有需要的返回的实体类都应放到domain文件夹中 + * @author hbt + */ +@FeignClient(contextId = "remoteMsdsService", value = "hbt-msds", fallbackFactory = RemoteMsdsFallbackFactory.class) +public interface RemoteMsdsService +{ + + /** + * 通过化学品名称查询化学品信息 + * + * @param name 化学品名 + * @param source 请求来源 + * @return 结果 + */ + @GetMapping("/msds/selectMsdsByName") + public R getInfo(@RequestParam("name") String name, @RequestHeader(SecurityConstants.FROM_SOURCE) String source); +} diff --git a/hbt-msds/src/main/java/com/hbt/security/knowledge/base/msds/model/Msds.java b/hbt-msds/hbt-msds-api/src/main/java/com/hbt/msds/api/domain/Msds.java similarity index 99% rename from hbt-msds/src/main/java/com/hbt/security/knowledge/base/msds/model/Msds.java rename to hbt-msds/hbt-msds-api/src/main/java/com/hbt/msds/api/domain/Msds.java index a15cf3b..40cf383 100644 --- a/hbt-msds/src/main/java/com/hbt/security/knowledge/base/msds/model/Msds.java +++ b/hbt-msds/hbt-msds-api/src/main/java/com/hbt/msds/api/domain/Msds.java @@ -1,12 +1,11 @@ -package com.hbt.security.knowledge.base.msds.model; - +package com.hbt.msds.api.domain; import com.hbt.common.core.annotation.Excel; import com.hbt.common.core.web.domain.BaseEntity; import lombok.Data; /** * 化学品安全信息对象 msds - * + * * @author hbt */ @Data @@ -445,4 +444,4 @@ public class Msds extends BaseEntity { ", material=" + material + '}'; } -} +} \ No newline at end of file diff --git a/hbt-msds/src/main/java/com/hbt/security/knowledge/base/msds/model/MsdsMaterial.java b/hbt-msds/hbt-msds-api/src/main/java/com/hbt/msds/api/domain/MsdsMaterial.java similarity index 99% rename from hbt-msds/src/main/java/com/hbt/security/knowledge/base/msds/model/MsdsMaterial.java rename to hbt-msds/hbt-msds-api/src/main/java/com/hbt/msds/api/domain/MsdsMaterial.java index b643d01..298d669 100644 --- a/hbt-msds/src/main/java/com/hbt/security/knowledge/base/msds/model/MsdsMaterial.java +++ b/hbt-msds/hbt-msds-api/src/main/java/com/hbt/msds/api/domain/MsdsMaterial.java @@ -1,4 +1,4 @@ -package com.hbt.security.knowledge.base.msds.model; +package com.hbt.msds.api.domain; import com.hbt.common.core.annotation.Excel; import com.hbt.common.core.web.domain.BaseEntity; diff --git a/hbt-msds/hbt-msds-api/src/main/java/com/hbt/msds/api/factory/RemoteMsdsFallbackFactory.java b/hbt-msds/hbt-msds-api/src/main/java/com/hbt/msds/api/factory/RemoteMsdsFallbackFactory.java new file mode 100644 index 0000000..f6f140b --- /dev/null +++ b/hbt-msds/hbt-msds-api/src/main/java/com/hbt/msds/api/factory/RemoteMsdsFallbackFactory.java @@ -0,0 +1,33 @@ +package com.hbt.msds.api.factory; + +import com.hbt.msds.api.RemoteMsdsService; +import com.hbt.msds.api.domain.Msds; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.cloud.openfeign.FallbackFactory; +import org.springframework.stereotype.Component; +import com.hbt.common.core.domain.R; + +/** + * 化学品信息服务降级处理 + * + * @author hbt + */ +@Component +public class RemoteMsdsFallbackFactory implements FallbackFactory +{ + private static final Logger log = LoggerFactory.getLogger(RemoteMsdsFallbackFactory.class); + + @Override + public RemoteMsdsService create(Throwable throwable) + { + log.error("化学品信息服务调用失败:{}", throwable.getMessage()); + return new RemoteMsdsService() + { + @Override + public R getInfo(String name, String source) { + return R.fail("获取化学品信息失败:" + throwable.getMessage()); + } + }; + } +} diff --git a/hbt-msds/hbt-msds-api/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/hbt-msds/hbt-msds-api/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports new file mode 100644 index 0000000..c6a0513 --- /dev/null +++ b/hbt-msds/hbt-msds-api/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -0,0 +1 @@ +com.hbt.msds.api.factory.RemoteMsdsFallbackFactory diff --git a/hbt-msds/hbt-msds-api/target/classes/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/hbt-msds/hbt-msds-api/target/classes/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports new file mode 100644 index 0000000..c6a0513 --- /dev/null +++ b/hbt-msds/hbt-msds-api/target/classes/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -0,0 +1 @@ +com.hbt.msds.api.factory.RemoteMsdsFallbackFactory diff --git a/hbt-msds/hbt-msds-api/target/classes/com/hbt/msds/api/RemoteMsdsService.class b/hbt-msds/hbt-msds-api/target/classes/com/hbt/msds/api/RemoteMsdsService.class new file mode 100644 index 0000000..413fc3c Binary files /dev/null and b/hbt-msds/hbt-msds-api/target/classes/com/hbt/msds/api/RemoteMsdsService.class differ diff --git a/hbt-msds/hbt-msds-api/target/classes/com/hbt/msds/api/domain/Msds.class b/hbt-msds/hbt-msds-api/target/classes/com/hbt/msds/api/domain/Msds.class new file mode 100644 index 0000000..09a5417 Binary files /dev/null and b/hbt-msds/hbt-msds-api/target/classes/com/hbt/msds/api/domain/Msds.class differ diff --git a/hbt-msds/hbt-msds-api/target/classes/com/hbt/msds/api/domain/MsdsMaterial.class b/hbt-msds/hbt-msds-api/target/classes/com/hbt/msds/api/domain/MsdsMaterial.class new file mode 100644 index 0000000..e6859ae Binary files /dev/null and b/hbt-msds/hbt-msds-api/target/classes/com/hbt/msds/api/domain/MsdsMaterial.class differ diff --git a/hbt-msds/hbt-msds-api/target/classes/com/hbt/msds/api/factory/RemoteMsdsFallbackFactory$1.class b/hbt-msds/hbt-msds-api/target/classes/com/hbt/msds/api/factory/RemoteMsdsFallbackFactory$1.class new file mode 100644 index 0000000..72519cb Binary files /dev/null and b/hbt-msds/hbt-msds-api/target/classes/com/hbt/msds/api/factory/RemoteMsdsFallbackFactory$1.class differ diff --git a/hbt-msds/hbt-msds-api/target/classes/com/hbt/msds/api/factory/RemoteMsdsFallbackFactory.class b/hbt-msds/hbt-msds-api/target/classes/com/hbt/msds/api/factory/RemoteMsdsFallbackFactory.class new file mode 100644 index 0000000..91c66df Binary files /dev/null and b/hbt-msds/hbt-msds-api/target/classes/com/hbt/msds/api/factory/RemoteMsdsFallbackFactory.class differ diff --git a/hbt-msds/hbt-msds-api/target/hbt-msds-api-1.0-SNAPSHOT.jar b/hbt-msds/hbt-msds-api/target/hbt-msds-api-1.0-SNAPSHOT.jar new file mode 100644 index 0000000..b359690 Binary files /dev/null and b/hbt-msds/hbt-msds-api/target/hbt-msds-api-1.0-SNAPSHOT.jar differ diff --git a/hbt-msds/hbt-msds-api/target/maven-archiver/pom.properties b/hbt-msds/hbt-msds-api/target/maven-archiver/pom.properties new file mode 100644 index 0000000..e59dd08 --- /dev/null +++ b/hbt-msds/hbt-msds-api/target/maven-archiver/pom.properties @@ -0,0 +1,5 @@ +#Generated by Maven +#Thu Feb 16 14:30:00 CST 2023 +version=1.0-SNAPSHOT +groupId=com.hbt +artifactId=hbt-msds-api diff --git a/hbt-msds/hbt-msds-api/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst b/hbt-msds/hbt-msds-api/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst new file mode 100644 index 0000000..59d6a7e --- /dev/null +++ b/hbt-msds/hbt-msds-api/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst @@ -0,0 +1,5 @@ +com\hbt\msds\api\domain\Msds.class +com\hbt\msds\api\RemoteMsdsService.class +com\hbt\msds\api\domain\MsdsMaterial.class +com\hbt\msds\api\factory\RemoteMsdsFallbackFactory.class +com\hbt\msds\api\factory\RemoteMsdsFallbackFactory$1.class diff --git a/hbt-msds/hbt-msds-api/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst b/hbt-msds/hbt-msds-api/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst new file mode 100644 index 0000000..0cf1b1a --- /dev/null +++ b/hbt-msds/hbt-msds-api/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst @@ -0,0 +1,4 @@ +D:\hbtcode1\security-knowledge-base\hbt-msds\hbt-msds-api\src\main\java\com\hbt\msds\api\domain\Msds.java +D:\hbtcode1\security-knowledge-base\hbt-msds\hbt-msds-api\src\main\java\com\hbt\msds\api\factory\RemoteMsdsFallbackFactory.java +D:\hbtcode1\security-knowledge-base\hbt-msds\hbt-msds-api\src\main\java\com\hbt\msds\api\RemoteMsdsService.java +D:\hbtcode1\security-knowledge-base\hbt-msds\hbt-msds-api\src\main\java\com\hbt\msds\api\domain\MsdsMaterial.java diff --git a/hbt-msds/.gitignore b/hbt-msds/hbt-msds-biz/.gitignore similarity index 100% rename from hbt-msds/.gitignore rename to hbt-msds/hbt-msds-biz/.gitignore diff --git a/hbt-msds/Dockerfile b/hbt-msds/hbt-msds-biz/Dockerfile similarity index 63% rename from hbt-msds/Dockerfile rename to hbt-msds/hbt-msds-biz/Dockerfile index 40f91a1..c612242 100644 --- a/hbt-msds/Dockerfile +++ b/hbt-msds/hbt-msds-biz/Dockerfile @@ -1,4 +1,5 @@ FROM 119.45.158.12:5000/mini-java8:latest -COPY target/hbt-msds-1.0-SNAPSHOT.jar /app/app.jar +COPY target/hbt-msds-biz-1.0-SNAPSHOT.jar /app/app.jar +WORKDIR /app ENV NACOSIP="" ENTRYPOINT ["sh","-c","java -Dnacos.ip=$NACOSIP -jar /app/app.jar"] \ No newline at end of file diff --git a/hbt-msds/hbt-msds-biz/pom.xml b/hbt-msds/hbt-msds-biz/pom.xml new file mode 100644 index 0000000..7e3251a --- /dev/null +++ b/hbt-msds/hbt-msds-biz/pom.xml @@ -0,0 +1,107 @@ + + + + hbt-msds + com.hbt + 1.0-SNAPSHOT + + 4.0.0 + + hbt-msds-biz + + + + + com.alibaba.cloud + spring-cloud-starter-alibaba-nacos-discovery + + + + com.alibaba.cloud + spring-cloud-starter-alibaba-nacos-config + + + + com.alibaba.cloud + spring-cloud-starter-alibaba-sentinel + + + + org.springframework.boot + spring-boot-starter-actuator + + + + com.hbt + hbt-common-security + + + + org.springframework.boot + spring-boot-configuration-processor + true + + + + + com.hbt + hbt-common-datasource + + + + + com.hbt + hbt-common-swagger + + + + com.hbt + hbt-common-log + + + + io.springfox + springfox-swagger-ui + ${swagger.fox.version} + + + + + mysql + mysql-connector-java + + + org.springframework.boot + spring-boot-starter-test + test + + + org.projectlombok + lombok + + + + com.hbt + hbt-msds-api + 1.0-SNAPSHOT + + + + ${project.artifactId} + + + org.springframework.boot + spring-boot-maven-plugin + + + + repackage + + + + + + + \ No newline at end of file diff --git a/hbt-msds/src/main/java/com/hbt/security/knowledge/base/msds/MsdsApplication.java b/hbt-msds/hbt-msds-biz/src/main/java/com/hbt/security/knowledge/base/msds/MsdsApplication.java similarity index 100% rename from hbt-msds/src/main/java/com/hbt/security/knowledge/base/msds/MsdsApplication.java rename to hbt-msds/hbt-msds-biz/src/main/java/com/hbt/security/knowledge/base/msds/MsdsApplication.java diff --git a/hbt-msds/src/main/java/com/hbt/security/knowledge/base/msds/controller/MsdsController.java b/hbt-msds/hbt-msds-biz/src/main/java/com/hbt/security/knowledge/base/msds/controller/MsdsController.java similarity index 72% rename from hbt-msds/src/main/java/com/hbt/security/knowledge/base/msds/controller/MsdsController.java rename to hbt-msds/hbt-msds-biz/src/main/java/com/hbt/security/knowledge/base/msds/controller/MsdsController.java index 28f5f73..c766d78 100644 --- a/hbt-msds/src/main/java/com/hbt/security/knowledge/base/msds/controller/MsdsController.java +++ b/hbt-msds/hbt-msds-biz/src/main/java/com/hbt/security/knowledge/base/msds/controller/MsdsController.java @@ -2,11 +2,12 @@ package com.hbt.security.knowledge.base.msds.controller; import com.github.pagehelper.PageInfo; import com.hbt.common.core.domain.R; +import com.hbt.common.security.annotation.InnerAuth; +import com.hbt.msds.api.domain.Msds; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import com.hbt.common.log.annotation.Log; import com.hbt.common.log.enums.BusinessType; -import com.hbt.security.knowledge.base.msds.model.Msds; import com.hbt.security.knowledge.base.msds.service.IMsdsService; import com.hbt.common.core.web.controller.BaseController; @@ -15,7 +16,7 @@ import javax.validation.constraints.NotNull; /** * 化学品安全信息Controller - * + * * @author hbt */ @RestController @@ -27,15 +28,14 @@ public class MsdsController extends BaseController { /** * 查询化学品安全信息列表 * - * @param type 查询类型 0-按中文名检索 1-按其他中文名检索 2-按英文名检索 3-按其他英文名检索 4-CAS 5-按危险货物编号检索 + * @param type 查询类型 0-按中文名检索 1-按其他中文名检索 2-按英文名检索 3-按其他英文名检索 4-CAS 5-按危险货物编号检索 * @param selectValue 查询内容 - * @param page 当前页 - * @param pageSize 页大小 + * @param page 当前页 + * @param pageSize 页大小 * @return 返回值 */ @GetMapping("/listMsds") - public R> list(@RequestParam(value = "type") int type, @RequestParam(value = "selectValue") String selectValue, @RequestParam(value = "CurrentPage") int page, @RequestParam(value = "PageSize") int pageSize) - { + public R> list(@RequestParam(value = "type") int type, @RequestParam(value = "selectValue") String selectValue, @RequestParam(value = "CurrentPage") int page, @RequestParam(value = "PageSize") int pageSize) { PageInfo pageInfo = msdsService.selectMsdsList(type, selectValue, page, pageSize); return R.ok(pageInfo); } @@ -46,8 +46,7 @@ public class MsdsController extends BaseController { * @param id 化学品id */ @GetMapping(value = "/selectMsdsById") - public R getInfo(@RequestParam("id") int id) - { + public R getInfo(@RequestParam("id") int id) { Msds msds = msdsService.selectMsdsById(id); return R.ok(msds); } @@ -57,8 +56,7 @@ public class MsdsController extends BaseController { */ @Log(title = "化学品安全信息", businessType = BusinessType.INSERT) @GetMapping(value = "/addMsds") - public R add(@RequestBody @NotNull Msds msds) - { + public R add(@RequestBody @NotNull Msds msds) { int row = msdsService.insertMsds(msds); if (row > 0) { return R.ok("success"); @@ -71,8 +69,7 @@ public class MsdsController extends BaseController { */ @Log(title = "化学品安全信息", businessType = BusinessType.UPDATE) @GetMapping(value = "/updateMsds") - public R edit(@RequestBody @NotNull Msds msds) - { + public R edit(@RequestBody @NotNull Msds msds) { int row = msdsService.updateMsds(msds); if (row > 0) { return R.ok("success"); @@ -84,13 +81,24 @@ public class MsdsController extends BaseController { * 删除化学品安全信息 */ @Log(title = "化学品安全信息", businessType = BusinessType.DELETE) - @GetMapping("/deleteMsds") - public R remove(@RequestParam(value = "id") String id) - { + @GetMapping("/deleteMsds") + public R remove(@RequestParam(value = "id") String id) { int row = msdsService.deleteMsdsById(id); if (row > 0) { return R.ok("success"); } return R.fail("fail"); } + + /** + * 获取化学品安全信息详细信息 + * + * @param name 化学品名称 + */ +// @InnerAuth + @GetMapping(value = "/selectMsdsByName") + public R getInfo(@RequestParam("name") String name) { + Msds msds = msdsService.selectMsdsByName(name); + return R.ok(msds); + } } diff --git a/hbt-msds/src/main/java/com/hbt/security/knowledge/base/msds/dao/MsdsDao.java b/hbt-msds/hbt-msds-biz/src/main/java/com/hbt/security/knowledge/base/msds/dao/MsdsDao.java similarity index 81% rename from hbt-msds/src/main/java/com/hbt/security/knowledge/base/msds/dao/MsdsDao.java rename to hbt-msds/hbt-msds-biz/src/main/java/com/hbt/security/knowledge/base/msds/dao/MsdsDao.java index f8ac5b5..bef7870 100644 --- a/hbt-msds/src/main/java/com/hbt/security/knowledge/base/msds/dao/MsdsDao.java +++ b/hbt-msds/hbt-msds-biz/src/main/java/com/hbt/security/knowledge/base/msds/dao/MsdsDao.java @@ -1,6 +1,6 @@ package com.hbt.security.knowledge.base.msds.dao; -import com.hbt.security.knowledge.base.msds.model.Msds; +import com.hbt.msds.api.domain.Msds; import java.util.List; @@ -13,6 +13,14 @@ public interface MsdsDao { */ Msds selectMsdsById(int id); + /** + * 查询化学品安全信息 + * + * @param name 化学品安全信息主键 + * @return 化学品安全信息 + */ + Msds selectMsdsByName(String name); + /** * 查询化学品安全信息列表 * diff --git a/hbt-msds/src/main/java/com/hbt/security/knowledge/base/msds/dao/impl/MsdsDaoImpl.java b/hbt-msds/hbt-msds-biz/src/main/java/com/hbt/security/knowledge/base/msds/dao/impl/MsdsDaoImpl.java similarity index 88% rename from hbt-msds/src/main/java/com/hbt/security/knowledge/base/msds/dao/impl/MsdsDaoImpl.java rename to hbt-msds/hbt-msds-biz/src/main/java/com/hbt/security/knowledge/base/msds/dao/impl/MsdsDaoImpl.java index d205dcb..3e1b3e6 100644 --- a/hbt-msds/src/main/java/com/hbt/security/knowledge/base/msds/dao/impl/MsdsDaoImpl.java +++ b/hbt-msds/hbt-msds-biz/src/main/java/com/hbt/security/knowledge/base/msds/dao/impl/MsdsDaoImpl.java @@ -1,10 +1,10 @@ package com.hbt.security.knowledge.base.msds.dao.impl; import com.hbt.common.core.utils.StringUtils; +import com.hbt.msds.api.domain.Msds; +import com.hbt.msds.api.domain.MsdsMaterial; import com.hbt.security.knowledge.base.msds.dao.MsdsDao; import com.hbt.security.knowledge.base.msds.mapper.MsdsMapper; -import com.hbt.security.knowledge.base.msds.model.Msds; -import com.hbt.security.knowledge.base.msds.model.MsdsMaterial; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Repository; import org.springframework.transaction.annotation.Transactional; @@ -29,6 +29,17 @@ public class MsdsDaoImpl implements MsdsDao { return msdsMapper.selectMsdsById(id); } + /** + * 查询化学品安全信息 + * + * @param name 化学品名称 + * @return 化学品安全信息 + */ + @Override + public Msds selectMsdsByName(String name) { + return msdsMapper.selectMsdsByName(name); + } + /** * 查询化学品安全信息列表 * diff --git a/hbt-msds/src/main/java/com/hbt/security/knowledge/base/msds/mapper/MsdsMapper.java b/hbt-msds/hbt-msds-biz/src/main/java/com/hbt/security/knowledge/base/msds/mapper/MsdsMapper.java similarity index 86% rename from hbt-msds/src/main/java/com/hbt/security/knowledge/base/msds/mapper/MsdsMapper.java rename to hbt-msds/hbt-msds-biz/src/main/java/com/hbt/security/knowledge/base/msds/mapper/MsdsMapper.java index 7e251f6..4a5e0c7 100644 --- a/hbt-msds/src/main/java/com/hbt/security/knowledge/base/msds/mapper/MsdsMapper.java +++ b/hbt-msds/hbt-msds-biz/src/main/java/com/hbt/security/knowledge/base/msds/mapper/MsdsMapper.java @@ -1,8 +1,9 @@ package com.hbt.security.knowledge.base.msds.mapper; import java.util.List; -import com.hbt.security.knowledge.base.msds.model.Msds; -import com.hbt.security.knowledge.base.msds.model.MsdsMaterial; + +import com.hbt.msds.api.domain.Msds; +import com.hbt.msds.api.domain.MsdsMaterial; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -11,7 +12,6 @@ import org.apache.ibatis.annotations.Param; * * @author hbt */ -@Mapper public interface MsdsMapper { /** @@ -22,6 +22,14 @@ public interface MsdsMapper */ Msds selectMsdsById(@Param("id") int id); + /** + * 查询化学品安全信息 + * + * @param name 化学品名称 + * @return 化学品安全信息 + */ + Msds selectMsdsByName(String name); + /** * 查询化学品安全信息列表 * diff --git a/hbt-msds/src/main/java/com/hbt/security/knowledge/base/msds/service/IMsdsService.java b/hbt-msds/hbt-msds-biz/src/main/java/com/hbt/security/knowledge/base/msds/service/IMsdsService.java similarity index 84% rename from hbt-msds/src/main/java/com/hbt/security/knowledge/base/msds/service/IMsdsService.java rename to hbt-msds/hbt-msds-biz/src/main/java/com/hbt/security/knowledge/base/msds/service/IMsdsService.java index 3deb8bf..124b337 100644 --- a/hbt-msds/src/main/java/com/hbt/security/knowledge/base/msds/service/IMsdsService.java +++ b/hbt-msds/hbt-msds-biz/src/main/java/com/hbt/security/knowledge/base/msds/service/IMsdsService.java @@ -1,7 +1,7 @@ package com.hbt.security.knowledge.base.msds.service; import com.github.pagehelper.PageInfo; -import com.hbt.security.knowledge.base.msds.model.Msds; +import com.hbt.msds.api.domain.Msds; /** * 化学品安全信息Service接口 @@ -18,6 +18,15 @@ public interface IMsdsService */ Msds selectMsdsById(int id); + /** + * 查询化学品安全信息 + * + * @param name 化学品名称 + * @return 化学品安全信息 + */ + Msds selectMsdsByName(String name); + + /** * 查询化学品安全信息列表 * diff --git a/hbt-msds/src/main/java/com/hbt/security/knowledge/base/msds/service/impl/MsdsServiceImpl.java b/hbt-msds/hbt-msds-biz/src/main/java/com/hbt/security/knowledge/base/msds/service/impl/MsdsServiceImpl.java similarity index 89% rename from hbt-msds/src/main/java/com/hbt/security/knowledge/base/msds/service/impl/MsdsServiceImpl.java rename to hbt-msds/hbt-msds-biz/src/main/java/com/hbt/security/knowledge/base/msds/service/impl/MsdsServiceImpl.java index 3765494..5b753a3 100644 --- a/hbt-msds/src/main/java/com/hbt/security/knowledge/base/msds/service/impl/MsdsServiceImpl.java +++ b/hbt-msds/hbt-msds-biz/src/main/java/com/hbt/security/knowledge/base/msds/service/impl/MsdsServiceImpl.java @@ -5,8 +5,8 @@ import java.util.List; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import com.hbt.common.core.utils.StringUtils; +import com.hbt.msds.api.domain.Msds; import com.hbt.security.knowledge.base.msds.dao.MsdsDao; -import com.hbt.security.knowledge.base.msds.model.Msds; import com.hbt.security.knowledge.base.msds.service.IMsdsService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -35,6 +35,19 @@ public class MsdsServiceImpl implements IMsdsService return msdsDao.selectMsdsById(id); } + /** + * 查询化学品安全信息 + * + * @param name 化学品名称 + * @return 化学品安全信息 + */ + @Override + public Msds selectMsdsByName(String name) + { + return msdsDao.selectMsdsByName(name); + } + + /** * 查询化学品安全信息列表 * diff --git a/hbt-msds/src/main/resources/banner.txt b/hbt-msds/hbt-msds-biz/src/main/resources/banner.txt similarity index 100% rename from hbt-msds/src/main/resources/banner.txt rename to hbt-msds/hbt-msds-biz/src/main/resources/banner.txt diff --git a/hbt-msds/src/main/resources/bootstrap-dev.yml b/hbt-msds/hbt-msds-biz/src/main/resources/bootstrap-dev.yml similarity index 100% rename from hbt-msds/src/main/resources/bootstrap-dev.yml rename to hbt-msds/hbt-msds-biz/src/main/resources/bootstrap-dev.yml diff --git a/hbt-msds/src/main/resources/bootstrap.yml b/hbt-msds/hbt-msds-biz/src/main/resources/bootstrap.yml similarity index 100% rename from hbt-msds/src/main/resources/bootstrap.yml rename to hbt-msds/hbt-msds-biz/src/main/resources/bootstrap.yml diff --git a/hbt-msds/src/main/resources/mapper/MsdsMapper.xml b/hbt-msds/hbt-msds-biz/src/main/resources/mapper/MsdsMapper.xml similarity index 95% rename from hbt-msds/src/main/resources/mapper/MsdsMapper.xml rename to hbt-msds/hbt-msds-biz/src/main/resources/mapper/MsdsMapper.xml index d606fec..7af5085 100644 --- a/hbt-msds/src/main/resources/mapper/MsdsMapper.xml +++ b/hbt-msds/hbt-msds-biz/src/main/resources/mapper/MsdsMapper.xml @@ -4,7 +4,7 @@ "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - + @@ -91,11 +91,11 @@ - - + + - + @@ -199,6 +199,13 @@ + + + - + insert into msds ( chemical_cn, other_chemical_cn, @@ -401,7 +408,7 @@ - + insert into msds_material ( msds, acute_toxicity, @@ -413,9 +420,9 @@ mice_oral_LD, mice_percutaneous_LD, mice_venous_LD, - mice_intraperitoneal_LD, - guinea_pigs_oral_LD, - guinea_pigs_percutaneous_LD, + mice_intraperitoneal_LD, + guinea_pigs_oral_LD, + guinea_pigs_percutaneous_LD, guinea_pigs_subcutaneous_LD, guinea_pigs_venous_LD, guinea_pigs_intraperitoneal_LD, @@ -590,7 +597,7 @@ ) - + update msds_material set acute_toxicity = #{material.acute_toxicity}, @@ -686,7 +693,7 @@ where msds = #{material.msds} - + update msds set chemical_cn = #{msds.chemicalCn}, diff --git a/hbt-msds/hbt-msds-biz/target/classes/banner.txt b/hbt-msds/hbt-msds-biz/target/classes/banner.txt new file mode 100644 index 0000000..4976e64 --- /dev/null +++ b/hbt-msds/hbt-msds-biz/target/classes/banner.txt @@ -0,0 +1,7 @@ +Spring Boot Version: ${spring-boot.version} +Spring Application Name: ${spring.application.name} + __ __ __ __ + / /_ / /_ / /_ ____ ___ _________/ /____ + / __ \/ __ \/ __/_____/ __ `__ \/ ___/ __ / ___/ + / / / / /_/ / /_/_____/ / / / / (__ ) /_/ (__ ) +/_/ /_/_.___/\__/ /_/ /_/ /_/____/\__,_/____/ \ No newline at end of file diff --git a/hbt-msds/hbt-msds-biz/target/classes/bootstrap-dev.yml b/hbt-msds/hbt-msds-biz/target/classes/bootstrap-dev.yml new file mode 100644 index 0000000..78a8fbc --- /dev/null +++ b/hbt-msds/hbt-msds-biz/target/classes/bootstrap-dev.yml @@ -0,0 +1,16 @@ +# Spring +spring: + cloud: + nacos: + username: nacos + password: zkhbt888 + discovery: + # 服务注册地址 + server-addr: ${nacos.ip}:8848 + config: + # 配置中心地址 + server-addr: ${nacos.ip}:8848 + # 配置文件格式 + file-extension: yml + # 共享配置 + shared-dataids: application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} diff --git a/hbt-msds/hbt-msds-biz/target/classes/bootstrap.yml b/hbt-msds/hbt-msds-biz/target/classes/bootstrap.yml new file mode 100644 index 0000000..33db7f8 --- /dev/null +++ b/hbt-msds/hbt-msds-biz/target/classes/bootstrap.yml @@ -0,0 +1,14 @@ +# Tomcat +server: + port: 9527 +# Spring +spring: + application: + # 应用名称 + name: hbt-msds + profiles: + # 环境配置 + active: dev + +nacos: + ip: 119.45.158.12 diff --git a/hbt-msds/hbt-msds-biz/target/classes/com/hbt/security/knowledge/base/msds/MsdsApplication.class b/hbt-msds/hbt-msds-biz/target/classes/com/hbt/security/knowledge/base/msds/MsdsApplication.class new file mode 100644 index 0000000..78f38f8 Binary files /dev/null and b/hbt-msds/hbt-msds-biz/target/classes/com/hbt/security/knowledge/base/msds/MsdsApplication.class differ diff --git a/hbt-msds/hbt-msds-biz/target/classes/com/hbt/security/knowledge/base/msds/controller/MsdsController.class b/hbt-msds/hbt-msds-biz/target/classes/com/hbt/security/knowledge/base/msds/controller/MsdsController.class new file mode 100644 index 0000000..3e0fbd4 Binary files /dev/null and b/hbt-msds/hbt-msds-biz/target/classes/com/hbt/security/knowledge/base/msds/controller/MsdsController.class differ diff --git a/hbt-msds/hbt-msds-biz/target/classes/com/hbt/security/knowledge/base/msds/dao/MsdsDao.class b/hbt-msds/hbt-msds-biz/target/classes/com/hbt/security/knowledge/base/msds/dao/MsdsDao.class new file mode 100644 index 0000000..15c28e4 Binary files /dev/null and b/hbt-msds/hbt-msds-biz/target/classes/com/hbt/security/knowledge/base/msds/dao/MsdsDao.class differ diff --git a/hbt-msds/hbt-msds-biz/target/classes/com/hbt/security/knowledge/base/msds/dao/impl/MsdsDaoImpl.class b/hbt-msds/hbt-msds-biz/target/classes/com/hbt/security/knowledge/base/msds/dao/impl/MsdsDaoImpl.class new file mode 100644 index 0000000..8cb148f Binary files /dev/null and b/hbt-msds/hbt-msds-biz/target/classes/com/hbt/security/knowledge/base/msds/dao/impl/MsdsDaoImpl.class differ diff --git a/hbt-msds/hbt-msds-biz/target/classes/com/hbt/security/knowledge/base/msds/mapper/MsdsMapper.class b/hbt-msds/hbt-msds-biz/target/classes/com/hbt/security/knowledge/base/msds/mapper/MsdsMapper.class new file mode 100644 index 0000000..5dd3af9 Binary files /dev/null and b/hbt-msds/hbt-msds-biz/target/classes/com/hbt/security/knowledge/base/msds/mapper/MsdsMapper.class differ diff --git a/hbt-msds/hbt-msds-biz/target/classes/com/hbt/security/knowledge/base/msds/service/IMsdsService.class b/hbt-msds/hbt-msds-biz/target/classes/com/hbt/security/knowledge/base/msds/service/IMsdsService.class new file mode 100644 index 0000000..18cd8aa Binary files /dev/null and b/hbt-msds/hbt-msds-biz/target/classes/com/hbt/security/knowledge/base/msds/service/IMsdsService.class differ diff --git a/hbt-msds/hbt-msds-biz/target/classes/com/hbt/security/knowledge/base/msds/service/impl/MsdsServiceImpl.class b/hbt-msds/hbt-msds-biz/target/classes/com/hbt/security/knowledge/base/msds/service/impl/MsdsServiceImpl.class new file mode 100644 index 0000000..736c644 Binary files /dev/null and b/hbt-msds/hbt-msds-biz/target/classes/com/hbt/security/knowledge/base/msds/service/impl/MsdsServiceImpl.class differ diff --git a/hbt-msds/hbt-msds-biz/target/classes/mapper/MsdsMapper.xml b/hbt-msds/hbt-msds-biz/target/classes/mapper/MsdsMapper.xml new file mode 100644 index 0000000..7af5085 --- /dev/null +++ b/hbt-msds/hbt-msds-biz/target/classes/mapper/MsdsMapper.xml @@ -0,0 +1,799 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + insert into msds ( + chemical_cn, + other_chemical_cn, + chemical_en, + other_chemical_en, + cas, + type, + detonator_profession1, + detonator_profession1_concentration, + detonator_profession1_CAS_No, + detonator_profession2, + detonator_profession2_concentration, + detonator_profession2_CAS_No, + detonator_profession3, + detonator_profession3_concentration, + detonator_profession3_CAS_No, + detonator_profession4, + detonator_profession4_concentration, + detonator_profession4_CAS_No, + detonator_profession5, + detonator_profession5_concentration, + detonator_profession5_CAS_No, + hazard_category, + Invasion_route, + health_hazards, + environmental_hazards, + explosion_hazard, + skin_contact, + eye_contact, + inhalation, + ingestion, + hazard_characteristics, + hazardous_combustion_products, + fire_extinguishing_method, + fire_fighting, + emergency_actions, + operational_considerations, + storage_precautions, + MAC, + PC_TWA, + PC_STEL, + TLV_C, + TLV_TWA, + TLV_STEL, + monitoring_methods, + engineering_control, + respiratory_protection, + eye_protection, + physical_protection, + hand_protection, + other_protection, + appearance_and_shape, + ph_value, + melting_point, + boiling_point, + relative_density, + relative_vapor_density, + saturated_vapor_pressure, + heat_of_combustion, + critical, + critical_pressure, + octanol_water_partition_coefficient, + flash_point, + Ignition_temperature, + lower_explosion_limit, + upper_explosion_limit, + solubility, + main_uses, + stability, + forbidden_mixtures, + avoid_contact_conditions, + aggregation_hazards, + decomposition_products, + nature_of_waste, + disposal_methods, + deprecation_considerations, + dangerous_goods_number, + un_number, + packaging_category, + packaging_logo, + packaging_method, + shipping_precautions, + regulatory_information, + critical_value) + values ( + #{msds.chemicalCn}, + #{msds.otherChemicalCn}, + #{msds.chemicalEn}, + #{msds.otherChemicalEn}, + #{msds.cas}, + #{msds.type}, + #{msds.detonatorProfession1}, + #{msds.detonatorProfession1Concentration}, + #{msds.detonatorProfession1CasNo}, + #{msds.detonatorProfession2}, + #{msds.detonatorProfession2Concentration}, + #{msds.detonatorProfession2CasNo}, + #{msds.detonatorProfession3}, + #{msds.detonatorProfession3Concentration}, + #{msds.detonatorProfession3CasNo}, + #{msds.detonatorProfession4}, + #{msds.detonatorProfession4Concentration}, + #{msds.detonatorProfession4CasNo}, + #{msds.detonatorProfession5}, + #{msds.detonatorProfession5Concentration}, + #{msds.detonatorProfession5CasNo}, + #{msds.hazardCategory}, + #{msds.invasionRoute}, + #{msds.healthHazards}, + #{msds.environmentalHazards}, + #{msds.explosionHazard}, + #{msds.skinContact}, + #{msds.eyeContact}, + #{msds.inhalation}, + #{msds.ingestion}, + #{msds.hazardCharacteristics}, + #{msds.hazardousCombustionProducts}, + #{msds.fireExtinguishingMethod}, + #{msds.fireFighting}, + #{msds.emergencyActions}, + #{msds.operationalConsiderations}, + #{msds.storagePrecautions}, + #{msds.mac}, + #{msds.pcTwa}, + #{msds.pcStel}, + #{msds.tlvC}, + #{msds.tlvTwa}, + #{msds.tlvStel}, + #{msds.monitoringMethods}, + #{msds.engineeringControl}, + #{msds.respiratoryProtection}, + #{msds.eyeProtection}, + #{msds.physicalProtection}, + #{msds.handProtection}, + #{msds.otherProtection}, + #{msds.appearanceAndShape}, + #{msds.phValue}, + #{msds.meltingPoint}, + #{msds.boilingPoint}, + #{msds.relativeDensity}, + #{msds.relativeVaporDensity}, + #{msds.saturatedVaporPressure}, + #{msds.heatOfCombustion}, + #{msds.critical}, + #{msds.criticalPressure}, + #{msds.octanolWaterPartitionCoefficient}, + #{msds.flashPoint}, + #{msds.ignitionTemperature}, + #{msds.lowerExplosionLimit}, + #{msds.upperExplosionLimit}, + #{msds.solubility}, + #{msds.mainUses}, + #{msds.stability}, + #{msds.forbiddenMixtures}, + #{msds.avoidContactConditions}, + #{msds.aggregationHazards}, + #{msds.decompositionProducts}, + #{msds.natureOfWaste}, + #{msds.disposalMethods}, + #{msds.deprecationConsiderations}, + #{msds.dangerousGoodsNumber}, + #{msds.unNumber}, + #{msds.packagingCategory}, + #{msds.packagingLogo}, + #{msds.packagingMethod}, + #{msds.shippingPrecautions}, + #{msds.regulatoryInformation}, + #{msds.criticalValue} + ) + + select LAST_INSERT_ID() + + + + + + insert into msds_material ( + msds, + acute_toxicity, + rats_oral_LD, + rats_percutaneous_LD, + rats_subcutaneous_LD, + rats_venous_LD, + rats_intraperitoneal_LD, + mice_oral_LD, + mice_percutaneous_LD, + mice_venous_LD, + mice_intraperitoneal_LD, + guinea_pigs_oral_LD, + guinea_pigs_percutaneous_LD, + guinea_pigs_subcutaneous_LD, + guinea_pigs_venous_LD, + guinea_pigs_intraperitoneal_LD, + rabbit_oral_LD, + rabbit_percutaneous_LD, + rabbit_subcutaneous_LD, + rabbit_venous_LD, + rabbit_intraperitoneal_LD, + other_animal_LD, + LD, + LDL0, + TDL0, + rats_inhale_LC, + rats_inhale_LCL0, + mice_inhale_LC, + mice_inhale_LCL0, + mice_inhale_TDL0, + people_inhale_LCL0, + people_inhale_TDL0, + IDLH, + other_animal_LC_50, + other_animal_LC_100, + other_animal_LCL0, + other_animal_TCL0, + rabbit_percutaneous, + rabbit_meridians, + rats_percutaneous, + rats_meridians, + guinea_pigs_percutaneous, + guinea_pigs_meridians, + men_percutaneous, + men_meridians, + human_percutaneous, + human_meridians, + subacute_versus_chronic_toxicity, + sensitization, + mutagenicity, + teratogenicity, + carcinogenicity, + other, + absolute_lethal_amount_LD, + half_lethal_dose_LD, + half_lethal_concentration_LC, + half_of_the_effect_concentration_EC, + half_of_the_inhibitory_concentration_IC, + no_action_dose_NOEL, + half_of_the_resistance_to_limited_amount_TLm, + bod5, + soil_half_life_high, + soil_half_life_low, + air_half_life_high, + air_half_life_low, + surface_water_half_life_high, + surface_water_half_life_low, + groundwater_half_life_high, + groundwater_half_life_low, + aqueous_biodegradation_aerobic_high, + aqueous_biodegradation_aerobic_low, + aqueous_biodegradation_anaerobics_high, + aqueous_biodegradation_anaerobics_low, + aqueous_biodegradation_secondary_sedimentation_treatment_high, + aqueous_biodegradation_secondary_sedimentation_treatment_low, + aqueous_photolysis_half_life_high, + aqueous_photolysis_half_life_low, + photolysis_maximal_light_absorption_high, + photolysis_maximal_light_absorption_low, + photooxidation_half_life_in_water_high, + photooxidation_half_life_in_water_low, + photooxidative_half_life_in_air_high, + photooxidative_half_life_in_air_low, + reduction_half_life_high, + reduction_half_life_low, + primary_hydrolysis_half_life, + hydrolysis_in_air_high, + hydrolysis_in_air_low, + cod, + bioconcentration_or_bioaccumulation, + other_harmful_effects + ) + values ( + #{material.msds}, + #{material.acute_toxicity}, + #{material.rats_oral_LD}, + #{material.rats_percutaneous_LD}, + #{material.rats_subcutaneous_LD}, + #{material.rats_venous_LD}, + #{material.rats_intraperitoneal_LD}, + #{material.mice_oral_LD}, + #{material.mice_percutaneous_LD}, + #{material.mice_venous_LD}, + #{material.mice_intraperitoneal_LD}, + #{material.guinea_pigs_oral_LD}, + #{material.guinea_pigs_percutaneous_LD}, + #{material.guinea_pigs_subcutaneous_LD}, + #{material.guinea_pigs_venous_LD}, + #{material.guinea_pigs_intraperitoneal_LD}, + #{material.rabbit_oral_LD}, + #{material.rabbit_percutaneous_LD}, + #{material.rabbit_subcutaneous_LD}, + #{material.rabbit_venous_LD}, + #{material.rabbit_intraperitoneal_LD}, + #{material.other_animal_LD}, + #{material.LD}, + #{material.LDL0}, + #{material.TDL0}, + #{material.rats_inhale_LC}, + #{material.rats_inhale_LCL0}, + #{material.mice_inhale_LC}, + #{material.mice_inhale_LCL0}, + #{material.mice_inhale_TDL0}, + #{material.people_inhale_LCL0}, + #{material.people_inhale_TDL0}, + #{material.IDLH}, + #{material.other_animal_LC_50}, + #{material.other_animal_LC_100}, + #{material.other_animal_LCL0}, + #{material.other_animal_TCL0}, + #{material.rabbit_percutaneous}, + #{material.rabbit_meridians}, + #{material.rats_percutaneous}, + #{material.rats_meridians}, + #{material.guinea_pigs_percutaneous}, + #{material.guinea_pigs_meridians}, + #{material.men_percutaneous}, + #{material.men_meridians}, + #{material.human_percutaneous}, + #{material.human_meridians}, + #{material.subacute_versus_chronic_toxicity}, + #{material.sensitization}, + #{material.mutagenicity}, + #{material.teratogenicity}, + #{material.carcinogenicity}, + #{material.other}, + #{material.absolute_lethal_amount_LD}, + #{material.half_lethal_dose_LD}, + #{material.half_lethal_concentration_LC}, + #{material.half_of_the_effect_concentration_EC}, + #{material.half_of_the_inhibitory_concentration_IC}, + #{material.no_action_dose_NOEL}, + #{material.half_of_the_resistance_to_limited_amount_TLm}, + #{material.bod5}, + #{material.soil_half_life_high}, + #{material.soil_half_life_low}, + #{material.air_half_life_high}, + #{material.air_half_life_low}, + #{material.surface_water_half_life_high}, + #{material.surface_water_half_life_low}, + #{material.groundwater_half_life_high}, + #{material.groundwater_half_life_low}, + #{material.aqueous_biodegradation_aerobic_high}, + #{material.aqueous_biodegradation_aerobic_low}, + #{material.aqueous_biodegradation_anaerobics_high}, + #{material.aqueous_biodegradation_anaerobics_low}, + #{material.aqueous_biodegradation_secondary_sedimentation_treatment_high}, + #{material.aqueous_biodegradation_secondary_sedimentation_treatment_low}, + #{material.aqueous_photolysis_half_life_high}, + #{material.aqueous_photolysis_half_life_low}, + #{material.photolysis_maximal_light_absorption_high}, + #{material.photolysis_maximal_light_absorption_low}, + #{material.photooxidation_half_life_in_water_high}, + #{material.photooxidation_half_life_in_water_low}, + #{material.photooxidative_half_life_in_air_high}, + #{material.photooxidative_half_life_in_air_low}, + #{material.reduction_half_life_high}, + #{material.reduction_half_life_low}, + #{material.primary_hydrolysis_half_life}, + #{material.hydrolysis_in_air_high}, + #{material.hydrolysis_in_air_low}, + #{material.cod}, + #{material.bioconcentration_or_bioaccumulation}, + #{material.other_harmful_effects} + ) + + + + update msds_material + set + acute_toxicity = #{material.acute_toxicity}, + rats_oral_LD = #{material.rats_oral_LD}, + rats_percutaneous_LD = #{material.rats_percutaneous_LD}, + rats_subcutaneous_LD = #{material.rats_subcutaneous_LD}, + rats_venous_LD = #{material.rats_venous_LD}, + rats_intraperitoneal_LD = #{material.rats_intraperitoneal_LD}, + mice_oral_LD = #{material.mice_oral_LD}, + mice_percutaneous_LD = #{material.mice_percutaneous_LD}, + mice_venous_LD = #{material.mice_venous_LD}, + mice_intraperitoneal_LD = #{material.mice_intraperitoneal_LD}, + guinea_pigs_oral_LD = #{material.guinea_pigs_oral_LD}, + guinea_pigs_percutaneous_LD = #{material.guinea_pigs_percutaneous_LD}, + guinea_pigs_subcutaneous_LD = #{material.guinea_pigs_subcutaneous_LD}, + guinea_pigs_venous_LD = #{material.guinea_pigs_venous_LD}, + guinea_pigs_intraperitoneal_LD = #{material.guinea_pigs_intraperitoneal_LD}, + rabbit_oral_LD = #{material.rabbit_oral_LD}, + rabbit_percutaneous_LD = #{material.rabbit_percutaneous_LD}, + rabbit_subcutaneous_LD = #{material.rabbit_subcutaneous_LD}, + rabbit_venous_LD = #{material.rabbit_venous_LD}, + rabbit_intraperitoneal_LD = #{material.rabbit_intraperitoneal_LD}, + other_animal_LD = #{material.other_animal_LD}, + LD = #{material.LD}, + LDL0 = #{material.LDL0}, + TDL0 = #{material.TDL0}, + rats_inhale_LC = #{material.rats_inhale_LC}, + rats_inhale_LCL0 = #{material.rats_inhale_LCL0}, + mice_inhale_LC = #{material.mice_inhale_LC}, + mice_inhale_LCL0 = #{material.mice_inhale_LCL0}, + mice_inhale_TDL0 = #{material.mice_inhale_TDL0}, + people_inhale_LCL0 = #{material.people_inhale_LCL0}, + people_inhale_TDL0 = #{material.people_inhale_TDL0}, + IDLH = #{material.IDLH}, + other_animal_LC_50 = #{material.other_animal_LC_50}, + other_animal_LC_100 = #{material.other_animal_LC_100}, + other_animal_LCL0 = #{material.other_animal_LCL0}, + other_animal_TCL0 = #{material.other_animal_TCL0}, + rabbit_percutaneous = #{material.rabbit_percutaneous}, + rabbit_meridians = #{material.rabbit_meridians}, + rats_percutaneous = #{material.rats_percutaneous}, + rats_meridians = #{material.rats_meridians}, + guinea_pigs_percutaneous = #{material.guinea_pigs_percutaneous}, + guinea_pigs_meridians = #{material.guinea_pigs_meridians}, + men_percutaneous = #{material.men_percutaneous}, + men_meridians = #{material.men_meridians}, + human_percutaneous = #{material.human_percutaneous}, + human_meridians = #{material.human_meridians}, + subacute_versus_chronic_toxicity = #{material.subacute_versus_chronic_toxicity}, + sensitization = #{material.sensitization}, + mutagenicity = #{material.mutagenicity}, + teratogenicity = #{material.teratogenicity}, + carcinogenicity = #{material.carcinogenicity}, + other = #{material.other}, + absolute_lethal_amount_LD = #{material.absolute_lethal_amount_LD}, + half_lethal_dose_LD = #{material.half_lethal_dose_LD}, + half_lethal_concentration_LC = #{material.half_lethal_concentration_LC}, + half_of_the_effect_concentration_EC = #{material.half_of_the_effect_concentration_EC}, + half_of_the_inhibitory_concentration_IC = #{material.half_of_the_inhibitory_concentration_IC}, + no_action_dose_NOEL = #{material.no_action_dose_NOEL}, + half_of_the_resistance_to_limited_amount_TLm = #{material.half_of_the_resistance_to_limited_amount_TLm}, + bod5 = #{material.bod5}, + soil_half_life_high = #{material.soil_half_life_high}, + soil_half_life_low = #{material.soil_half_life_low}, + air_half_life_high = #{material.air_half_life_high}, + air_half_life_low = #{material.air_half_life_low}, + surface_water_half_life_high = #{material.surface_water_half_life_high}, + surface_water_half_life_low = #{material.surface_water_half_life_low}, + groundwater_half_life_high = #{material.groundwater_half_life_high}, + groundwater_half_life_low = #{material.groundwater_half_life_low}, + aqueous_biodegradation_aerobic_high = #{material.aqueous_biodegradation_aerobic_high}, + aqueous_biodegradation_aerobic_low = #{material.aqueous_biodegradation_aerobic_low}, + aqueous_biodegradation_anaerobics_high = #{material.aqueous_biodegradation_anaerobics_high}, + aqueous_biodegradation_anaerobics_low = #{material.aqueous_biodegradation_anaerobics_low}, + aqueous_biodegradation_secondary_sedimentation_treatment_high = #{material.aqueous_biodegradation_secondary_sedimentation_treatment_high}, + aqueous_biodegradation_secondary_sedimentation_treatment_low = #{material.aqueous_biodegradation_secondary_sedimentation_treatment_low}, + aqueous_photolysis_half_life_high = #{material.aqueous_photolysis_half_life_high}, + aqueous_photolysis_half_life_low = #{material.aqueous_photolysis_half_life_low}, + photolysis_maximal_light_absorption_high = #{material.photolysis_maximal_light_absorption_high}, + photolysis_maximal_light_absorption_low = #{material.photolysis_maximal_light_absorption_low}, + photooxidation_half_life_in_water_high = #{material.photooxidation_half_life_in_water_high}, + photooxidation_half_life_in_water_low = #{material.photooxidation_half_life_in_water_low}, + photooxidative_half_life_in_air_high = #{material.photooxidative_half_life_in_air_high}, + photooxidative_half_life_in_air_low = #{material.photooxidative_half_life_in_air_low}, + reduction_half_life_high = #{material.reduction_half_life_high}, + reduction_half_life_low = #{material.reduction_half_life_low}, + primary_hydrolysis_half_life = #{material.primary_hydrolysis_half_life}, + hydrolysis_in_air_high = #{material.hydrolysis_in_air_high}, + hydrolysis_in_air_low = #{material.hydrolysis_in_air_low}, + cod = #{material.cod}, + bioconcentration_or_bioaccumulation = #{material.bioconcentration_or_bioaccumulation}, + other_harmful_effects = #{material.other_harmful_effects} + where msds = #{material.msds} + + + + update msds + set + chemical_cn = #{msds.chemicalCn}, + other_chemical_cn = #{msds.otherChemicalCn}, + chemical_en = #{msds.chemicalEn}, + other_chemical_en = #{msds.otherChemicalEn}, + cas = #{msds.cas}, + type = #{msds.type}, + detonator_profession1 = #{msds.detonatorProfession1}, + detonator_profession1_concentration = #{msds.detonatorProfession1Concentration}, + detonator_profession1_CAS_No = #{msds.detonatorProfession1CasNo}, + detonator_profession2 = #{msds.detonatorProfession2}, + detonator_profession2_concentration = #{msds.detonatorProfession2Concentration}, + detonator_profession2_CAS_No = #{msds.detonatorProfession2CasNo}, + detonator_profession3 = #{msds.detonatorProfession3}, + detonator_profession3_concentration = #{msds.detonatorProfession3Concentration}, + detonator_profession3_CAS_No = #{msds.detonatorProfession3CasNo}, + detonator_profession4 = #{msds.detonatorProfession4}, + detonator_profession4_concentration = #{msds.detonatorProfession4Concentration}, + detonator_profession4_CAS_No = #{msds.detonatorProfession4CasNo}, + detonator_profession5 = #{msds.detonatorProfession5}, + detonator_profession5_concentration = #{msds.detonatorProfession5Concentration}, + detonator_profession5_CAS_No = #{msds.detonatorProfession5CasNo}, + hazard_category = #{msds.hazardCategory}, + Invasion_route = #{msds.invasionRoute}, + health_hazards = #{msds.healthHazards}, + environmental_hazards = #{msds.environmentalHazards}, + explosion_hazard = #{msds.explosionHazard}, + skin_contact = #{msds.skinContact}, + eye_contact = #{msds.eyeContact}, + inhalation = #{msds.inhalation}, + ingestion = #{msds.ingestion}, + hazard_characteristics = #{msds.hazardCharacteristics}, + hazardous_combustion_products = #{msds.hazardousCombustionProducts}, + fire_extinguishing_method = #{msds.fireExtinguishingMethod}, + fire_fighting = #{msds.fireFighting}, + emergency_actions = #{msds.emergencyActions}, + operational_considerations = #{msds.operationalConsiderations}, + storage_precautions = #{msds.storagePrecautions}, + MAC = #{msds.mac}, + PC_TWA = #{msds.pcTwa}, + PC_STEL = #{msds.pcStel}, + TLV_C = #{msds.tlvC}, + TLV_TWA = #{msds.tlvTwa}, + TLV_STEL = #{msds.tlvStel}, + monitoring_methods = #{msds.monitoringMethods}, + engineering_control = #{msds.engineeringControl}, + respiratory_protection = #{msds.respiratoryProtection}, + eye_protection = #{msds.eyeProtection}, + physical_protection = #{msds.physicalProtection}, + hand_protection = #{msds.handProtection}, + other_protection = #{msds.otherProtection}, + appearance_and_shape = #{msds.appearanceAndShape}, + ph_value = #{msds.phValue}, + melting_point = #{msds.meltingPoint}, + boiling_point = #{msds.boilingPoint}, + relative_density = #{msds.relativeDensity}, + relative_vapor_density = #{msds.relativeVaporDensity}, + saturated_vapor_pressure = #{msds.saturatedVaporPressure}, + heat_of_combustion = #{msds.heatOfCombustion}, + critical = #{msds.critical}, + critical_pressure = #{msds.criticalPressure}, + octanol_water_partition_coefficient = #{msds.octanolWaterPartitionCoefficient}, + flash_point = #{msds.flashPoint}, + Ignition_temperature = #{msds.ignitionTemperature}, + lower_explosion_limit = #{msds.lowerExplosionLimit}, + upper_explosion_limit = #{msds.upperExplosionLimit}, + solubility = #{msds.solubility}, + main_uses = #{msds.mainUses}, + stability = #{msds.stability}, + forbidden_mixtures = #{msds.forbiddenMixtures}, + avoid_contact_conditions = #{msds.avoidContactConditions}, + aggregation_hazards = #{msds.aggregationHazards}, + decomposition_products = #{msds.decompositionProducts}, + nature_of_waste = #{msds.natureOfWaste}, + disposal_methods = #{msds.disposalMethods}, + deprecation_considerations = #{msds.deprecationConsiderations}, + dangerous_goods_number = #{msds.dangerousGoodsNumber}, + un_number = #{msds.unNumber}, + packaging_category = #{msds.packagingCategory}, + packaging_logo = #{msds.packagingLogo}, + packaging_method = #{msds.packagingMethod}, + shipping_precautions = #{msds.shippingPrecautions}, + regulatory_information = #{msds.regulatoryInformation}, + critical_value = #{msds.criticalValue} + where id = #{msds.id} + + + + delete from msds where id = #{id} + + + + delete from msds_material where msds = #{id} + + + + insert into msds_material( id, msds, acute_toxicity, rats_oral_LD, rats_percutaneous_LD, rats_subcutaneous_LD, rats_venous_LD, rats_intraperitoneal_LD, mice_oral_LD, mice_percutaneous_LD, mice_venous_LD, mice_intraperitoneal_LD, guinea_pigs_oral_LD, guinea_pigs_percutaneous_LD, guinea_pigs_subcutaneous_LD, guinea_pigs_venous_LD, guinea_pigs_intraperitoneal_LD, rabbit_oral_LD, rabbit_percutaneous_LD, rabbit_subcutaneous_LD, rabbit_venous_LD, rabbit_intraperitoneal_LD, other_animal_LD, LD, LDL0, TDL0, rats_inhale_LC, rats_inhale_LCL0, mice_inhale_LC, mice_inhale_LCL0, mice_inhale_TDL0, people_inhale_LCL0, people_inhale_TDL0, IDLH, other_animal_LC_50, other_animal_LC_100, other_animal_LCL0, other_animal_TCL0, rabbit_percutaneous, rabbit_meridians, rats_percutaneous, rats_meridians, guinea_pigs_percutaneous, guinea_pigs_meridians, men_percutaneous, men_meridians, human_percutaneous, human_meridians, subacute_versus_chronic_toxicity, sensitization, mutagenicity, teratogenicity, carcinogenicity, other, absolute_lethal_amount_LD, half_lethal_dose_LD, half_lethal_concentration_LC, half_of_the_effect_concentration_EC, half_of_the_inhibitory_concentration_IC, no_action_dose_NOEL, half_of_the_resistance_to_limited_amount_TLm, bod5, soil_half_life_high, soil_half_life_low, air_half_life_high, air_half_life_low, surface_water_half_life_high, surface_water_half_life_low, groundwater_half_life_high, groundwater_half_life_low, aqueous_biodegradation_aerobic_high, aqueous_biodegradation_aerobic_low, aqueous_biodegradation_anaerobics_high, aqueous_biodegradation_anaerobics_low, aqueous_biodegradation_secondary_sedimentation_treatment_high, aqueous_biodegradation_secondary_sedimentation_treatment_low, aqueous_photolysis_half_life_high, aqueous_photolysis_half_life_low, photolysis_maximal_light_absorption_high, photolysis_maximal_light_absorption_low, photooxidation_half_life_in_water_high, photooxidation_half_life_in_water_low, photooxidative_half_life_in_air_high, photooxidative_half_life_in_air_low, reduction_half_life_high, reduction_half_life_low, primary_hydrolysis_half_life, hydrolysis_in_air_high, hydrolysis_in_air_low, cod, bioconcentration_or_bioaccumulation, other_harmful_effects) values + + ( #{item.id}, #{item.msds}, #{item.acuteToxicity}, #{item.ratsOralLd}, #{item.ratsPercutaneousLd}, #{item.ratsSubcutaneousLd}, #{item.ratsVenousLd}, #{item.ratsIntraperitonealLd}, #{item.miceOralLd}, #{item.micePercutaneousLd}, #{item.miceVenousLd}, #{item.miceIntraperitonealLd}, #{item.guineaPigsOralLd}, #{item.guineaPigsPercutaneousLd}, #{item.guineaPigsSubcutaneousLd}, #{item.guineaPigsVenousLd}, #{item.guineaPigsIntraperitonealLd}, #{item.rabbitOralLd}, #{item.rabbitPercutaneousLd}, #{item.rabbitSubcutaneousLd}, #{item.rabbitVenousLd}, #{item.rabbitIntraperitonealLd}, #{item.otherAnimalLd}, #{item.ld}, #{item.ldl0}, #{item.tdl0}, #{item.ratsInhaleLc}, #{item.ratsInhaleLcl0}, #{item.miceInhaleLc}, #{item.miceInhaleLcl0}, #{item.miceInhaleTdl0}, #{item.peopleInhaleLcl0}, #{item.peopleInhaleTdl0}, #{item.idlh}, #{item.otherAnimalLc50}, #{item.otherAnimalLc100}, #{item.otherAnimalLcl0}, #{item.otherAnimalTcl0}, #{item.rabbitPercutaneous}, #{item.rabbitMeridians}, #{item.ratsPercutaneous}, #{item.ratsMeridians}, #{item.guineaPigsPercutaneous}, #{item.guineaPigsMeridians}, #{item.menPercutaneous}, #{item.menMeridians}, #{item.humanPercutaneous}, #{item.humanMeridians}, #{item.subacuteVersusChronicToxicity}, #{item.sensitization}, #{item.mutagenicity}, #{item.teratogenicity}, #{item.carcinogenicity}, #{item.other}, #{item.absoluteLethalAmountLd}, #{item.halfLethalDoseLd}, #{item.halfLethalConcentrationLc}, #{item.halfOfTheEffectConcentrationEc}, #{item.halfOfTheInhibitoryConcentrationIc}, #{item.noActionDoseNoel}, #{item.halfOfTheResistanceToLimitedAmountTlm}, #{item.bod5}, #{item.soilHalfLifeHigh}, #{item.soilHalfLifeLow}, #{item.airHalfLifeHigh}, #{item.airHalfLifeLow}, #{item.surfaceWaterHalfLifeHigh}, #{item.surfaceWaterHalfLifeLow}, #{item.groundwaterHalfLifeHigh}, #{item.groundwaterHalfLifeLow}, #{item.aqueousBiodegradationAerobicHigh}, #{item.aqueousBiodegradationAerobicLow}, #{item.aqueousBiodegradationAnaerobicsHigh}, #{item.aqueousBiodegradationAnaerobicsLow}, #{item.aqueousBiodegradationSecondarySedimentationTreatmentHigh}, #{item.aqueousBiodegradationSecondarySedimentationTreatmentLow}, #{item.aqueousPhotolysisHalfLifeHigh}, #{item.aqueousPhotolysisHalfLifeLow}, #{item.photolysisMaximalLightAbsorptionHigh}, #{item.photolysisMaximalLightAbsorptionLow}, #{item.photooxidationHalfLifeInWaterHigh}, #{item.photooxidationHalfLifeInWaterLow}, #{item.photooxidativeHalfLifeInAirHigh}, #{item.photooxidativeHalfLifeInAirLow}, #{item.reductionHalfLifeHigh}, #{item.reductionHalfLifeLow}, #{item.primaryHydrolysisHalfLife}, #{item.hydrolysisInAirHigh}, #{item.hydrolysisInAirLow}, #{item.cod}, #{item.bioconcentrationOrBioaccumulation}, #{item.otherHarmfulEffects}) + + + \ No newline at end of file diff --git a/hbt-msds/hbt-msds-biz/target/hbt-msds-biz.jar b/hbt-msds/hbt-msds-biz/target/hbt-msds-biz.jar new file mode 100644 index 0000000..ea83f40 Binary files /dev/null and b/hbt-msds/hbt-msds-biz/target/hbt-msds-biz.jar differ diff --git a/hbt-msds/hbt-msds-biz/target/hbt-msds-biz.jar.original b/hbt-msds/hbt-msds-biz/target/hbt-msds-biz.jar.original new file mode 100644 index 0000000..e6122d5 Binary files /dev/null and b/hbt-msds/hbt-msds-biz/target/hbt-msds-biz.jar.original differ diff --git a/hbt-msds/hbt-msds-biz/target/maven-archiver/pom.properties b/hbt-msds/hbt-msds-biz/target/maven-archiver/pom.properties new file mode 100644 index 0000000..448058c --- /dev/null +++ b/hbt-msds/hbt-msds-biz/target/maven-archiver/pom.properties @@ -0,0 +1,5 @@ +#Generated by Maven +#Thu Feb 16 14:30:04 CST 2023 +version=1.0-SNAPSHOT +groupId=com.hbt +artifactId=hbt-msds-biz diff --git a/hbt-msds/hbt-msds-biz/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst b/hbt-msds/hbt-msds-biz/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst new file mode 100644 index 0000000..10a3c07 --- /dev/null +++ b/hbt-msds/hbt-msds-biz/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst @@ -0,0 +1,7 @@ +com\hbt\security\knowledge\base\msds\dao\MsdsDao.class +com\hbt\security\knowledge\base\msds\dao\impl\MsdsDaoImpl.class +com\hbt\security\knowledge\base\msds\MsdsApplication.class +com\hbt\security\knowledge\base\msds\service\impl\MsdsServiceImpl.class +com\hbt\security\knowledge\base\msds\controller\MsdsController.class +com\hbt\security\knowledge\base\msds\mapper\MsdsMapper.class +com\hbt\security\knowledge\base\msds\service\IMsdsService.class diff --git a/hbt-msds/hbt-msds-biz/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst b/hbt-msds/hbt-msds-biz/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst new file mode 100644 index 0000000..964eff9 --- /dev/null +++ b/hbt-msds/hbt-msds-biz/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst @@ -0,0 +1,7 @@ +D:\hbtcode1\security-knowledge-base\hbt-msds\hbt-msds-biz\src\main\java\com\hbt\security\knowledge\base\msds\dao\impl\MsdsDaoImpl.java +D:\hbtcode1\security-knowledge-base\hbt-msds\hbt-msds-biz\src\main\java\com\hbt\security\knowledge\base\msds\service\IMsdsService.java +D:\hbtcode1\security-knowledge-base\hbt-msds\hbt-msds-biz\src\main\java\com\hbt\security\knowledge\base\msds\controller\MsdsController.java +D:\hbtcode1\security-knowledge-base\hbt-msds\hbt-msds-biz\src\main\java\com\hbt\security\knowledge\base\msds\dao\MsdsDao.java +D:\hbtcode1\security-knowledge-base\hbt-msds\hbt-msds-biz\src\main\java\com\hbt\security\knowledge\base\msds\mapper\MsdsMapper.java +D:\hbtcode1\security-knowledge-base\hbt-msds\hbt-msds-biz\src\main\java\com\hbt\security\knowledge\base\msds\MsdsApplication.java +D:\hbtcode1\security-knowledge-base\hbt-msds\hbt-msds-biz\src\main\java\com\hbt\security\knowledge\base\msds\service\impl\MsdsServiceImpl.java diff --git a/hbt-msds/hbt-msds-biz/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst b/hbt-msds/hbt-msds-biz/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst new file mode 100644 index 0000000..e69de29 diff --git a/hbt-msds/pom.xml b/hbt-msds/pom.xml index f984d0a..cb61830 100644 --- a/hbt-msds/pom.xml +++ b/hbt-msds/pom.xml @@ -1,100 +1,23 @@ - - security-knowledge-base com.hbt + security-knowledge-base 1.0-SNAPSHOT 4.0.0 + + hbt-msds-api + hbt-msds-biz + + hbt-msds + pom - - - - com.alibaba.cloud - spring-cloud-starter-alibaba-nacos-discovery - - - - com.alibaba.cloud - spring-cloud-starter-alibaba-nacos-config - - - - com.alibaba.cloud - spring-cloud-starter-alibaba-sentinel - - - - org.springframework.boot - spring-boot-starter-actuator - - - - com.hbt - hbt-common-security - + + hbt-common通用模块 + - - org.springframework.boot - spring-boot-configuration-processor - true - - - - - com.hbt - hbt-common-datasource - - - - - com.hbt - hbt-common-swagger - - - - com.hbt - hbt-common-log - - - - io.springfox - springfox-swagger-ui - ${swagger.fox.version} - - - - - mysql - mysql-connector-java - - - org.springframework.boot - spring-boot-starter-test - test - - - org.projectlombok - lombok - - - - - - org.springframework.boot - spring-boot-maven-plugin - - - - repackage - - - - - - - \ No newline at end of file + diff --git a/pom.xml b/pom.xml index 1744ee3..7d9abe6 100644 --- a/pom.xml +++ b/pom.xml @@ -11,6 +11,7 @@ hbt-msds + pom