补充logbacktest配置,application-test配置
| | |
| | | |
| | | @Override |
| | | public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { |
| | | //return true; |
| | | |
| | | LicenseVerify licenseVerify = new LicenseVerify(); |
| | | //æ ¡éªè¯ä¹¦æ¯å¦ææ |
| | | boolean verifyResult = licenseVerify.verify(); |
| | |
| | | import com.qianwen.smartman.modules.smis.vo.WorkstationDatapointsSubmitVO; |
| | | import com.qianwen.smartman.modules.smis.vo.WorkstationDatapointsVO; |
| | | |
| | | import cn.hutool.core.util.ObjectUtil; |
| | | |
| | | @Service |
| | | public class WorkstationDatapointsService extends BaseServiceImpl<WorkstationDatapointsMapper, WorkstationDatapoints> { |
| | | private Logger log = LoggerFactory.getLogger(this.getClass()); |
| | |
| | | @Transactional |
| | | public void submit(WorkstationDatapointsSubmitVO dpVO) { |
| | | |
| | | |
| | | if(ObjectUtil.isEmpty(dpVO.getAppId())) { |
| | | throw new ServiceException("åºç¨IDä¸è½ä¸ºç©º"); |
| | | } |
| | | Workstation usingWorkstation = appIdUsingWorkstation(dpVO.getAppId(),dpVO.getWorkstationId()); |
| | | if(usingWorkstation != null) { |
| | | //appIdè¢«ä½¿ç¨ |
| | |
| | | return dpVO; |
| | | } |
| | | |
| | | /** |
| | | * å é¤å·¥ä½çééæ°æ®ç¹ä½é
ç½® |
| | | * @param workstationId |
| | | */ |
| | | public void removeByWorkstation(List<Long> workstationIds) { |
| | | log.info("å é¤å·¥ä½æ°æ®ç¹é
ç½®ï¼workstationIds",workstationIds); |
| | | baseMapper.delete(Wrappers.<WorkstationDatapoints>lambdaQuery().in(WorkstationDatapoints::getWorkstationId, workstationIds)); |
| | | } |
| | | } |
| | |
| | | private WorkstationDatapointsService wsDpService; |
| | | @Autowired |
| | | private LicenseWrapper licenseWrapper; |
| | | @Autowired |
| | | private WorkstationDatapointsService dataPointService; |
| | | |
| | | private final String NAME = "é»è®¤å·¥ä½å°"; |
| | | private final Integer SORT = 1; |
| | |
| | | } |
| | | return workstationVO; |
| | | } |
| | | |
| | | /** |
| | | * éªè¯è®¸å¯ä¸é
ç½®çè®¾å¤æ°é |
| | | */ |
| | | void checkLicenseCount() { |
| | | |
| | | |
| | | Wrapper<Workstation> wrapper = Wrappers.lambdaQuery(Workstation.class).eq(Workstation::getIsDeleted, 0); |
| | | Long count = workstationMapper.selectCount(wrapper); |
| | | |
| | |
| | | this.workstationWcsService.deleteByWorkstationIdList(workstationIds); |
| | | this.workstationOfMachineService.remove(Wrappers.<WorkstationOfMachine>lambdaQuery().in(WorkstationOfMachine::getWorkstationId, workstationIds)); |
| | | this.commonGroupOfItemService.remove(Wrappers.<CommonGroupOfItem>lambdaQuery().in(CommonGroupOfItem::getItemId, workstationIds)); |
| | | |
| | | //20250324æ°å¢ï¼å é¤å·¥ä½å¯¹åºçæ°æ®ç¹ä½é
ç½®ã |
| | | dataPointService.removeByWorkstation(workstationIds); |
| | | /* |
| | | this.workstationOfMachineService.remove((Wrapper) Wrappers.lambdaQuery().in((v0) -> { |
| | | return v0.getWorkstationId(); |
| | |
| | | return String.valueOf(item.getId()); |
| | | }).collect(Collectors.toList())); |
| | | } |
| | | List<WorkstationVO> workstationVOS = this.workstationMapper.listPage(workStationGroupIdList, workstationVOIPage, keyWord, groupId, CommonGroupConstant.ALL_WORKSTATION_ID, status == null ? CommonConstant.ENABLE : status, type, Integer.valueOf(LocalDate.now().getYear())); |
| | | List<WorkstationVO> workstationVOS = this.workstationMapper.listPage(workStationGroupIdList, workstationVOIPage, keyWord, groupId, CommonGroupConstant.ALL_WORKSTATION_ID, status == null ? CommonConstant.ENABLE : status, type, LocalDate.now().getYear()); |
| | | workstationVOS.forEach(workstationVO -> { |
| | | String calendarName = workstationVO.getCalendarName(); |
| | | if (Func.isBlank(calendarName)) { |
| | |
| | | # redis |
| | | redis: |
| | | host: localhost |
| | | host: 120.46.212.231 |
| | | port: 6379 |
| | | password: root |
| | | database: 11 |
| | |
| | | # database config |
| | | datasource: |
| | | type: mysql |
| | | url: localhost |
| | | url: 120.46.212.231 |
| | | port: 3306 |
| | | #æ°æ®åºå
å¦ææ²¡æè¡¨ï¼ä¼å¼åè¿å
¥åå§åçé¢ |
| | | database: smart_man |
| | | username: root |
| | | database: smartman |
| | | username: qwmdc |
| | | password: Kknd_1234 |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | #datasource: |
| | |
| | | enabled: true |
| | | domain: http://127.0.0.1:1888 |
| | | |
| | | # rocketmq |
| | | rocketmq-name-server: localhost:9876 |
| | | |
| | | # tdengine |
| | | tdengine: |
| | | driver: com.taosdata.jdbc.rs.RestfulDriver |
| | | #url: jdbc:TAOS-RS://192.168.1.41:6041/iot_data?charset=UTF-8&locale=en_US.UTF-8&timezone=UTC-8 |
| | | url: jdbc:TAOS-RS://localhost:6041/iot_data?charset=UTF-8&locale=en_US.UTF-8&timezone=UTC-8 |
| | | username: root |
| | | password: taosdata |
| | | |
| | | iotdb: |
| | | driver: org.apache.iotdb.jdbc.IoTDBDriver |
| | | host: localhost |
| | |
| | | username: root |
| | | password: root |
| | | |
| | | mqtt: |
| | | host: tcp://82.156.1.83:1884 |
| | | #username=admin #MQTT-æå¡ç«¯ç¨æ·å |
| | | #password=public #MQTT-æå¡ç«¯å¯ç |
| | | cleansession: false #MQTT-æ¯å¦æ¸
çsession |
| | | #MQTT-å½å客æ·ç«¯çå¯ä¸æ è¯ |
| | | clientid: mqtt_publish |
| | | default_topic: TEST #å½å客æ·ç«¯çé»è®¤ä¸»é¢(大夿°æ¶å没ä»ä¹ç¨) |
| | | #åéè¶
æ¶æ¶é´ |
| | | timeout: 3000 |
| | | #å¿è·³æ¶é´ |
| | | keepalive: 10 |
| | | connectionTimeout: 3000 #è¿æ¥è¶
æ¶æ¶é´ |
| | | isRecevieMsg: false |
| | | xxl: |
| | | job: |
| | | admin: |
| | | ### xxl-job admin address list, such as "http://address" or "http://address01,http://address02" |
| | | addresses: http://192.168.1.40:31137/xxl-job-admin |
| | | addresses: http://localhost:8080/xxl-job-admin |
| | | ### xxl-job executor address |
| | | executor: |
| | | appname: phoenix |
| | | appname: smartman |
| | | ip: |
| | | # é¨ç½²39ï¼ä¸´æ¶è°æ´ 7017 -> 7117 |
| | | port: 7079 |
| | | port: 7089 |
| | | ### xxl-job log path |
| | | logpath: /data/applogs/xxl-job/jobhandler |
| | | ### xxl-job log retention days |
| | |
| | | license: |
| | | subject: user #ä¸»ä½ - 注æä¸»ä½è¦ä¸çæè¯ä¹¦ç主ä½ä¸è´ä¸è´ï¼ä¸ç¶éªè¯éè¿ä¸äº |
| | | publicAlias: publiccert #å
¬é¥å«ç§° |
| | | storePass: a1b2c3 #访é®å
¬é¥åºçå¯ç |
| | | licensePath: D:\lictest\ctest.lic #licenseä½ç½® |
| | | publicKeysStorePath: D:\lictest\publicCerts.store #å
¬é¥ä½ç½® |
| | | storePass: a1b2c3z4 #访é®å
¬é¥åºçå¯ç |
| | | licensePath: D:\certs\hwserver\mdc.lic #licenseä½ç½® |
| | | publicKeysStorePath: D:\certs\hwserver\publicCerts.store #å
¬é¥ä½ç½® |
| | | forest: |
| | | bean-id: config0 # å¨springä¸ä¸æä¸beançid, é»è®¤å¼ä¸ºforestConfiguration |
| | | backend: okhttp3 # å端HTTP APIï¼ okhttp3 ãæ¯æ`okhttp3`/`httpclient`ã |
¶Ô±ÈÐÂÎļþ |
| | |
| | | [{"prop":"dpUnit","label":"åä½"},{"prop":"access","isRequired":true,"sendCode":1,"label":"æé","describe":"读åæé\\n RO(åªè¯»)ï¼åªå
许读åç¹ä½æ°æ®ã\\nRW(读/å)ï¼æ¢è½è¯»åæ°æ®ä¹è½åå
¥æ°æ®ã","default":"RO","type":"option","options":["RO","RW"]},{"prop":"pollingInterval","isRequired":true,"label":"轮询é´éï¼msï¼","describe":"轮询é´éï¼msï¼","default":1000},{"prop":"keepOriginalValue","isRequired":true,"sendCode":1,"label":"ä¿çåå§å¼","describe":"ä¿çåå§å¼","default":true,"type":"boolean"},{"prop":"isSave","isRequired":true,"sendCode":1,"label":"æ¯å¦åå¨","describe":"æ¯å¦åå¨","default":true,"type":"boolean"}] |
| | |
| | | [{"prop":"dpUnit","label":"åä½"},{"prop":"access","isRequired":true,"sendCode":1,"label":"æé","describe":"读åæé\\n RO(åªè¯»)ï¼åªå
许读åç¹ä½æ°æ®ã\\nRW(读/å)ï¼æ¢è½è¯»åæ°æ®ä¹è½åå
¥æ°æ®ã","default":"RO","type":"option","options":["RO","RW"]},{"prop":"pollingInterval","isRequired":true,"label":"轮询é´éï¼msï¼","describe":"轮询é´éï¼msï¼","default":1000},{"prop":"keepOriginalValue","isRequired":true,"sendCode":1,"label":"ä¿çåå§å¼","describe":"ä¿çåå§å¼","default":true,"type":"boolean"},{"prop":"isSave","isRequired":true,"sendCode":1,"label":"æ¯å¦åå¨","describe":"æ¯å¦åå¨","default":true,"type":"boolean"}] |
| | | [{"prop":"dpUnit","label":"åä½"},{"prop":"ruleContent","label":"计ç®è§å","describe":"计ç®è§åæ¥æºäº[è§å管ç-计ç®è§å]ï¼éè¿luaèæ¬ç¼å计ç®è§åï¼å¯¹æ°æ®ç¹çåå§æ°æ®è¿è¡è®¡ç®ï¼çææ°çæ°æ®ç¹åæ°æ®ç¹å¼ã","sendCode":1,"isReqOptions":true,"type":"option","options":["é»è®¤"]},{"prop":"ruleArgs","label":"计ç®åæ°","describe":"æ ¹æ®è®¡ç®è§åï¼å¡«å计ç®åæ°ï¼å¤ä¸ªè®¡ç®åæ°ç¨è±æâï¼âéå¼ï¼æ³¨æ:dpValue为ééå°çå¼ä¸éè¦å¡«åã","sendCode":1},{"prop":"access","isRequired":true,"sendCode":1,"label":"æé","describe":"读åæé\\n RO(åªè¯»)ï¼åªå
许读åç¹ä½æ°æ®ã\\nRW(读/å)ï¼æ¢è½è¯»åæ°æ®ä¹è½åå
¥æ°æ®ã","default":"RO","type":"option","options":["RO","RW"]},{"prop":"pollingInterval","isRequired":true,"label":"轮询é´éï¼msï¼","describe":"轮询é´éï¼msï¼","default":1000},{"prop":"keepOriginalValue","isRequired":true,"sendCode":1,"label":"ä¿çåå§å¼","describe":"ä¿çåå§å¼","default":true,"type":"boolean"},{"prop":"isSave","isRequired":true,"sendCode":1,"label":"æ¯å¦åå¨","describe":"æ¯å¦åå¨","default":true,"type":"boolean"}] |
| | |
| | | <appender name="INFO" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| | | <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
| | | <!-- æ¥å¿æä»¶è¾åºçæä»¶å --> |
| | | <FileNamePattern>target/blade/log/info-%d{yyyy-MM-dd}.%i.log</FileNamePattern> |
| | | <FileNamePattern>/var/smartman/logs/info-%d{yyyy-MM-dd}.%i.log</FileNamePattern> |
| | | <maxHistory>30</maxHistory> |
| | | <totalSizeCap>3GB</totalSizeCap> |
| | | <!--æå¤§å°åå²åä¸å¤©ç--> |