Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
J
jyzb_platformV2
概览
Overview
Details
Activity
Cycle Analytics
版本库
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
问题
0
Issues
0
列表
Board
标记
里程碑
合并请求
0
Merge Requests
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
Snippets
成员
Members
Collapse sidebar
Close sidebar
活动
图像
聊天
创建新问题
作业
提交
Issue Boards
Open sidebar
赵剑炜
jyzb_platformV2
Commits
c6a6a33b
Commit
c6a6a33b
authored
Aug 25, 2023
by
李小惠
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of
http://gitlab.sothing.top/843502640/jyzb_platformV2
into develop-lxh
parents
e7f8a1ac
0b73f4a8
显示空白字符变更
内嵌
并排
正在显示
14 个修改的文件
包含
238 行增加
和
31 行删除
+238
-31
EquipmentSizeDto.java
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/dto/EquipmentSizeDto.java
+18
-3
OrgDto.java
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/dto/OrgDto.java
+1
-0
QueryOrgReq.java
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/query/QueryOrgReq.java
+1
-0
UpdateOrgReq.java
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/req/UpdateOrgReq.java
+1
-1
EquipmentSizeController.java
jyzb-biz/src/main/java/com/junmp/jyzb/controller/EquipmentSizeController.java
+7
-0
EquipmentSizeMapper.java
jyzb-biz/src/main/java/com/junmp/jyzb/mapper/EquipmentSizeMapper.java
+22
-0
EquipmentSizeService.java
jyzb-biz/src/main/java/com/junmp/jyzb/service/EquipmentSizeService.java
+2
-0
PubOrgService.java
jyzb-biz/src/main/java/com/junmp/jyzb/service/PubOrgService.java
+0
-2
EquipmentSizeServiceImpl.java
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/EquipmentSizeServiceImpl.java
+15
-0
PubOrgServiceImpl.java
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/PubOrgServiceImpl.java
+13
-2
EquipmentSizeMapper.xml
jyzb-biz/src/main/resources/mapper/EquipmentSizeMapper.xml
+50
-16
application-local.yml
jyzb-boot/src/main/resources/application-local.yml
+1
-1
application-local.yml.orig
jyzb-boot/src/main/resources/application-local.yml.orig
+102
-0
pom.xml
pom.xml
+5
-6
没有找到文件。
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/dto/EquipmentSizeDto.java
View file @
c6a6a33b
...
...
@@ -35,10 +35,25 @@ public class EquipmentSizeDto {
private
String
name
;
/**
*
创建时间
*
装备名称
*/
private
Date
createTime
;
private
String
eqName
;
/**
* 类别1名称
*/
private
String
type1Name
;
/**
* 类别2名称
*/
private
String
type2name
;
/**
* 类别3名称
*/
private
String
type3Name
;
/**
* 类别汇总名称
*/
private
String
combinedTypes
;
/**
* 更新时间
*/
...
...
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/dto/OrgDto.java
View file @
c6a6a33b
...
...
@@ -12,5 +12,6 @@ public class OrgDto {
private
String
areaName
;
private
String
levelFlag
;
private
String
dName
;
private
Boolean
isLeaf
;
}
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/query/QueryOrgReq.java
View file @
c6a6a33b
...
...
@@ -12,6 +12,7 @@ public class QueryOrgReq {
private
String
parentId
;
private
Integer
isDepartment
;
private
Integer
level
;
private
Integer
delFlag
;
}
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/req/UpdateOrgReq.java
View file @
c6a6a33b
...
...
@@ -14,7 +14,7 @@ public class UpdateOrgReq {
* 状态
*/
@NotNull
(
message
=
"状态不能为空"
,
groups
=
{
ValidationApi
.
updateStatus
.
class
})
private
Integer
status
Flag
;
private
Integer
del
Flag
;
/**
* 组织机构列表
*/
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/controller/EquipmentSizeController.java
View file @
c6a6a33b
package
com
.
junmp
.
jyzb
.
controller
;
import
cn.hutool.db.Page
;
import
com.junmp.jyzb.api.bean.dto.EquipmentSizeDto
;
import
com.junmp.jyzb.api.bean.query.QueryEquipmentSizeReq
;
import
com.junmp.jyzb.api.bean.req.UpdateEquipmentSizeReq
;
...
...
@@ -7,6 +8,7 @@ import com.junmp.jyzb.entity.EquipmentSize;
import
com.junmp.jyzb.service.EquipmentSizeService
;
import
com.junmp.v2.common.bean.request.ValidationApi
;
import
com.junmp.v2.common.bean.response.ApiRes
;
import
com.junmp.v2.db.api.page.PageResult
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
...
...
@@ -53,6 +55,11 @@ public class EquipmentSizeController {
public
ApiRes
<
List
<
EquipmentSizeDto
>>
getAllSize
(
@RequestBody
QueryEquipmentSizeReq
req
){
return
ApiRes
.
success
(
equipmentSizeService
.
getAllSize
(
req
));
}
@PostMapping
(
"/GetSizePage"
)
@ApiOperation
(
"分页查询号型信息"
)
public
ApiRes
<
PageResult
<
EquipmentSizeDto
>>
getSizePage
(
@RequestBody
QueryEquipmentSizeReq
req
){
return
ApiRes
.
success
(
equipmentSizeService
.
getSizePages
(
req
));
}
@PostMapping
(
"/UpdateSize"
)
@ApiOperation
(
"修改号型信息"
)
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/mapper/EquipmentSizeMapper.java
View file @
c6a6a33b
package
com
.
junmp
.
jyzb
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.junmp.jyzb.api.bean.dto.EquipmentSizeDto
;
import
com.junmp.jyzb.api.bean.query.QueryEquipmentSizeReq
;
import
com.junmp.jyzb.entity.Cabinet
;
import
com.junmp.jyzb.entity.EquipmentSize
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -10,4 +15,20 @@ import java.util.Map;
@Mapper
public
interface
EquipmentSizeMapper
extends
BaseMapper
<
EquipmentSize
>
{
/**
* 获取分页的信息
*/
public
List
<
EquipmentSizeDto
>
getSizePage
(
@Param
(
"req"
)
QueryEquipmentSizeReq
req
,
@Param
(
"page"
)
Page
<
EquipmentSizeDto
>
page
);
/**
* 获取分页的信息
*/
public
Integer
getSizeCount
(
@Param
(
"name"
)
String
name
,
@Param
(
"typeId"
)
String
typeId
);
}
\ No newline at end of file
jyzb-biz/src/main/java/com/junmp/jyzb/service/EquipmentSizeService.java
View file @
c6a6a33b
...
...
@@ -6,6 +6,7 @@ import com.junmp.jyzb.api.bean.query.QueryEquipmentSizeReq;
import
com.junmp.jyzb.api.bean.req.UpdateEquipmentSizeReq
;
import
com.junmp.jyzb.entity.EquipmentSize
;
import
com.junmp.jyzb.utils.ResponseResult
;
import
com.junmp.v2.db.api.page.PageResult
;
import
java.util.List
;
...
...
@@ -21,4 +22,5 @@ public interface EquipmentSizeService extends IService<EquipmentSize> {
Boolean
changeSizeState
(
UpdateEquipmentSizeReq
req
);
List
<
EquipmentSizeDto
>
getAllSize
(
QueryEquipmentSizeReq
req
);
PageResult
<
EquipmentSizeDto
>
getSizePages
(
QueryEquipmentSizeReq
req
);
}
jyzb-biz/src/main/java/com/junmp/jyzb/service/PubOrgService.java
View file @
c6a6a33b
...
...
@@ -27,6 +27,4 @@ public interface PubOrgService extends IService<PubOrg> {
//根据组织机构id查询出组织机构是否存在
PubOrg
PubOrgExist
(
Long
id
);
}
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/EquipmentSizeServiceImpl.java
View file @
c6a6a33b
...
...
@@ -2,6 +2,7 @@ package com.junmp.jyzb.service.impl;
import
cn.hutool.core.util.ObjectUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.junmp.jyzb.api.bean.dto.EquipmentSizeDto
;
import
com.junmp.jyzb.api.bean.dto.EquipmentTypeDto
;
...
...
@@ -9,6 +10,7 @@ import com.junmp.jyzb.api.bean.query.QueryEquipmentSizeReq;
import
com.junmp.jyzb.api.bean.req.UpdateEquipmentSizeReq
;
import
com.junmp.jyzb.api.exception.enums.ProductExceptionEnum
;
import
com.junmp.jyzb.entity.EquipmentSize
;
import
com.junmp.jyzb.entity.ProductSku
;
import
com.junmp.jyzb.mapper.EquipmentTypeMapper
;
import
com.junmp.jyzb.service.EquipmentSizeService
;
import
com.junmp.jyzb.utils.DateTimeUtil
;
...
...
@@ -17,6 +19,9 @@ import com.junmp.jyzb.utils.ResponseResult;
import
com.junmp.jyzb.utils.ReturnMsg
;
import
com.junmp.v2.common.exception.base.ServiceException
;
import
com.junmp.v2.common.util.BeanPlusUtil
;
import
com.junmp.v2.db.api.factory.PageFactory
;
import
com.junmp.v2.db.api.factory.PageResultFactory
;
import
com.junmp.v2.db.api.page.PageResult
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
com.junmp.jyzb.mapper.EquipmentSizeMapper
;
...
...
@@ -83,6 +88,16 @@ public class EquipmentSizeServiceImpl extends ServiceImpl<EquipmentSizeMapper, E
}
return
dtoList
;
}
@Override
public
PageResult
<
EquipmentSizeDto
>
getSizePages
(
QueryEquipmentSizeReq
req
)
{
Page
<
EquipmentSizeDto
>
page
=
PageFactory
.
getDefaultPage
(
req
.
getPageNo
(),
req
.
getPageSize
());
List
<
EquipmentSizeDto
>
voList
=
equipmentSizeMapper
.
getSizePage
(
req
,
page
);
page
.
setRecords
(
voList
);
return
PageResultFactory
.
createPageResult
(
page
);
}
private
EquipmentSize
querySize
(
UpdateEquipmentSizeReq
req
)
{
EquipmentSize
app
=
this
.
getById
(
req
.
getId
());
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/PubOrgServiceImpl.java
View file @
c6a6a33b
...
...
@@ -234,7 +234,7 @@ public class PubOrgServiceImpl extends ServiceImpl<PubOrgMapper, PubOrg> implem
List
<
PubOrg
>
st
=
list
(
wp
);
st
.
forEach
(
p
->
{
p
.
set
StatusFlag
(
req
.
getStatus
Flag
());
p
.
set
DelFlag
(
req
.
getDel
Flag
());
});
return
this
.
updateBatchById
(
st
);
...
...
@@ -329,12 +329,22 @@ public class PubOrgServiceImpl extends ServiceImpl<PubOrgMapper, PubOrg> implem
list
.
forEach
(
p
->{
OrgDto
org
=
new
OrgDto
();
BeanPlusUtil
.
copyProperties
(
p
,
org
);
// 判断是否有子节点
boolean
hasChildren
=
hasChildren
(
req
.
getDelFlag
(),
p
.
getOrgId
());
org
.
setIsLeaf
(!
hasChildren
);
orgs
.
add
(
org
);
});
return
orgs
;
}
// 判断是否有子节点的方法
private
boolean
hasChildren
(
Integer
Del
,
Long
parentId
)
{
LambdaQueryWrapper
<
PubOrg
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
PubOrg:
:
getOrgParentId
,
parentId
);
wrapper
.
eq
(
ObjectUtil
.
isNotNull
(
Del
),
PubOrg:
:
getDelFlag
,
Del
);
Long
count
=
this
.
count
(
wrapper
);
return
count
>
0
;
}
public
List
<
OrgDto
>
getOrgList
(
QueryOrgReq
req
)
{
LambdaQueryWrapper
<
PubOrg
>
wp
=
this
.
createWrapper
(
req
);
List
<
PubOrg
>
list
=
this
.
list
(
wp
);
...
...
@@ -356,6 +366,7 @@ public class PubOrgServiceImpl extends ServiceImpl<PubOrgMapper, PubOrg> implem
wrapper
.
eq
(
ObjectUtil
.
isNotEmpty
(
req
.
getIsDepartment
()),
PubOrg:
:
getIsDepartment
,
req
.
getIsDepartment
());
//根据业务编码查询
wrapper
.
eq
(
ObjectUtil
.
isNotEmpty
(
req
.
getLevel
()),
PubOrg:
:
getLevelFlag
,
req
.
getLevel
());
wrapper
.
eq
(
ObjectUtil
.
isNotEmpty
(
req
.
getDelFlag
()),
PubOrg:
:
getDelFlag
,
req
.
getDelFlag
());
wrapper
.
eq
(
ObjectUtil
.
isNotEmpty
(
req
.
getParentId
()),
PubOrg:
:
getOrgParentId
,
req
.
getParentId
()
);
wrapper
.
eq
(
ObjectUtil
.
isNotEmpty
(
req
.
getOrgCode
()),
PubOrg:
:
getOrgCode
,
req
.
getOrgCode
());
...
...
jyzb-biz/src/main/resources/mapper/EquipmentSizeMapper.xml
View file @
c6a6a33b
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.junmp.jyzb.mapper.EquipmentSizeMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.junmp.jyzb.entity.EquipmentSize"
>
<!--@mbg.generated-->
<!--@Table base_equipment_size-->
<id
column=
"id"
jdbcType=
"VARCHAR"
property=
"id"
/>
<result
column=
"type_id"
jdbcType=
"VARCHAR"
property=
"typeId"
/>
<result
column=
"code"
jdbcType=
"INTEGER"
property=
"code"
/>
<result
column=
"name"
jdbcType=
"VARCHAR"
property=
"name"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
<result
column=
"note"
jdbcType=
"VARCHAR"
property=
"note"
/>
<result
column=
"epc_type"
jdbcType=
"INTEGER"
property=
"epcType"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
<!--@mbg.generated-->
id, type_id, detail_id, code, `name`, create_time, update_time, note, epc_type
</sql>
<select
id=
"getSizePage"
resultType=
"com.junmp.jyzb.api.bean.dto.EquipmentSizeDto"
>
SELECT
t1.id,
t1.state,
t2.name AS eqName,
t1.name AS name,
t1.type_id as typeId,
t1.price,
t1.code AS code,
t3.name AS type3Name,
t4.name AS type2name,
t5.name AS type1Name,
CONCAT_WS(' / ', t5.name, t4.name, t3.name) AS combinedTypes
FROM
`base_equipment_size` t1
LEFT JOIN `base_equipment_type` t2 ON t1.type_id = t2.id
LEFT JOIN `base_equipment_type` t3 ON t2.parent_id = t3.id
LEFT JOIN `base_equipment_type` t4 ON t3.parent_id = t4.id
LEFT JOIN `base_equipment_type` t5 ON t4.parent_id = t5.id
LEFT JOIN `base_equipment_type` t6 ON t5.parent_id = t6.id
WHERE 1 = 1
<if
test=
"null != req"
>
<if
test=
"null != req.name"
>
AND t1.name LIKE CONCAT('%', #{req.name}, '%')
</if>
<if
test=
"null != req.typeId and '' != req.typeId"
>
AND t1.type_id= #{req.typeId}
</if>
</if>
</select>
<select
id=
"getSizeCount"
resultType=
"int"
>
SELECT
COUNT(*)
FROM
`base_equipment_size` t1
LEFT JOIN `base_equipment_type` t2 ON t1.type_id = t2.id
LEFT JOIN `base_equipment_type` t3 ON t2.parent_id = t3.id
LEFT JOIN `base_equipment_type` t4 ON t3.parent_id = t4.id
LEFT JOIN `base_equipment_type` t5 ON t4.parent_id = t5.id
LEFT JOIN `base_equipment_type` t6 ON t5.parent_id = t6.id
<if
test=
"name != null and name != ''"
>
AND t1.name LIKE CONCAT('%', #{name}, '%')
</if>
<if
test=
"typeId != null and typeId != ''"
>
AND t1.type_id= #{typeId}
</if>
</select>
</mapper>
\ No newline at end of file
jyzb-boot/src/main/resources/application-local.yml
View file @
c6a6a33b
...
...
@@ -26,7 +26,7 @@ knife4j:
spring
:
datasource
:
driver-class-name
:
com.mysql.cj.jdbc.Driver
url
:
jdbc:mysql://192.168.3.128/db_jyzb?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=CTT&nullCatalogMeansCurrent=true
url
:
jdbc:mysql://192.168.3.128
:3306
/db_jyzb?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=CTT&nullCatalogMeansCurrent=true
username
:
junmp
password
:
123456
...
...
jyzb-boot/src/main/resources/application-local.yml.orig
0 → 100644
View file @
c6a6a33b
scanner:
open: false
# 配置第三方请求
junmp:
swagger:
base-package: com.junmp
id:
worker-id: 1
data-center-id: 1
epoch: 1656036996843
max: 9999
log:
type: db
ds: true #是否多数据源
knife4j:
enable: true
setting:
enableDebug: false
# basic:
# enable: true
# username: ning
# password: ning
spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
<<<<<<< HEAD
url: jdbc:mysql://192.168.3.128:3306/db_jyzb?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=CTT&nullCatalogMeansCurrent=true
=======
url: jdbc:mysql://192.168.3.128/db_jyzb?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=CTT&nullCatalogMeansCurrent=true
>>>>>>> ce2cec735d8197f0f6b77fb7df738d825354bd3c
username: junmp
password: 123456
redis:
#host: 192.168.3.188
host: 192.168.3.188
port: 6379
database: 1
password:
flowable:
dmn:
enabled: false
cmmn:
enabled: false
idm:
enabled: false
async-history-executor-activate: false
async-executor-activate: false
check-process-definitions: false
content:
enabled: false
app:
enabled: false
eventregistry:
enabled: false
#mybatis plus 设置
mybatis-plus:
configuration:
cache-enabled: true
lazy-loading-enabled: true
multiple-result-sets-enabled: true
map-underscore-to-camel-case: true #开启驼峰命名
global-config:
banner: false
enable-sql-runner: true
db-config:
id-type: assign_id
table-underline: true
# mapper-locations: classpath*:com/junmp/junmpProcess/mapper/**/xml/*Mapper.xml
mapper-locations: classpath*:/mapper/**/*Mapper.xml
flowable:
dmn:
enabled: false
cmmn:
enabled: false
idm:
enabled: false
async-history-executor-activate: false
async-executor-activate: false
check-process-definitions: false
content:
enabled: false
app:
enabled: false
eventregistry:
enabled: false
com:
mqtt:
url: tcp://broker.emqx.io:1883 #这里要写 tcp:// 不能是 mqtt,不然不是合法的 schema,源码中有
clientId: mqtt_test_spring
topics: iot/#,home/#
username: admin
password: public
timeout: 10
keepalive: 20
\ No newline at end of file
pom.xml
View file @
c6a6a33b
...
...
@@ -50,7 +50,6 @@
<project.reporting.outputEncoding>
UTF-8
</project.reporting.outputEncoding>
<spring-boot-maven-plugin.version>
2.5.0
</spring-boot-maven-plugin.version>
<java.version>
1.8
</java.version>
<mysql-connector-java.version>
8.0.21
</mysql-connector-java.version>
<mybatis-plus-boot-starter>
3.5.1
</mybatis-plus-boot-starter>
<junmp.v2.version>
1.0.0
</junmp.v2.version>
<spring.ds.version>
3.5.1
</spring.ds.version>
...
...
@@ -259,11 +258,11 @@
</dependency>
<!-- bcrypt依赖 -->
<dependency
>
<groupId>
org.springframework.security
</groupId
>
<artifactId>
spring-security-web
</artifactId
>
<version>
5.0.5.RELEASE
</version
>
</dependency
>
<!-- <dependency>--
>
<!-- <groupId>org.springframework.security</groupId>--
>
<!-- <artifactId>spring-security-web</artifactId>--
>
<!-- <version>5.0.5.RELEASE</version>--
>
<!-- </dependency>--
>
<!--导入导出依赖-->
<dependency>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论