Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
config-server-api
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
何熠
config-server-api
Commits
18539078
Commit
18539078
authored
Jan 12, 2022
by
zhaoxiaolei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加日志 修改特配逻辑
parent
73a78212
Hide whitespace changes
Inline
Side-by-side
Showing
48 changed files
with
1082 additions
and
761 deletions
+1082
-761
WebSecurityConfig.java
...uitech/authorization/configuration/WebSecurityConfig.java
+0
-65
WebSecurityConfiguration.java
...authorization/configuration/WebSecurityConfiguration.java
+57
-0
CharacteristicController.java
...ch/authorization/controller/CharacteristicController.java
+7
-13
CharacteristicValueController.java
...thorization/controller/CharacteristicValueController.java
+7
-14
ConfigController.java
...com/uitech/authorization/controller/ConfigController.java
+1
-2
CtoBomController.java
...com/uitech/authorization/controller/CtoBomController.java
+6
-42
IntegrateController.java
.../uitech/authorization/controller/IntegrateController.java
+19
-10
SuperBomPriceCalculateController.java
...rization/controller/SuperBomPriceCalculateController.java
+3
-2
TempController.java
...n/com/uitech/authorization/controller/TempController.java
+2
-2
CharacteristicMapper.java
...com/uitech/authorization/mapper/CharacteristicMapper.java
+6
-5
CharacteristicValueMapper.java
...itech/authorization/mapper/CharacteristicValueMapper.java
+5
-2
CtoBomMapper.java
...java/cn/com/uitech/authorization/mapper/CtoBomMapper.java
+2
-33
ProductDescriptionMapper.java
...uitech/authorization/mapper/ProductDescriptionMapper.java
+0
-15
SuperBomPriceCalculateMapper.java
...ch/authorization/mapper/SuperBomPriceCalculateMapper.java
+5
-0
UserInfoMapper.java
...va/cn/com/uitech/authorization/mapper/UserInfoMapper.java
+3
-0
CharacteristicLogOpera.java
...uitech/authorization/pojo/dto/CharacteristicLogOpera.java
+99
-0
CharacteristicRequestParamDto.java
...authorization/pojo/dto/CharacteristicRequestParamDto.java
+10
-1
CharacteristicValueLogOpera.java
...h/authorization/pojo/dto/CharacteristicValueLogOpera.java
+133
-0
CharacteristicValueRequestParamDto.java
...rization/pojo/dto/CharacteristicValueRequestParamDto.java
+10
-1
CharacteristicsLogOpera.java
...itech/authorization/pojo/dto/CharacteristicsLogOpera.java
+64
-0
ConfigurableBomLogOpera.java
...itech/authorization/pojo/dto/ConfigurableBomLogOpera.java
+108
-0
CtoBomRequestParamDto.java
.../uitech/authorization/pojo/dto/CtoBomRequestParamDto.java
+6
-0
Characteristic.java
.../com/uitech/authorization/pojo/entity/Characteristic.java
+7
-1
CharacteristicValue.java
...uitech/authorization/pojo/entity/CharacteristicValue.java
+7
-0
Characteristics.java
...com/uitech/authorization/pojo/entity/Characteristics.java
+21
-0
ProductDescription.java
.../uitech/authorization/pojo/entity/ProductDescription.java
+0
-43
UserOperationLog.java
...om/uitech/authorization/pojo/entity/UserOperationLog.java
+27
-0
CharacteristicService.java
...m/uitech/authorization/service/CharacteristicService.java
+4
-3
CharacteristicValueService.java
...ech/authorization/service/CharacteristicValueService.java
+4
-3
CtoBomService.java
...va/cn/com/uitech/authorization/service/CtoBomService.java
+7
-35
IntegrateService.java
...cn/com/uitech/authorization/service/IntegrateService.java
+7
-4
SecurityService.java
.../cn/com/uitech/authorization/service/SecurityService.java
+0
-47
SuperBomPriceCalculateService.java
.../authorization/service/SuperBomPriceCalculateService.java
+2
-1
TempServer.java
.../java/cn/com/uitech/authorization/service/TempServer.java
+1
-1
CharacteristicServiceImpl.java
...authorization/service/impl/CharacteristicServiceImpl.java
+32
-10
CharacteristicValueServiceImpl.java
...rization/service/impl/CharacteristicValueServiceImpl.java
+32
-6
CtoBomServiceImpl.java
.../uitech/authorization/service/impl/CtoBomServiceImpl.java
+20
-81
IntegrateServiceImpl.java
...tech/authorization/service/impl/IntegrateServiceImpl.java
+161
-116
SuperBomPriceCalculateServiceImpl.java
...ation/service/impl/SuperBomPriceCalculateServiceImpl.java
+13
-4
TempServiceImpl.java
...om/uitech/authorization/service/impl/TempServiceImpl.java
+4
-2
IPUtils.java
src/main/java/cn/com/uitech/authorization/utils/IPUtils.java
+0
-51
application-lcrx-prod.yml
src/main/resources/application-lcrx-prod.yml
+1
-1
CharacteristicMapper.xml
src/main/resources/mapper/CharacteristicMapper.xml
+32
-9
CharacteristicValueMapper.xml
src/main/resources/mapper/CharacteristicValueMapper.xml
+43
-9
CtoBomMapper.xml
src/main/resources/mapper/CtoBomMapper.xml
+49
-97
ProductDescriptionMapper.xml
src/main/resources/mapper/ProductDescriptionMapper.xml
+0
-27
SuperBomPriceCalculateMapper.xml
src/main/resources/mapper/SuperBomPriceCalculateMapper.xml
+42
-1
UserInfoMapper.xml
src/main/resources/mapper/UserInfoMapper.xml
+13
-2
No files found.
src/main/java/cn/com/uitech/authorization/configuration/WebSecurityConfig.java
deleted
100644 → 0
View file @
73a78212
package
cn
.
com
.
uitech
.
authorization
.
configuration
;
import
cn.com.uitech.authorization.service.UserAuthLoginService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder
;
import
org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity
;
import
org.springframework.security.config.annotation.web.builders.HttpSecurity
;
import
org.springframework.security.config.annotation.web.configuration.EnableWebSecurity
;
import
org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter
;
import
org.springframework.security.config.http.SessionCreationPolicy
;
import
org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder
;
import
javax.annotation.Resource
;
@Configuration
@EnableWebSecurity
@EnableGlobalMethodSecurity
(
securedEnabled
=
true
)
public
class
WebSecurityConfig
extends
WebSecurityConfigurerAdapter
{
@Resource
private
UserAuthLoginService
userAuthService
;
@Autowired
private
BCryptPasswordEncoder
bCryptPasswordEncoder
;
@Autowired
private
RsaKeyProperties
prop
;
@Bean
public
BCryptPasswordEncoder
myPasswordEncoder
()
{
return
new
BCryptPasswordEncoder
();
}
@Override
protected
void
configure
(
HttpSecurity
http
)
throws
Exception
{
http
//关闭跨站请求防护
.
cors
()
.
and
()
.
csrf
()
.
disable
()
//其他的需要授权后访问
.
authorizeRequests
()
.
and
()
//增加自定义认证过滤器
//.addFilter(new JwtLoginFilter(authenticationManager(), prop))
//增加自定义验证认证过滤器
//.addFilter(new JwtVerifyFilter(authenticationManager(), prop))
// 前后端分离是无状态的,不用session了,直接禁用。
.
sessionManagement
()
.
sessionCreationPolicy
(
SessionCreationPolicy
.
STATELESS
)
//允许不登陆就可以访问的方法,多个用逗号分隔
.
and
().
authorizeRequests
()
.
antMatchers
(
"/swagger-ui.html"
).
permitAll
()
.
antMatchers
(
"/login"
).
hasAnyRole
()
;
}
@Override
public
void
configure
(
AuthenticationManagerBuilder
auth
)
throws
Exception
{
//UserDetailsService类
auth
.
userDetailsService
(
userAuthService
)
//加密策略
.
passwordEncoder
(
bCryptPasswordEncoder
);
}
}
src/main/java/cn/com/uitech/authorization/configuration/WebSecurityConfiguration.java
0 → 100644
View file @
18539078
package
cn
.
com
.
uitech
.
authorization
.
configuration
;
import
org.springframework.boot.web.servlet.FilterRegistrationBean
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.core.Ordered
;
import
org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity
;
import
org.springframework.security.config.annotation.web.builders.HttpSecurity
;
import
org.springframework.security.config.annotation.web.configuration.EnableWebSecurity
;
import
org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter
;
import
org.springframework.web.cors.CorsConfiguration
;
import
org.springframework.web.cors.UrlBasedCorsConfigurationSource
;
import
org.springframework.web.filter.CorsFilter
;
@Configuration
@EnableWebSecurity
@EnableGlobalMethodSecurity
(
prePostEnabled
=
true
)
public
class
WebSecurityConfiguration
extends
WebSecurityConfigurerAdapter
{
@Override
protected
void
configure
(
HttpSecurity
http
)
throws
Exception
{
http
.
cors
().
and
().
csrf
().
disable
();
}
// springSecurityFilterChain中配置了 CorsFilter [http.cors()] 需要手工指定Bean
@Bean
public
CorsFilter
corsFilter
()
{
final
UrlBasedCorsConfigurationSource
urlBasedCorsConfigurationSource
=
new
UrlBasedCorsConfigurationSource
();
final
CorsConfiguration
corsConfiguration
=
new
CorsConfiguration
();
corsConfiguration
.
setAllowCredentials
(
true
);
corsConfiguration
.
addAllowedOrigin
(
"*"
);
corsConfiguration
.
addAllowedHeader
(
"*"
);
corsConfiguration
.
addAllowedMethod
(
"*"
);
urlBasedCorsConfigurationSource
.
registerCorsConfiguration
(
"/**"
,
corsConfiguration
);
return
new
CorsFilter
(
urlBasedCorsConfigurationSource
);
}
@Bean
public
FilterRegistrationBean
customCorsFilter
()
{
UrlBasedCorsConfigurationSource
source
=
new
UrlBasedCorsConfigurationSource
();
CorsConfiguration
config
=
new
CorsConfiguration
();
config
.
setAllowCredentials
(
true
);
config
.
addAllowedOrigin
(
"*"
);
config
.
addAllowedHeader
(
"*"
);
config
.
addAllowedMethod
(
"*"
);
source
.
registerCorsConfiguration
(
"/**"
,
config
);
FilterRegistrationBean
bean
=
new
FilterRegistrationBean
(
new
CorsFilter
(
source
));
//IMPORTANT #2: I didn't stress enough the importance of this line in my original answer,
//but it's here where we tell Spring to load this filter at the right point in the chain
//(with an order of precedence higher than oauth2's filters)
bean
.
setOrder
(
Ordered
.
HIGHEST_PRECEDENCE
);
return
bean
;
}
}
src/main/java/cn/com/uitech/authorization/controller/CharacteristicController.java
View file @
18539078
...
...
@@ -22,6 +22,7 @@ import org.springframework.web.bind.annotation.*;
import
org.springframework.web.multipart.MultipartFile
;
import
springfox.documentation.annotations.ApiIgnore
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
import
java.text.ParseException
;
...
...
@@ -37,7 +38,6 @@ import java.util.List;
//@ApiIgnore
public
class
CharacteristicController
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
CharacteristicController
.
class
);
@Autowired
private
CharacteristicService
characteristicService
;
...
...
@@ -71,10 +71,8 @@ public class CharacteristicController {
*/
@PutMapping
(
"/update"
)
@ApiOperation
(
value
=
"特征管理 保存详情"
,
notes
=
"特征管理 保存详情"
,
httpMethod
=
"PUT"
)
public
CrmResponseEntity
<
Integer
>
updateCharacteristic
(
@Validated
({
EditSave
.
class
})
@RequestBody
CharacteristicRequestParamDto
characteristicRequestParamDto
){
String
code
=
SecurityService
.
getPrincipal
().
getCode
();
logger
.
info
(
"基础信息特征管理维护 保存详情 ,操作人:{},物料:{}:"
,
code
,
characteristicRequestParamDto
.
getCharacteristicCode
());
return
ResultGenerator
.
genSuccessResult
(
characteristicService
.
updateCharacteristic
(
characteristicRequestParamDto
));
public
CrmResponseEntity
<
Integer
>
updateCharacteristic
(
@Validated
({
EditSave
.
class
})
@RequestBody
CharacteristicRequestParamDto
characteristicRequestParamDto
,
HttpServletRequest
request
){
return
ResultGenerator
.
genSuccessResult
(
characteristicService
.
updateCharacteristic
(
characteristicRequestParamDto
,
request
));
}
...
...
@@ -86,8 +84,6 @@ public class CharacteristicController {
@PutMapping
(
"/updateVisitbleType"
)
@ApiOperation
(
value
=
"特征管理 批量显示/隐藏特征数据"
,
notes
=
"特征管理 批量显示/隐藏特征数据"
,
httpMethod
=
"PUT"
,
response
=
CrmResponseEntity
.
class
)
public
CrmResponseEntity
<
Integer
>
updateVisibleType
(
@RequestBody
CharacteristicRequestParamDto
characteristicRequestParamDto
){
String
code
=
SecurityService
.
getPrincipal
().
getCode
();
logger
.
info
(
"基础信息特征管理维护 批量显示/隐藏特征数据 ,操作人:{},物料{}:"
,
code
,
characteristicRequestParamDto
.
getCharacteristicCodes
().
toString
());
return
ResultGenerator
.
genSuccessResult
(
characteristicService
.
updateVisibleType
(
characteristicRequestParamDto
));
}
...
...
@@ -104,10 +100,8 @@ public class CharacteristicController {
@PutMapping
(
"/updateCharacteristicIsH3C"
)
@ApiOperation
(
value
=
"特征管理 批量更新H3C状态"
,
notes
=
"特征管理 批量更新H3C状态"
,
httpMethod
=
"PUT"
)
public
CrmResponseEntity
<?>
updateCharacteristicValueIsH3C
(
@Validated
({
BathUpdate
.
class
})
@RequestBody
CharacteristicRequestParamDto
dto
)
{
String
code
=
SecurityService
.
getPrincipal
().
getCode
();
logger
.
info
(
"基础信息特征管理维护 批量更新H3C状态 ,操作人:{},物料:{}"
,
code
,
dto
.
getCharacteristicCodes
().
toString
());
return
ResultGenerator
.
genSuccessResult
(
characteristicService
.
updateCharacteristicIsH3C
(
dto
));
public
CrmResponseEntity
<?>
updateCharacteristicValueIsH3C
(
@Validated
({
BathUpdate
.
class
})
@RequestBody
CharacteristicRequestParamDto
dto
,
HttpServletRequest
request
)
{
return
ResultGenerator
.
genSuccessResult
(
characteristicService
.
updateCharacteristicIsH3C
(
dto
,
request
));
}
...
...
@@ -130,7 +124,7 @@ public class CharacteristicController {
*/
@RequestMapping
(
"/batchUpdateByUpload"
)
@ApiOperation
(
value
=
"特征管理 上传文件更新"
,
notes
=
"特征管理 上传文件更新"
,
httpMethod
=
"POST"
)
public
CrmResponseEntity
<?>
batchUpdateByUpload
(
@RequestParam
(
"file"
)
MultipartFile
file
){
return
ResultGenerator
.
genSuccessResult
(
characteristicService
.
batchUpdateByUpload
(
file
));
public
CrmResponseEntity
<?>
batchUpdateByUpload
(
@RequestParam
(
"file"
)
MultipartFile
file
,
HttpServletRequest
request
){
return
ResultGenerator
.
genSuccessResult
(
characteristicService
.
batchUpdateByUpload
(
file
,
request
));
}
}
src/main/java/cn/com/uitech/authorization/controller/CharacteristicValueController.java
View file @
18539078
...
...
@@ -23,6 +23,7 @@ import org.springframework.web.bind.annotation.*;
import
org.springframework.web.multipart.MultipartFile
;
import
springfox.documentation.annotations.ApiIgnore
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
...
...
@@ -37,8 +38,6 @@ import java.util.List;
//@ApiIgnore
public
class
CharacteristicValueController
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
CharacteristicValueController
.
class
);
@Autowired
private
CharacteristicValueService
characteristicValueService
;
...
...
@@ -54,26 +53,20 @@ public class CharacteristicValueController {
@PutMapping
(
"/modifyBomStatusAll"
)
@ApiOperation
(
value
=
"特征值管理 全部更新可卖状态"
,
notes
=
"特征值管理 全部更新可卖状态"
,
httpMethod
=
"PUT"
)
public
CrmResponseEntity
<?>
modifyBomStatusAll
(
@Validated
({
Query
.
class
})
@RequestBody
CharacteristicValueRequestParamDto
dto
)
{
String
code
=
SecurityService
.
getPrincipal
().
getCode
();
logger
.
info
(
"基础信息特征值管理维护 全部更新可卖状态 ,操作人:{},修改信息:{}"
,
code
,
dto
.
toString
());
return
ResultGenerator
.
genSuccessResult
(
characteristicValueService
.
modifyBomStatusAll
(
dto
));
}
@PutMapping
(
"/batchModifyBomStatus"
)
@ApiOperation
(
value
=
"特征值管理 批量更新可卖状态"
,
notes
=
"特征值管理 批量更新可卖状态"
,
httpMethod
=
"PUT"
)
public
CrmResponseEntity
<?>
batchModifyBomStatus
(
@Validated
({
BathUpdate
.
class
})
@RequestBody
CharacteristicValueRequestParamDto
dto
)
{
String
code
=
SecurityService
.
getPrincipal
().
getCode
();
logger
.
info
(
"基础信息特征值管理维护 批量更新可卖状态 ,操作人:{},物料:{}"
,
code
,
dto
.
getCharacteristicValueCodes
().
toString
());
return
ResultGenerator
.
genSuccessResult
(
characteristicValueService
.
batchModifyBomStatus
(
dto
));
public
CrmResponseEntity
<?>
batchModifyBomStatus
(
@Validated
({
BathUpdate
.
class
})
@RequestBody
CharacteristicValueRequestParamDto
dto
,
HttpServletRequest
request
)
{
return
ResultGenerator
.
genSuccessResult
(
characteristicValueService
.
batchModifyBomStatus
(
dto
,
request
));
}
@PutMapping
(
"/editCharacteristicValue"
)
@ApiOperation
(
value
=
"特征值管理 保存详情"
,
notes
=
"特征值管理 保存详情"
,
httpMethod
=
"PUT"
)
public
CrmResponseEntity
<?>
editCharacteristicValue
(
@Validated
({
EditSave
.
class
})
@RequestBody
CharacteristicValue
dto
)
{
String
code
=
SecurityService
.
getPrincipal
().
getCode
();
logger
.
info
(
"基础信息特征值管理维护 保存详情 ,操作人:{},物料:{}"
,
code
,
dto
.
getCharacteristicValueCode
());
return
ResultGenerator
.
genSuccessResult
(
characteristicValueService
.
editCharacteristicValue
(
dto
));
public
CrmResponseEntity
<?>
editCharacteristicValue
(
@Validated
({
EditSave
.
class
})
@RequestBody
CharacteristicValue
dto
,
HttpServletRequest
request
)
{
return
ResultGenerator
.
genSuccessResult
(
characteristicValueService
.
editCharacteristicValue
(
dto
,
request
));
}
/**
...
...
@@ -116,8 +109,8 @@ public class CharacteristicValueController {
*/
@RequestMapping
(
"/batchUpdateByUpload"
)
@ApiOperation
(
value
=
"特征值管理 上传文件更新"
,
notes
=
"特征值管理 上传文件更新"
,
httpMethod
=
"POST"
)
public
CrmResponseEntity
<?>
batchUpdateByUpload
(
@RequestParam
(
"file"
)
MultipartFile
file
){
return
ResultGenerator
.
genSuccessResult
(
characteristicValueService
.
batchUpdateByUpload
(
file
));
public
CrmResponseEntity
<?>
batchUpdateByUpload
(
@RequestParam
(
"file"
)
MultipartFile
file
,
HttpServletRequest
request
){
return
ResultGenerator
.
genSuccessResult
(
characteristicValueService
.
batchUpdateByUpload
(
file
,
request
));
}
/**
...
...
src/main/java/cn/com/uitech/authorization/controller/ConfigController.java
View file @
18539078
...
...
@@ -52,8 +52,7 @@ public class ConfigController {
@ApiOperation
(
value
=
"Cto物料维护 修改"
,
notes
=
"Cto物料维护 修改"
,
httpMethod
=
"POST"
)
public
CrmResponseEntity
<?>
insertCto
(
@RequestBody
List
<
ConfigurableBom
>
configurableBoms
)
{
ctoBomService
.
insertCto
(
configurableBoms
);
String
code
=
SecurityService
.
getPrincipal
().
getCode
();
return
ResultGenerator
.
genSuccessResult
(
code
+
" cto数据维护成功"
);
return
ResultGenerator
.
genSuccessResult
(
" cto数据维护成功"
);
}
/**
...
...
src/main/java/cn/com/uitech/authorization/controller/CtoBomController.java
View file @
18539078
...
...
@@ -14,11 +14,13 @@ import cn.com.uitech.authorization.utils.ResultGenerator;
import
com.github.pagehelper.PageInfo
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.http.HttpRequest
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
import
springfox.documentation.annotations.ApiIgnore
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.List
;
/**
...
...
@@ -62,9 +64,8 @@ public class CtoBomController {
*/
@PutMapping
(
"/updateEdit"
)
@ApiOperation
(
value
=
"Cto物料维护 修改"
,
notes
=
"Cto物料维护 修改"
,
httpMethod
=
"PUT"
)
public
CrmResponseEntity
<?>
updateCtoBomByBomCode
(
@Validated
({
EditSave
.
class
})
@RequestBody
CtoBomRequestParamDto
ctoBomRequestParamDto
)
{
Integer
rows
=
ctoBomService
.
updateCtoBomByBomCode
(
ctoBomRequestParamDto
);
String
code
=
SecurityService
.
getPrincipal
().
getCode
();
public
CrmResponseEntity
<?>
updateCtoBomByBomCode
(
@Validated
({
EditSave
.
class
})
@RequestBody
CtoBomRequestParamDto
ctoBomRequestParamDto
,
HttpServletRequest
request
)
{
Integer
rows
=
ctoBomService
.
updateCtoBomByBomCode
(
ctoBomRequestParamDto
,
request
);
return
ResultGenerator
.
genSuccessResult
(
rows
);
}
...
...
@@ -87,9 +88,8 @@ public class CtoBomController {
*/
@PutMapping
(
"/update"
)
@ApiOperation
(
value
=
"Cto物料维护 批量更新"
,
notes
=
"Cto物料维护 批量更新"
,
httpMethod
=
"PUT"
)
public
CrmResponseEntity
<?>
updateIsPresaleByBomCode
(
@Validated
({
BathUpdate
.
class
})
@RequestBody
CtoBomRequestParamDto
ctoBomRequestParamDto
)
{
Integer
rows
=
ctoBomService
.
updateIsPresaleByBomCode
(
ctoBomRequestParamDto
);
String
code
=
SecurityService
.
getPrincipal
().
getCode
();
public
CrmResponseEntity
<?>
updateIsPresaleByBomCode
(
@Validated
({
BathUpdate
.
class
})
@RequestBody
CtoBomRequestParamDto
ctoBomRequestParamDto
,
HttpServletRequest
request
)
{
Integer
rows
=
ctoBomService
.
updateIsPresaleByBomCode
(
ctoBomRequestParamDto
,
request
);
return
ResultGenerator
.
genSuccessResult
(
rows
);
}
...
...
@@ -105,42 +105,6 @@ public class CtoBomController {
return
ResultGenerator
.
genSuccessResult
(
list
);
}
/**
* @param componentCargoDto
* @return
* @desc 根据产品组,统一名称,获取CTO列表
*/
@PostMapping
(
"/ctos"
)
@ApiOperation
(
value
=
"根据产品组,统一名称,获取CTO列表"
,
notes
=
"根据产品组,统一名称,获取CTO列表"
,
httpMethod
=
"POST"
)
public
CrmResponseEntity
<
List
<
ComponentCargoDto
>>
getCtoScopeNameAll
(
@RequestBody
ComponentCargoDto
componentCargoDto
)
{
return
ResultGenerator
.
genSuccessResult
(
ctoBomService
.
getCtoScopeNameAll
(
componentCargoDto
));
}
/**
* @param dto
* @return ConfigurableBom
* @desc 商机立项时 添加基准机型时 CTO下拉列表
*/
@PostMapping
(
"/getCtoComboBox"
)
@ApiOperation
(
value
=
"商机立项时 添加基准机型时 CTO下拉列表"
,
notes
=
"商机立项时 添加基准机型时 CTO下拉列表"
,
httpMethod
=
"POST"
)
public
CrmResponseEntity
<
List
<
ConfigurableBom
>>
getCtoComboBox
(
@RequestBody
CtoBomRequestParamDto
dto
)
{
return
ResultGenerator
.
genSuccessResult
(
ctoBomService
.
getCtoComboBox
(
dto
));
}
/**
* @param bomStatusEntity
* @return PageInfo
* @desc cto 客户处可卖批量更新
*/
@PostMapping
(
"/updateInsertCustomerbelongtoByBom"
)
@ApiOperation
(
value
=
"基础信息CTO维护 cto 客户处可卖批量更新"
,
notes
=
"基础信息CTO维护 cto 客户处可卖批量更新"
,
httpMethod
=
"POST"
)
public
CrmResponseEntity
<?>
updateInsertCustomerbelongtoByBom
(
@RequestBody
BomStatusEntity
bomStatusEntity
)
{
ctoBomService
.
updateInsertCustomerbelongtoByBom
(
bomStatusEntity
);
String
code
=
SecurityService
.
getPrincipal
().
getCode
();
return
ResultGenerator
.
genSuccessResult
();
}
@PostMapping
(
"/getProductGroupList"
)
@ApiOperation
(
value
=
"基础信息 获取产品组信息"
,
notes
=
"基础信息 获取产品组信息"
,
httpMethod
=
"POST"
)
public
CrmResponseEntity
<?>
getProductGroupList
()
{
...
...
src/main/java/cn/com/uitech/authorization/controller/IntegrateController.java
View file @
18539078
...
...
@@ -4,6 +4,7 @@ import cn.com.uitech.authorization.mapper.SuperTableInfoMapper;
import
cn.com.uitech.authorization.pojo.dto.*
;
import
cn.com.uitech.authorization.pojo.entity.*
;
import
cn.com.uitech.authorization.service.IntegrateService
;
import
cn.com.uitech.authorization.service.SecurityService
;
import
cn.com.uitech.authorization.utils.CrmResponseEntity
;
import
cn.com.uitech.authorization.utils.RedisHelper
;
import
cn.com.uitech.authorization.utils.RedisKey
;
...
...
@@ -12,14 +13,12 @@ import com.alibaba.fastjson.JSON;
import
com.alibaba.fastjson.JSONObject
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.junit.Test
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.http.HttpEntity
;
import
org.springframework.http.HttpHeaders
;
import
org.springframework.http.HttpMethod
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.ldap.filter.EqualsFilter
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.validation.Errors
;
...
...
@@ -28,6 +27,8 @@ import org.springframework.web.client.RestTemplate;
import
springfox.documentation.annotations.ApiIgnore
;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.*
;
@RestController
...
...
@@ -303,26 +304,29 @@ public class IntegrateController {
@PostMapping
(
"/GetConfigBySUKINFO"
)
@ApiOperation
(
value
=
"SKU配置接口CRM"
,
notes
=
"GetConfigBySUKINFO"
,
httpMethod
=
"POST"
)
public
CrmResponseEntity
<?>
GetConfigBySUKINFO
(
@RequestBody
SuperBomSkuInfo
superBomSkuInfo
){
return
ResultGenerator
.
genSuccessResult
(
integrateService
.
GetConfigBySUKINFO
(
superBomSkuInfo
));
public
CrmResponseEntity
<?>
GetConfigBySUKINFO
(
@RequestBody
SuperBomSkuInfo
superBomSkuInfo
,
HttpServletRequest
request
){
superBomSkuInfo
.
setApplyUser
(
request
.
getHeader
(
"UserCode"
));
return
ResultGenerator
.
genSuccessResult
(
integrateService
.
GetConfigBySUKINFO
(
superBomSkuInfo
,
request
));
}
@PostMapping
(
"/GetSKUByConfigInfo"
)
@ApiOperation
(
value
=
"撞配"
,
notes
=
"GetSKUByConfigInfo"
,
httpMethod
=
"POST"
)
public
CrmResponseEntity
<?>
GetSKUByConfigInfo
(
@RequestBody
SuperBomSkuInfo
superBomSkuInfo
){
return
ResultGenerator
.
genSuccessResult
(
integrateService
.
GetSKUByConfigInfo
(
superBomSkuInfo
));
public
CrmResponseEntity
<?>
GetSKUByConfigInfo
(
@RequestBody
SuperBomSkuInfo
superBomSkuInfo
,
HttpServletRequest
request
){
superBomSkuInfo
.
setApplyUser
(
request
.
getHeader
(
"UserCode"
));
return
ResultGenerator
.
genSuccessResult
(
integrateService
.
GetSKUByConfigInfo
(
superBomSkuInfo
,
request
));
}
@PostMapping
(
"/GetSKUByH3CConfigInfo"
)
@ApiOperation
(
value
=
"SKU配置接口H3C"
,
notes
=
"GetSKUByH3CConfigInfo"
,
httpMethod
=
"POST"
)
public
CrmResponseEntity
<?>
GetSKUByH3CConfigInfo
(
@RequestBody
GetSKUByH3CConfigInfo
configSkuInfo
){
return
ResultGenerator
.
genSuccessResult
(
integrateService
.
GetSKUByH3CConfigInfo
(
configSkuInfo
));
public
CrmResponseEntity
<?>
GetSKUByH3CConfigInfo
(
@RequestBody
GetSKUByH3CConfigInfo
configSkuInfo
,
HttpServletRequest
request
){
return
ResultGenerator
.
genSuccessResult
(
integrateService
.
GetSKUByH3CConfigInfo
(
configSkuInfo
,
request
));
}
@PostMapping
(
"/saveSukInfo"
)
@ApiOperation
(
value
=
"保存Sku信息CPQ"
,
notes
=
"applySukCode"
,
httpMethod
=
"POST"
)
public
CrmResponseEntity
<?>
saveSukInfo
(
@RequestBody
SuperBomSkuInfo
superBomSkuInfo
){
return
ResultGenerator
.
genSuccessResult
(
integrateService
.
saveSukInfo
(
superBomSkuInfo
));
public
CrmResponseEntity
<?>
saveSukInfo
(
@RequestBody
SuperBomSkuInfo
superBomSkuInfo
,
HttpServletRequest
request
){
superBomSkuInfo
.
setApplyUser
(
request
.
getHeader
(
"UserCode"
));
return
ResultGenerator
.
genSuccessResult
(
integrateService
.
saveSukInfo
(
superBomSkuInfo
,
request
));
}
...
...
@@ -362,4 +366,9 @@ public class IntegrateController {
return
ResultGenerator
.
genSuccessResult
(
integrateService
.
ldapAuth
(
userinfo
));
}
@GetMapping
(
"/saveUserOperationLog"
)
public
void
saveUserOperationLog
(
HttpServletRequest
request
,
UserOperationLog
log
){
integrateService
.
saveUserOperationLog
(
request
,
log
);
}
}
src/main/java/cn/com/uitech/authorization/controller/SuperBomPriceCalculateController.java
View file @
18539078
...
...
@@ -14,6 +14,7 @@ import org.springframework.web.multipart.MultipartFile;
import
springfox.documentation.annotations.ApiIgnore
;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.Map
;
...
...
@@ -89,7 +90,7 @@ public class SuperBomPriceCalculateController {
*/
@RequestMapping
(
"/batchUpdateByUpload"
)
@ApiOperation
(
value
=
"特征值价格管理 上传文件更新"
,
notes
=
"特征值价格管理 上传文件更新"
,
httpMethod
=
"POST"
)
public
CrmResponseEntity
<?>
batchUpdateByUpload
(
@RequestParam
(
"file"
)
MultipartFile
file
){
return
ResultGenerator
.
genSuccessResult
(
superBomPriceCalculateService
.
batchUpdateByUpload
(
file
));
public
CrmResponseEntity
<?>
batchUpdateByUpload
(
@RequestParam
(
"file"
)
MultipartFile
file
,
HttpServletRequest
request
){
return
ResultGenerator
.
genSuccessResult
(
superBomPriceCalculateService
.
batchUpdateByUpload
(
file
,
request
));
}
}
src/main/java/cn/com/uitech/authorization/controller/TempController.java
View file @
18539078
...
...
@@ -20,10 +20,10 @@ public class TempController {
@Autowired
private
TempServer
tempServer
;
@GetMapping
(
"/deployTemp"
)
/*
@GetMapping("/deployTemp")
@ApiOperation(value = "deployTemp",notes = "模拟调用集成数据",httpMethod = "GET")
public CrmResponseEntity<?> deployTemp(){
return ResultGenerator.genSuccessResult(tempServer.getTempList());
}
}
*/
}
src/main/java/cn/com/uitech/authorization/mapper/CharacteristicMapper.java
View file @
18539078
package
cn
.
com
.
uitech
.
authorization
.
mapper
;
import
cn.com.uitech.authorization.pojo.dto.ApplySkuCodeResultDto
;
import
cn.com.uitech.authorization.pojo.dto.CharacteristicExportDto
;
import
cn.com.uitech.authorization.pojo.dto.CharacteristicRequestParamDto
;
import
cn.com.uitech.authorization.pojo.dto.*
;
import
cn.com.uitech.authorization.pojo.entity.*
;
import
io.swagger.models.auth.In
;
import
org.apache.ibatis.annotations.Mapper
;
import
tk.mybatis.mapper.common.special.InsertListMapper
;
...
...
@@ -89,7 +86,7 @@ public interface CharacteristicMapper extends IBaseMapper<Characteristic>, Inser
void
updateSuperBomSku
(
SuperBomSkuInfo
superBomSkuInfo
);
Integer
updateCharacteristicIsH3C
(
CharacteristicRequestParamDto
dto
);
Integer
updateCharacteristicIsH3C
(
String
characteristicCode
,
String
superBomCode
,
Integer
isH3C
,
String
userCode
);
List
<
Characteristic
>
getCharacteristicH3CList
(
String
superBomCode
);
...
...
@@ -98,4 +95,8 @@ public interface CharacteristicMapper extends IBaseMapper<Characteristic>, Inser
List
<
CharacteristicExportDto
>
exportCharacteristic
(
CharacteristicRequestParamDto
dto
);
void
updateCharacteristicInfo
(
Characteristic
info
);
void
saveLogOpera
(
CharacteristicLogOpera
logOpera
);
void
saveAppluOpera
(
String
httpEntity
,
String
userCode
,
String
plmUrl
);
}
src/main/java/cn/com/uitech/authorization/mapper/CharacteristicValueMapper.java
View file @
18539078
...
...
@@ -34,10 +34,9 @@ public interface CharacteristicValueMapper extends IBaseMapper<CharacteristicVal
/**
* 批量更新特征值状态
* @param dto
* @return 更新的行数
*/
Integer
batchModifyBomStatus
(
CharacteristicValueRequestParamDto
dto
);
Integer
batchModifyBomStatus
(
String
characteristicValueCode
,
String
superBomCode
,
Integer
isState
,
String
updateUser
);
/**
* 保存编辑页面的修改的特征数据
...
...
@@ -109,4 +108,8 @@ public interface CharacteristicValueMapper extends IBaseMapper<CharacteristicVal
CharacteristicValue
getCharacteristicValueInfoByCCode
(
String
isH3cCode
,
String
superBomCode
);
void
updateCharacteristicValue
(
CharacteristicValue
v
);
void
saveLogOpera
(
CharacteristicValueLogOpera
logOpera
);
CharacteristicValue
getVByCode
(
String
characteristicValueCode
,
String
superBomCode
);
}
src/main/java/cn/com/uitech/authorization/mapper/CtoBomMapper.java
View file @
18539078
...
...
@@ -46,13 +46,6 @@ public interface CtoBomMapper extends IBaseMapper<ConfigurableBom>
*/
Integer
updateIsPresaleByBomCode
(
CtoBomRequestParamDto
ctoBomRequestParamDto
);
/**
* 根据code查询cto物料信息
* @param bomTypeId
* @param productGroupCode
* @return
*/
Integer
selectInfoByCode
(
Integer
bomTypeId
,
String
productGroupCode
);
/**
* 根据产品组,层次id查询所有的cto物料
...
...
@@ -61,28 +54,6 @@ public interface CtoBomMapper extends IBaseMapper<ConfigurableBom>
List
<
ConfigurableBom
>
getCtoBomCodeNameAll
(
CtoBomRequestParamDto
dto
);
/**
* @param componentCargoDto
* @return 根据产品组,统一名称查询所有的cto 名称,统一编码,产品编码,产品名称受控状态
*/
List
<
ComponentCargoDto
>
getCtoScopeNameAll
(
ComponentCargoDto
componentCargoDto
);
/**
* 新增产品od关系时返回常规特配列表
* @param bomCode
* @param productGroupCode
* @param name
* @return
*/
List
<
OdProductResultDto
>
selectOdProductByPage
(
String
bomCode
,
String
productGroupCode
,
String
name
);
/**
* @param dto
* @return 商机立项时 添加基准机型时 CTO下拉列表
*/
List
<
ConfigurableBom
>
getCtoComboBox
(
CtoBomRequestParamDto
dto
);
/**
* @param dto
* @return Integer
* @desc 更新cot的configId 根据bomcode
...
...
@@ -100,15 +71,13 @@ public interface CtoBomMapper extends IBaseMapper<ConfigurableBom>
ConfigurableBom
getCtoBom
(
SelectorEntity
selectorEntity
);
ConfigurableBom
getSuperBomInfo
(
BuildConfigurationInputDTO
buildConfigurationInputDTO
);
String
getSuperBomInfoBySuperBomCode
(
String
skuCode
);
SuperBomSkuInfo
getSkuInfo
(
GetSkuInputInfo
getSkuInputInfo
);
ConfigurableBom
getConfigId
(
String
h3cPn
);
ProductGroup
getProductGroup
(
String
classification
);
ConfigurableBom
getCto
(
String
superBomCode
);
void
saveLogOpera
(
ConfigurableBomLogOpera
logOpera
);
}
src/main/java/cn/com/uitech/authorization/mapper/ProductDescriptionMapper.java
deleted
100644 → 0
View file @
73a78212
package
cn
.
com
.
uitech
.
authorization
.
mapper
;
import
cn.com.uitech.authorization.pojo.entity.ProductDescription
;
import
org.apache.ibatis.annotations.Mapper
;
/**
* @author yangkuo
* @date 2020/4/19 12:49
*/
@Mapper
public
interface
ProductDescriptionMapper
extends
IBaseMapper
<
ProductDescription
>
{
Integer
updateByBomCode
(
ProductDescription
productDescription
);
}
src/main/java/cn/com/uitech/authorization/mapper/SuperBomPriceCalculateMapper.java
View file @
18539078
package
cn
.
com
.
uitech
.
authorization
.
mapper
;
import
cn.com.uitech.authorization.pojo.dto.CharacteristicValueExportDto
;
import
cn.com.uitech.authorization.pojo.dto.CharacteristicsLogOpera
;
import
cn.com.uitech.authorization.pojo.dto.SuperCharacterPriceInfoDto
;
import
cn.com.uitech.authorization.pojo.entity.*
;
import
org.apache.ibatis.annotations.Mapper
;
...
...
@@ -52,4 +53,8 @@ public interface SuperBomPriceCalculateMapper {
List
<
SuperCharacterPriceInfoDto
>
exportCharacteristicValuePrice
(
CharacteristicValueExportDto
dto
);
void
updateCharacteristicInfo
(
Characteristics
info
);
Characteristics
getPriceByCode
(
String
superBomCode
,
String
characteristicCode
,
String
characteristicValueCode
);
void
saveLogOpera
(
CharacteristicsLogOpera
logOpera
);
}
src/main/java/cn/com/uitech/authorization/mapper/UserInfoMapper.java
View file @
18539078
...
...
@@ -2,6 +2,7 @@ package cn.com.uitech.authorization.mapper;
import
cn.com.uitech.authorization.pojo.entity.MenuInfo
;
import
cn.com.uitech.authorization.pojo.entity.UserInfo
;
import
cn.com.uitech.authorization.pojo.entity.UserOperationLog
;
import
org.apache.ibatis.annotations.Mapper
;
import
java.util.List
;
...
...
@@ -13,4 +14,6 @@ public interface UserInfoMapper extends IBaseMapper<UserInfo> {
List
<
MenuInfo
>
getUserDimension
(
String
userCode
);
UserInfo
getUserOne
(
UserInfo
userinfo
);
void
saveUserOperationLog
(
UserOperationLog
log
);
}
src/main/java/cn/com/uitech/authorization/pojo/dto/CharacteristicLogOpera.java
0 → 100644
View file @
18539078
package
cn
.
com
.
uitech
.
authorization
.
pojo
.
dto
;
import
cn.com.uitech.authorization.pojo.entity.CharacteristicValue
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Getter
;
import
lombok.NoArgsConstructor
;
import
lombok.Setter
;
import
lombok.ToString
;
import
lombok.experimental.Accessors
;
import
javax.persistence.Column
;
import
javax.persistence.Table
;
import
javax.persistence.Transient
;
import
java.io.Serializable
;
import
java.sql.Timestamp
;
import
java.util.List
;
/**
* @author yangkuo
* @createDate 2020/4/19 12:49
* 特征管理 实体类
*/
@Accessors
(
chain
=
true
)
@NoArgsConstructor
@Getter
@Setter
@ToString
@ApiModel
(
value
=
"SuperCharacteristicInfo"
,
description
=
"特征实体类"
)
@Table
(
name
=
"super_characteristic_info_log_opera"
)
public
class
CharacteristicLogOpera
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
3954244891629408852L
;
@Column
(
name
=
"super_bom_code"
)
@ApiModelProperty
(
name
=
"superBomCode"
,
value
=
"物料编码"
,
dataType
=
"String"
)
private
String
superBomCode
;
@Column
(
name
=
"characteristic_code"
)
@ApiModelProperty
(
name
=
"characteristicCode"
,
value
=
"特征编码"
,
dataType
=
"String"
)
private
String
characteristicCode
;
@Column
(
name
=
"characteristic_name"
)
@ApiModelProperty
(
name
=
"characteristicName"
,
value
=
"特征名字"
,
dataType
=
"String"
)
private
String
characteristicName
;
@Column
(
name
=
"is_show"
)
@ApiModelProperty
(
name
=
"isShow"
,
value
=
"是否显示"
,
dataType
=
"Integer"
,
example
=
"1/0"
)
private
Integer
isShow
;
@Column
(
name
=
"unis_sales_c_name"
)
@ApiModelProperty
(
name
=
"UnisSalesCName"
,
value
=
"销售特征名称"
,
dataType
=
"String"
)
private
String
unisSalesCName
;
@Column
(
name
=
"h3c_c_code"
)
@ApiModelProperty
(
name
=
"H3CCCode"
,
value
=
"H3C对照关系"
,
dataType
=
"String"
)
private
String
H3CCCode
;
@Column
(
name
=
"characteristic_type"
)
@ApiModelProperty
(
name
=
"characteristicType"
,
value
=
"是否数量型"
,
dataType
=
"String"
)
private
String
characteristicType
;
@Column
(
name
=
"is_hidden"
)
@ApiModelProperty
(
name
=
"isHidden"
,
value
=
"是否隐藏"
,
dataType
=
"Integer"
,
example
=
"1/0"
)
private
Integer
isHidden
;
@Column
(
name
=
"is_h3c"
)
@ApiModelProperty
(
name
=
"isH3C"
,
value
=
"isH3C"
,
dataType
=
"Integer"
,
example
=
"1/0"
)
private
Integer
isH3C
;
@Column
(
name
=
"sort"
)
@ApiModelProperty
(
name
=
"sort"
,
value
=
"sort"
,
dataType
=
"Integer"
,
example
=
"1/0"
)
private
Integer
sort
;
@Column
(
name
=
"update_time"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Timestamp
updateTime
;
@Column
(
name
=
"update_user"
)
private
String
updateUser
;
private
String
opera
;
@Transient
@ApiModelProperty
(
name
=
"superBomName"
,
value
=
"superBomName"
,
dataType
=
"String"
)
private
String
superBomName
;
@Transient
@ApiModelProperty
(
name
=
"ProductClassCode"
,
value
=
"ProductClassCode"
,
dataType
=
"String"
)
private
String
productClassCode
;
@Transient
@ApiModelProperty
(
name
=
"productClassName"
,
value
=
"productClassName"
,
dataType
=
"String"
)
private
String
productClassName
;
@Transient
@ApiModelProperty
(
name
=
"brand"
,
value
=
"brand"
,
dataType
=
"String"
)
private
String
brand
;
@Transient
@ApiModelProperty
(
name
=
"h3cPn"
,
value
=
"getH3cPn"
,
dataType
=
"String"
)
private
String
h3cPn
;
private
List
<
CharacteristicValue
>
characteristicValueList
;
}
src/main/java/cn/com/uitech/authorization/pojo/dto/CharacteristicRequestParamDto.java
View file @
18539078
...
...
@@ -3,6 +3,7 @@ package cn.com.uitech.authorization.pojo.dto;
import
cn.com.uitech.authorization.annotation.BathUpdate
;
import
cn.com.uitech.authorization.annotation.EditSave
;
import
cn.com.uitech.authorization.annotation.Query
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.*
;
import
lombok.experimental.Accessors
;
...
...
@@ -12,6 +13,9 @@ import javax.validation.constraints.NotBlank;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.Size
;
import
java.io.Serializable
;
import
java.sql.Timestamp
;
import
java.util.List
;
import
java.util.Map
;
/**
* @author yangkuo
...
...
@@ -56,6 +60,7 @@ public class CharacteristicRequestParamDto extends BasePageDto implements Seria
private
Integer
isH3C
;
@ApiModelProperty
(
name
=
"sort"
,
value
=
"排序"
,
dataType
=
"Integer"
)
private
Integer
sort
;
private
Integer
isShow
;
@ApiModelProperty
(
name
=
"plmName"
,
value
=
"plm名称"
,
dataType
=
"String"
)
...
...
@@ -65,10 +70,14 @@ public class CharacteristicRequestParamDto extends BasePageDto implements Seria
@ApiModelProperty
(
name
=
"brand"
,
value
=
"品牌"
,
dataType
=
"String"
)
private
String
brand
;
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Timestamp
updateTime
;
private
String
updateUser
;
/**
* 批量更新接口
*/
@ApiModelProperty
(
name
=
"characteristicCodes"
,
value
=
"特征值编码数组"
,
dataType
=
"String"
)
private
String
[]
characteristicCodes
;
private
List
<
Map
<
String
,
String
>>
characteristicCodes
;
}
src/main/java/cn/com/uitech/authorization/pojo/dto/CharacteristicValueLogOpera.java
0 → 100644
View file @
18539078
package
cn
.
com
.
uitech
.
authorization
.
pojo
.
dto
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Getter
;
import
lombok.NoArgsConstructor
;
import
lombok.Setter
;
import
lombok.ToString
;
import
lombok.experimental.Accessors
;
import
javax.persistence.Column
;
import
javax.persistence.Table
;
import
javax.persistence.Transient
;
import
java.io.Serializable
;
import
java.sql.Timestamp
;
/**
* @author yangkuo
* @date 2020/4/19 12:49
* 特征值管理 实体类
*/
@Accessors
(
chain
=
true
)
@NoArgsConstructor
@Getter
@Setter
@ToString
@ApiModel
(
value
=
"superCharacteristicValueInfo"
,
description
=
"特征值实体类"
)
@Table
(
name
=
"super_characteristic_value_info_log_opera"
)
public
class
CharacteristicValueLogOpera
implements
Serializable
{
@Column
(
name
=
"super_bom_code"
)
@ApiModelProperty
(
name
=
"superBomCode"
,
value
=
"物料编号"
,
dataType
=
"String"
)
private
String
superBomCode
;
@Column
(
name
=
"super_bom_name"
)
@ApiModelProperty
(
name
=
"superBomName"
,
value
=
"物料编号名称"
,
dataType
=
"String"
)
private
String
superBomName
;
@Column
(
name
=
"characteristic_Value_Code"
)
@ApiModelProperty
(
name
=
"characteristicValueCode"
,
value
=
"物料特征值编号"
,
dataType
=
"String"
)
private
String
characteristicValueCode
;
@Column
(
name
=
"characteristic_value_name"
)
@ApiModelProperty
(
name
=
"characteristicValueName"
,
value
=
"物料特征值名称"
,
dataType
=
"String"
)
private
String
characteristicValueName
;
@Column
(
name
=
"characteristic_Code"
)
@ApiModelProperty
(
name
=
"characteristicCode"
,
value
=
"物料特征编号"
,
dataType
=
"String"
)
private
String
characteristicCode
;
@Transient
@ApiModelProperty
(
name
=
"characteristicName"
,
value
=
"物料特征名称"
,
dataType
=
"String"
)
private
String
characteristicName
;
@Column
(
name
=
"is_state"
)
@ApiModelProperty
(
name
=
"isState"
,
value
=
"是否启用"
,
dataType
=
"Integer"
,
example
=
"1/0"
)
private
Integer
isState
;
@Transient
@ApiModelProperty
(
name
=
"superBomIsState"
,
value
=
"CTO是否启用"
,
dataType
=
"Integer"
,
example
=
"1/0"
)
private
Integer
superBomIsState
;
@Column
(
name
=
"is_base"
)
@ApiModelProperty
(
name
=
"is_base"
,
value
=
"是否基准"
,
dataType
=
"String"
,
example
=
"1/0"
)
private
Integer
isBase
;
@Column
(
name
=
"is_show"
)
@ApiModelProperty
(
name
=
"isShow"
,
value
=
"可见控制,全部可见为1,PM为2,销售为3"
,
dataType
=
"String"
)
private
Integer
isShow
;
@Column
(
name
=
"zph_code"
)
@ApiModelProperty
(
name
=
"zphCode"
,
value
=
"zphCode"
,
dataType
=
"String"
)
private
String
zphCode
;
@Column
(
name
=
"zph_name"
)
@ApiModelProperty
(
name
=
"zphName"
,
value
=
"zphName"
,
dataType
=
"String"
)
private
String
zphName
;
@Column
(
name
=
"qualify_date"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@ApiModelProperty
(
name
=
"qualifyDate"
,
value
=
"开始时间"
,
dataType
=
"Timestamp"
)
private
Timestamp
qualifyDate
;
@Column
(
name
=
"unis_sales_v_name"
)
@ApiModelProperty
(
name
=
"unisSalesVName"
,
value
=
"销售特征值名称"
,
dataType
=
"String"
)
private
String
unisSalesVName
;
@Column
(
name
=
"h3c_c_value"
)
@ApiModelProperty
(
name
=
"h3cCValue"
,
value
=
"H3C对照关系"
,
dataType
=
"String"
)
private
String
h3cCValue
;
@Column
(
name
=
"h3c_deliver_code"
)
@ApiModelProperty
(
name
=
"h3cDeliverCode"
,
value
=
"H3C交付代码"
,
dataType
=
"String"
)
private
String
h3cDeliverCode
;
@Column
(
name
=
"is_h3c"
)
@ApiModelProperty
(
name
=
"isH3C"
,
value
=
"特征列表是否H3C"
,
dataType
=
"Integer"
)
private
Integer
isH3C
;
@Transient
@ApiModelProperty
(
name
=
"bomStatus"
,
value
=
"物料状态"
,
dataType
=
"String"
)
private
String
bomStatus
;
@Transient
@ApiModelProperty
(
name
=
"bomName"
,
value
=
"物料名称"
,
dataType
=
"String"
)
private
String
bomName
;
@Transient
@ApiModelProperty
(
name
=
"brand"
,
value
=
"品牌"
,
dataType
=
"String"
)
private
String
brand
;
@Transient
@ApiModelProperty
(
name
=
"productClassCode"
,
value
=
"产品分类"
,
dataType
=
"String"
)
private
String
productClassCode
;
@Transient
@ApiModelProperty
(
name
=
"UnisSalesCName"
,
value
=
"产品分类"
,
dataType
=
"String"
)
private
String
unisSalesCName
;
@Transient
@ApiModelProperty
(
name
=
"H3cCCode"
,
value
=
"产品分类"
,
dataType
=
"String"
)
private
String
h3cCCode
;
@Column
(
name
=
"update_time"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Timestamp
updateTime
;
@Column
(
name
=
"update_user"
)
private
String
updateUser
;
@Column
(
name
=
"opera"
)
private
String
opera
;
}
src/main/java/cn/com/uitech/authorization/pojo/dto/CharacteristicValueRequestParamDto.java
View file @
18539078
...
...
@@ -2,6 +2,7 @@ package cn.com.uitech.authorization.pojo.dto;
import
cn.com.uitech.authorization.annotation.BathUpdate
;
import
cn.com.uitech.authorization.annotation.Query
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.*
;
import
lombok.experimental.Accessors
;
...
...
@@ -10,6 +11,9 @@ import javax.persistence.Entity;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
java.io.Serializable
;
import
java.sql.Timestamp
;
import
java.util.List
;
import
java.util.Map
;
/**
* @author yangkuo
...
...
@@ -51,7 +55,7 @@ public class CharacteristicValueRequestParamDto extends BasePageDto implements S
@NotNull
(
message
=
"缺少特征值编码"
,
groups
=
BathUpdate
.
class
)
@ApiModelProperty
(
name
=
"characteristicValueCodes"
,
value
=
"特征值编码"
,
dataType
=
"String"
)
private
String
[]
characteristicValueCodes
;
private
List
<
Map
<
String
,
String
>>
characteristicValueCodes
;
@ApiModelProperty
(
name
=
"plmName"
,
value
=
"plm名称"
,
dataType
=
"String"
)
...
...
@@ -69,4 +73,9 @@ public class CharacteristicValueRequestParamDto extends BasePageDto implements S
*/
@ApiModelProperty
(
name
=
"status"
,
value
=
"特征是否可卖"
,
dataType
=
"Integer"
)
private
Integer
status
;
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Timestamp
updateTime
;
private
String
updateUser
;
}
src/main/java/cn/com/uitech/authorization/pojo/dto/CharacteristicsLogOpera.java
0 → 100644
View file @
18539078
package
cn
.
com
.
uitech
.
authorization
.
pojo
.
dto
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
lombok.Data
;
import
javax.persistence.Column
;
import
java.math.BigDecimal
;
import
java.sql.Timestamp
;
/**
* @Author: ZXN
* @Date: 2021/11/25/16:55
* @Description:
* @version: 1.0
* This Class Created with IntelliJ IDEA 2019.1.4
*/
@Data
public
class
CharacteristicsLogOpera
{
private
String
characteristicCode
;
private
String
characteristicName
;
private
String
unisSalesCName
;
private
String
h3cCCode
;
private
String
characteristicValueCode
;
private
String
characteristicValueName
;
private
String
zphCode
;
private
String
zphName
;
private
String
unisSalesVName
;
private
String
h3cCValue
;
private
String
h3cCName
;
private
String
superBomCode
;
/**
* 真实成本价
*/
private
BigDecimal
actualPrice
;
/**
private * 标准成本价
private */
private
BigDecimal
leve0Price
;
/**
* 一级价格调整价
*/
private
BigDecimal
leve1Price
;
/**
* 二级价格调整价
*/
private
BigDecimal
leve2Price
;
/**
* 三级价格调整价
*/
private
BigDecimal
leve3Price
;
/**
* 四级价格调整价
*/
private
BigDecimal
leve4Price
;
/**
* 代理价
*/
private
BigDecimal
agentPrice
;
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Timestamp
updateTime
;
private
String
updateUser
;
private
String
opera
;
}
src/main/java/cn/com/uitech/authorization/pojo/dto/ConfigurableBomLogOpera.java
0 → 100644
View file @
18539078
package
cn
.
com
.
uitech
.
authorization
.
pojo
.
dto
;
import
cn.com.uitech.authorization.pojo.entity.Characteristic
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Getter
;
import
lombok.NoArgsConstructor
;
import
lombok.Setter
;
import
lombok.ToString
;
import
lombok.experimental.Accessors
;
import
javax.persistence.Column
;
import
javax.persistence.Table
;
import
javax.persistence.Transient
;
import
java.io.Serializable
;
import
java.sql.Timestamp
;
import
java.util.List
;
/**
* @author yangkuo
* @createDate 2020/4/19 12:49
* Cto物料维护 实体类
*/
@Accessors
(
chain
=
true
)
@NoArgsConstructor
@Getter
@Setter
@ToString
@ApiModel
(
value
=
"super_bom_info_log_opera"
,
description
=
"cto实体类"
)
@Table
(
name
=
"super_bom_info_log_opera"
)
public
class
ConfigurableBomLogOpera
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
4988257241712574537L
;
@Column
(
name
=
"super_bom_code"
)
@ApiModelProperty
(
name
=
"superBomCode"
,
value
=
"物料编码"
,
dataType
=
"String"
)
private
String
superBomCode
;
@Column
(
name
=
"super_bom_name"
)
@ApiModelProperty
(
name
=
"superBomName"
,
value
=
"cto名字"
,
dataType
=
"String"
)
private
String
superBomName
;
@Column
(
name
=
"product_class_code"
)
@ApiModelProperty
(
name
=
"productClassCode"
,
value
=
"产品组编号"
,
dataType
=
"String"
)
private
String
productClassCode
;
@Column
(
name
=
"product_class_name"
)
@ApiModelProperty
(
name
=
"productClassName"
,
value
=
"产品组编号"
,
dataType
=
"String"
)
private
String
productClassName
;
@Column
(
name
=
"is_state"
)
@ApiModelProperty
(
name
=
"isState"
,
value
=
"可卖状态"
,
dataType
=
"Integer"
)
private
Integer
isState
;
@Column
(
name
=
"config_id"
)
@ApiModelProperty
(
name
=
"configId"
,
value
=
"基准机型选择配置标识"
,
dataType
=
"String"
)
private
String
configId
;
@Column
(
name
=
"description"
)
@ApiModelProperty
(
name
=
"description"
,
value
=
"备注信息"
,
dataType
=
"String"
)
private
String
description
;
/**
*
*/
@Column
(
name
=
"type"
)
@ApiModelProperty
(
name
=
"type"
,
value
=
"类型"
,
dataType
=
"String"
)
private
String
type
;
/**
*
*/
@Column
(
name
=
"model_status"
)
@ApiModelProperty
(
name
=
"modelStatus"
,
value
=
"物料状态"
,
dataType
=
"String"
)
private
String
modelStatus
;
/**
* CTO类型 1/2
*/
@Column
(
name
=
"revision"
)
@ApiModelProperty
(
name
=
"revision"
,
value
=
"版本"
,
dataType
=
"Integer"
)
private
String
revision
;
@Column
(
name
=
"h3c_pn"
)
@ApiModelProperty
(
name
=
"h3cpn"
,
value
=
"h3cpn"
,
dataType
=
"String"
)
private
String
h3cPn
;
@Column
(
name
=
"brand"
)
@ApiModelProperty
(
name
=
"brand"
,
value
=
"brand"
,
dataType
=
"String"
)
private
String
brand
;
@Column
(
name
=
"unis_sales_name"
)
@ApiModelProperty
(
name
=
"unisSalesName"
,
value
=
"Unis销售名称"
,
dataType
=
"String"
)
private
String
unisSalesName
;
@Column
(
name
=
"update_time"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Timestamp
updateTime
;
@Column
(
name
=
"update_user"
)
private
String
updateUser
;
@Column
(
name
=
"opera"
)
private
String
opera
;
}
src/main/java/cn/com/uitech/authorization/pojo/dto/CtoBomRequestParamDto.java
View file @
18539078
...
...
@@ -16,6 +16,7 @@ import javax.validation.constraints.Min;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
java.io.Serializable
;
import
java.sql.Timestamp
;
import
java.util.List
;
/**
...
...
@@ -57,6 +58,11 @@ public class CtoBomRequestParamDto extends BasePageDto implements Serializable{
@ApiModelProperty
(
name
=
"plmName"
,
value
=
"plm名称"
,
dataType
=
"String"
)
private
String
plmName
;
private
String
token
;
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Timestamp
updateTime
;
private
String
updateUser
;
private
List
<
String
>
superBomCodes
;
...
...
src/main/java/cn/com/uitech/authorization/pojo/entity/Characteristic.java
View file @
18539078
package
cn
.
com
.
uitech
.
authorization
.
pojo
.
entity
;
import
cn.com.uitech.authorization.pojo.dto.CharacteristicValueDto
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Getter
;
...
...
@@ -11,6 +12,7 @@ import lombok.experimental.Accessors;
import
javax.persistence.*
;
import
java.io.Serializable
;
import
java.sql.Timestamp
;
import
java.util.List
;
/**
...
...
@@ -66,7 +68,11 @@ public class Characteristic implements Serializable{
@Column
(
name
=
"sort"
)
@ApiModelProperty
(
name
=
"sort"
,
value
=
"sort"
,
dataType
=
"Integer"
,
example
=
"1/0"
)
private
Integer
sort
;
@Column
(
name
=
"update_time"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Timestamp
updateTime
;
@Column
(
name
=
"update_user"
)
private
String
updateUser
;
@Transient
@ApiModelProperty
(
name
=
"superBomName"
,
value
=
"superBomName"
,
dataType
=
"String"
)
...
...
src/main/java/cn/com/uitech/authorization/pojo/entity/CharacteristicValue.java
View file @
18539078
...
...
@@ -101,6 +101,13 @@ public class CharacteristicValue extends BasePageDto implements Serializable{
@ApiModelProperty
(
name
=
"isH3C"
,
value
=
"特征列表是否H3C"
,
dataType
=
"Integer"
)
private
Integer
isH3C
;
@Column
(
name
=
"update_time"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Timestamp
updateTime
;
@Column
(
name
=
"update_user"
)
private
String
updateUser
;
@Transient
@ApiModelProperty
(
name
=
"bomStatus"
,
value
=
"物料状态"
,
dataType
=
"String"
)
private
String
bomStatus
;
...
...
src/main/java/cn/com/uitech/authorization/pojo/entity/Characteristics.java
View file @
18539078
package
cn
.
com
.
uitech
.
authorization
.
pojo
.
entity
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
lombok.Data
;
import
javax.persistence.Column
;
import
javax.persistence.Table
;
import
java.math.BigDecimal
;
import
java.sql.Timestamp
;
/**
* @Author: ZXN
...
...
@@ -12,11 +16,14 @@ import java.math.BigDecimal;
* This Class Created with IntelliJ IDEA 2019.1.4
*/
@Data
@Table
(
name
=
"super_character_price_info"
)
public
class
Characteristics
{
@Column
(
name
=
"character_code"
)
private
String
characteristicCode
;
private
String
characteristicName
;
private
String
unisSalesCName
;
private
String
h3cCCode
;
@Column
(
name
=
"character_value_code"
)
private
String
characteristicValueCode
;
private
String
characteristicValueName
;
private
String
zphCode
;
...
...
@@ -24,33 +31,47 @@ public class Characteristics {
private
String
unisSalesVName
;
private
String
h3cCValue
;
private
String
h3cCName
;
@Column
(
name
=
"super_bom_code"
)
private
String
superBomCode
;
/**
* 真实成本价
*/
@Column
(
name
=
"actual_price"
)
private
BigDecimal
actualPrice
;
/**
private * 标准成本价
private */
@Column
(
name
=
"leve0_price"
)
private
BigDecimal
leve0Price
;
/**
* 一级价格调整价
*/
@Column
(
name
=
"leve1_price"
)
private
BigDecimal
leve1Price
;
/**
* 二级价格调整价
*/
@Column
(
name
=
"leve2_price"
)
private
BigDecimal
leve2Price
;
/**
* 三级价格调整价
*/
@Column
(
name
=
"leve3_price"
)
private
BigDecimal
leve3Price
;
/**
* 四级价格调整价
*/
@Column
(
name
=
"leve4_price"
)
private
BigDecimal
leve4Price
;
/**
* 代理价
*/
@Column
(
name
=
"agent_price"
)
private
BigDecimal
agentPrice
;
@Column
(
name
=
"update_time"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Timestamp
updateTime
;
@Column
(
name
=
"update_user"
)
private
String
updateUser
;
}
src/main/java/cn/com/uitech/authorization/pojo/entity/ProductDescription.java
deleted
100644 → 0
View file @
73a78212
package
cn
.
com
.
uitech
.
authorization
.
pojo
.
entity
;
import
lombok.Getter
;
import
lombok.NoArgsConstructor
;
import
lombok.Setter
;
import
lombok.ToString
;
import
lombok.experimental.Accessors
;
import
javax.persistence.Column
;
import
javax.persistence.Table
;
import
java.io.Serializable
;
/**
* @author yangkuo
* @date 2020/4/19 12:49
* 对应页面产品描述文本框
*/
@Accessors
(
chain
=
true
)
@NoArgsConstructor
@Getter
@Setter
@ToString
@Table
(
name
=
"productDescription"
)
public
class
ProductDescription
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
3501128782101395652L
;
@Column
(
name
=
"super_bom_code"
)
private
String
superBomCode
;
@Column
(
name
=
"product_class_code"
)
private
String
productClassCode
;
@Column
(
name
=
"type"
)
private
Integer
type
;
@Column
(
name
=
"product_description"
)
private
String
productDescription
;
@Column
(
name
=
"originalPGCode"
)
private
String
originalPGCode
;
}
src/main/java/cn/com/uitech/authorization/pojo/entity/UserOperationLog.java
0 → 100644
View file @
18539078
package
cn
.
com
.
uitech
.
authorization
.
pojo
.
entity
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
lombok.Data
;
import
javax.persistence.Column
;
import
javax.persistence.Table
;
import
java.sql.Timestamp
;
@Data
@Table
(
name
=
"user_operation_log"
)
public
class
UserOperationLog
{
@Column
(
name
=
"id"
)
private
String
id
;
@Column
(
name
=
"user_code"
)
private
String
userCode
;
@Column
(
name
=
"update_time"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Timestamp
updateTime
;
@Column
(
name
=
"msg"
)
private
String
msg
;
}
src/main/java/cn/com/uitech/authorization/service/CharacteristicService.java
View file @
18539078
...
...
@@ -7,6 +7,7 @@ import cn.com.uitech.authorization.pojo.entity.Characteristic;
import
com.github.pagehelper.PageInfo
;
import
org.springframework.web.multipart.MultipartFile
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
import
java.io.UnsupportedEncodingException
;
...
...
@@ -32,7 +33,7 @@ public interface CharacteristicService {
* @param characteristicRequestParamDto
* @return 受影响的行数
*/
Integer
updateCharacteristic
(
CharacteristicRequestParamDto
characteristicRequestParamDto
);
Integer
updateCharacteristic
(
CharacteristicRequestParamDto
characteristicRequestParamDto
,
HttpServletRequest
request
);
/**
* 跟新是否可显示列
...
...
@@ -57,10 +58,10 @@ public interface CharacteristicService {
void
insertList
(
List
<
Characteristic
>
characteristics
);
Object
updateCharacteristicIsH3C
(
CharacteristicRequestParamDto
dto
);
Object
updateCharacteristicIsH3C
(
CharacteristicRequestParamDto
dto
,
HttpServletRequest
request
);
void
exportCharacteristic
(
CharacteristicRequestParamDto
dto
,
HttpServletResponse
response
)
throws
ParseException
,
IOException
;
Object
batchUpdateByUpload
(
MultipartFile
file
);
Object
batchUpdateByUpload
(
MultipartFile
file
,
HttpServletRequest
request
);
}
src/main/java/cn/com/uitech/authorization/service/CharacteristicValueService.java
View file @
18539078
...
...
@@ -8,6 +8,7 @@ import com.alibaba.fastjson.JSONObject;
import
com.github.pagehelper.PageInfo
;
import
org.springframework.web.multipart.MultipartFile
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
...
...
@@ -37,14 +38,14 @@ public interface CharacteristicValueService {
* @param dto
* @return 插入的行数
*/
Integer
batchModifyBomStatus
(
CharacteristicValueRequestParamDto
dto
);
Integer
batchModifyBomStatus
(
CharacteristicValueRequestParamDto
dto
,
HttpServletRequest
request
);
/**
* 保存编辑页面的修改的特征数据
* @param dto
* @return 插入的条数
*/
Integer
editCharacteristicValue
(
CharacteristicValue
dto
);
Integer
editCharacteristicValue
(
CharacteristicValue
dto
,
HttpServletRequest
request
);
/**
* 根据统一名称模糊查询 指定产品组下的所有名称
...
...
@@ -72,7 +73,7 @@ public interface CharacteristicValueService {
* @param file
* @return
*/
Object
batchUpdateByUpload
(
MultipartFile
file
);
Object
batchUpdateByUpload
(
MultipartFile
file
,
HttpServletRequest
request
);
/**
* @desc 询配询价 导出可用配置和OD关系表
...
...
src/main/java/cn/com/uitech/authorization/service/CtoBomService.java
View file @
18539078
package
cn
.
com
.
uitech
.
authorization
.
service
;
import
cn.com.uitech.authorization.pojo.dto.*
;
import
cn.com.uitech.authorization.pojo.dto.ComponentCargoDto
;
import
cn.com.uitech.authorization.pojo.dto.CtoBomRequestParamDto
;
import
cn.com.uitech.authorization.pojo.entity.BomStatusEntity
;
import
cn.com.uitech.authorization.pojo.entity.ConfigurableBom
;
import
com.github.pagehelper.PageInfo
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.List
;
/**
...
...
@@ -26,7 +28,7 @@ public interface CtoBomService {
* @param ctoBomRequestParamDto
* @return 受影响的行数
*/
Integer
updateCtoBomByBomCode
(
CtoBomRequestParamDto
ctoBomRequestParamDto
);
Integer
updateCtoBomByBomCode
(
CtoBomRequestParamDto
ctoBomRequestParamDto
,
HttpServletRequest
request
);
/**
*根据bomcode获取单个cto物料信息
...
...
@@ -34,43 +36,13 @@ public interface CtoBomService {
*/
ConfigurableBom
getCtoBomsByCode
(
String
superBomCode
,
String
productClassCode
);
/**
* 批量更新是否可卖
* @param ctoBomRequestParamDto
* @return 受影响的行数
*/
Integer
updateIsPresaleByBomCode
(
CtoBomRequestParamDto
ctoBomRequestParamDto
);
/**
* 根据产品组,层次id查询所有的cto物料
* @param bom
*/
List
<
ConfigurableBom
>
getCtoBomCodeNameAll
(
CtoBomRequestParamDto
bom
);
/**
* @param componentCargoDto
* @return 根据产品组,统一名称查询所有的cto 名称,统一编码,产品编码,产品名称受控状态
*/
List
<
ComponentCargoDto
>
getCtoScopeNameAll
(
ComponentCargoDto
componentCargoDto
);
/**
* @param dto
* @return 商机立项时 添加基准机型时 CTO下拉列表
*/
List
<
ConfigurableBom
>
getCtoComboBox
(
CtoBomRequestParamDto
dto
);
/**
* @param bomStatusEntity
* @return PageInfo
* @desc cto 客户处可卖批量更新
*/
void
updateInsertCustomerbelongtoByBom
(
BomStatusEntity
bomStatusEntity
);
void
insertCto
(
List
<
ConfigurableBom
>
configurableBoms
);
Object
getProductGroupList
();
PageInfo
<
ConfigurableBom
>
getCtoBom
(
CtoBomRequestParamDto
ctoBomRequestParamDto
);
Integer
updateIsPresaleByBomCode
(
CtoBomRequestParamDto
ctoBomRequestParamDto
,
HttpServletRequest
request
);
List
<
ConfigurableBom
>
getCtoBomCodeNameAll
(
CtoBomRequestParamDto
dto
);
}
src/main/java/cn/com/uitech/authorization/service/IntegrateService.java
View file @
18539078
...
...
@@ -5,6 +5,7 @@ import cn.com.uitech.authorization.pojo.dto.*;
import
cn.com.uitech.authorization.pojo.entity.*
;
import
com.github.pagehelper.PageInfo
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -27,17 +28,17 @@ public interface IntegrateService {
Object
getSuperBomInfoByConfigId
(
Map
<
String
,
Object
>
map
);
Object
GetSKUByH3CConfigInfo
(
GetSKUByH3CConfigInfo
configSkuInfo
);
Object
GetSKUByH3CConfigInfo
(
GetSKUByH3CConfigInfo
configSkuInfo
,
HttpServletRequest
request
);
Object
getConfigInfo
(
GetConfigurationInputDTO
getConfigurationInputDTO
);
Object
saveSukInfo
(
SuperBomSkuInfo
superBomSkuInfo
);
Object
saveSukInfo
(
SuperBomSkuInfo
superBomSkuInfo
,
HttpServletRequest
request
);
Characteristic
getCNameByCode
(
String
characteristicName
,
String
superBomCode
);
Object
GetSKUByConfigInfo
(
SuperBomSkuInfo
superBomSkuInfo
);
Object
GetSKUByConfigInfo
(
SuperBomSkuInfo
superBomSkuInfo
,
HttpServletRequest
request
);
Object
GetConfigBySUKINFO
(
SuperBomSkuInfo
superBomSkuInfo
);
Object
GetConfigBySUKINFO
(
SuperBomSkuInfo
superBomSkuInfo
,
HttpServletRequest
request
);
PageInfo
<
SuperBomSkuInfo
>
querySkuList
(
SuperBomSkuInfo
superBomSkuInfo
);
...
...
@@ -50,4 +51,6 @@ public interface IntegrateService {
Object
checkUserToken
(
UserInfo
userinfo
);
Object
ldapAuth
(
UserInfo
userinfo
);
void
saveUserOperationLog
(
HttpServletRequest
request
,
UserOperationLog
log
);
}
src/main/java/cn/com/uitech/authorization/service/SecurityService.java
View file @
18539078
...
...
@@ -21,16 +21,6 @@ import static java.util.stream.Collectors.groupingBy;
public
class
SecurityService
{
static
final
private
String
TOKEN_HEADER
=
"Authorization"
;
public
static
final
String
AUTHENTICATION_PATH
=
"/auth/login"
;
public
static
final
String
AUTHENTICATION_THIRD_PATH
=
"/auth/third_party_login"
;
private
static
String
OAUTH_ITCODE_KEY
=
"oauth:itcode:%s"
;
private
static
ApplicationContext
applicationContext
;
public
static
final
UserImpl
getPrincipal
(){
Authentication
authentication
=
SecurityContextHolder
.
getContext
().
getAuthentication
();
if
((
Objects
.
isNull
(
authentication
)
||
authentication
instanceof
AnonymousAuthenticationToken
)){
...
...
@@ -61,41 +51,4 @@ public class SecurityService {
}
}
public
static
final
List
<
String
>
getUserRoleCode
(){
List
<
String
>
roleCode
=
getPrincipal
().
getAuthorities
().
stream
().
map
(
a
->
a
.
getAuthority
()).
collect
(
Collectors
.
toList
());
return
roleCode
;
}
/**
* 获取当前用户维度数据
*
* @return
*/
public
static
Map
<
String
,
List
<
UserDimension
>>
getCurrentUserDimensionData
(
String
itCode
)
{
String
userCode
=
itCode
;
if
(
StringUtils
.
isEmpty
(
userCode
)){
userCode
=
getPrincipal
().
getCode
();
//userCode = "ZHANGZHENK";
}
if
(!
StringUtils
.
isEmpty
(
userCode
))
{
RedisUtil
redisUtil
=
SpringContextUtil
.
getBean
(
RedisUtil
.
class
);
Object
obj
=
redisUtil
.
get
(
String
.
format
(
OAUTH_ITCODE_KEY
,
userCode
));
if
(!
Objects
.
isNull
(
obj
))
{
List
<
UserDimension
>
userDimensions
=
JSON
.
parseArray
(
JSONObject
.
toJSONString
(
obj
),
UserDimension
.
class
);
return
userDimensions
.
stream
().
collect
(
groupingBy
(
UserDimension:
:
getDimensionCode
));
}
}
return
new
HashMap
<>();
}
/**
* 获取当前用户维度数据
*
* @return
*/
public
static
Map
<
String
,
List
<
UserDimension
>>
getCurrentUserDimensionData
()
{
return
getCurrentUserDimensionData
(
null
);
}
}
src/main/java/cn/com/uitech/authorization/service/SuperBomPriceCalculateService.java
View file @
18539078
...
...
@@ -6,6 +6,7 @@ import cn.com.uitech.authorization.pojo.entity.*;
import
com.github.pagehelper.PageInfo
;
import
org.springframework.web.multipart.MultipartFile
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
/**
...
...
@@ -39,5 +40,5 @@ public interface SuperBomPriceCalculateService {
void
exportCharacteristicValuePrice
(
CharacteristicValueExportDto
dto
,
HttpServletResponse
response
);
Object
batchUpdateByUpload
(
MultipartFile
file
);
Object
batchUpdateByUpload
(
MultipartFile
file
,
HttpServletRequest
request
);
}
src/main/java/cn/com/uitech/authorization/service/TempServer.java
View file @
18539078
package
cn
.
com
.
uitech
.
authorization
.
service
;
public
interface
TempServer
{
Object
getTempList
();
//
Object getTempList();
}
src/main/java/cn/com/uitech/authorization/service/impl/CharacteristicServiceImpl.java
View file @
18539078
...
...
@@ -2,9 +2,7 @@ package cn.com.uitech.authorization.service.impl;
import
cn.com.uitech.authorization.exception.BizException
;
import
cn.com.uitech.authorization.mapper.CharacteristicMapper
;
import
cn.com.uitech.authorization.pojo.dto.CharacteristicExportDto
;
import
cn.com.uitech.authorization.pojo.dto.CharacteristicRequestParamDto
;
import
cn.com.uitech.authorization.pojo.dto.GetProductOutDto
;
import
cn.com.uitech.authorization.pojo.dto.*
;
import
cn.com.uitech.authorization.pojo.entity.Characteristic
;
import
cn.com.uitech.authorization.service.CharacteristicService
;
import
cn.com.uitech.authorization.service.CtoBomService
;
...
...
@@ -19,6 +17,7 @@ import org.apache.poi.hssf.usermodel.*;
import
org.apache.poi.openxml4j.util.ZipSecureFile
;
import
org.apache.poi.ss.usermodel.*
;
import
org.apache.poi.xssf.usermodel.XSSFWorkbook
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.CollectionUtils
;
...
...
@@ -29,6 +28,7 @@ import tk.mybatis.mapper.entity.Example;
import
javax.annotation.Resource
;
import
javax.servlet.ServletOutputStream
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
import
java.io.UnsupportedEncodingException
;
...
...
@@ -71,7 +71,13 @@ public class CharacteristicServiceImpl implements CharacteristicService {
* @return 受影响的行数
*/
@Override
public
Integer
updateCharacteristic
(
CharacteristicRequestParamDto
requestParamDto
)
{
public
Integer
updateCharacteristic
(
CharacteristicRequestParamDto
requestParamDto
,
HttpServletRequest
request
)
{
CharacteristicLogOpera
logOpera
=
new
CharacteristicLogOpera
();
BeanUtils
.
copyProperties
(
requestParamDto
,
logOpera
);
logOpera
.
setUpdateUser
(
request
.
getHeader
(
"UserCode"
));
logOpera
.
setOpera
(
"/characteristic/update"
);
characteristicMapper
.
saveLogOpera
(
logOpera
);
requestParamDto
.
setUpdateUser
(
request
.
getHeader
(
"UserCode"
));
return
characteristicMapper
.
updateCharacteristic
(
requestParamDto
);
}
...
...
@@ -130,8 +136,18 @@ public class CharacteristicServiceImpl implements CharacteristicService {
}
@Override
public
Object
updateCharacteristicIsH3C
(
CharacteristicRequestParamDto
dto
)
{
return
characteristicMapper
.
updateCharacteristicIsH3C
(
dto
);
public
Object
updateCharacteristicIsH3C
(
CharacteristicRequestParamDto
dto
,
HttpServletRequest
request
)
{
List
<
Map
<
String
,
String
>>
characteristicCodes
=
dto
.
getCharacteristicCodes
();
characteristicCodes
.
forEach
(
item
->{
Characteristic
characteristic
=
characteristicMapper
.
getCNameByCode
(
item
.
get
(
"characteristicCode"
),
item
.
get
(
"superBomCode"
));
CharacteristicLogOpera
logOpera
=
new
CharacteristicLogOpera
();
BeanUtils
.
copyProperties
(
characteristic
,
logOpera
);
logOpera
.
setUpdateUser
(
request
.
getHeader
(
"UserCode"
));
logOpera
.
setOpera
(
"/characteristic/updateCharacteristicIsH3C"
);
characteristicMapper
.
saveLogOpera
(
logOpera
);
characteristicMapper
.
updateCharacteristicIsH3C
(
item
.
get
(
"characteristicCode"
),
item
.
get
(
"superBomCode"
),
dto
.
getIsH3C
(),
request
.
getHeader
(
"UserCode"
));
});
return
null
;
}
@Override
...
...
@@ -299,7 +315,7 @@ public class CharacteristicServiceImpl implements CharacteristicService {
* @desc 特征管理 上传文件更新
*/
@Override
public
GetProductOutDto
batchUpdateByUpload
(
MultipartFile
file
)
{
public
GetProductOutDto
batchUpdateByUpload
(
MultipartFile
file
,
HttpServletRequest
request
)
{
GetProductOutDto
result
=
new
GetProductOutDto
();
try
{
//判断文件是否为空
...
...
@@ -317,9 +333,8 @@ public class CharacteristicServiceImpl implements CharacteristicService {
result
.
setCode
(
500
);
return
result
;
}
}
else
{
}
updateData
(
list
);
updateData
(
list
,
request
);
result
.
setData
(
null
);
result
.
setMsg
(
"更新附件内容成功"
);
result
.
setCode
(
200
);
...
...
@@ -336,7 +351,7 @@ public class CharacteristicServiceImpl implements CharacteristicService {
* @param list
* @根据特征编码和superBom更新特征表
*/
public
void
updateData
(
List
<
CharacteristicExportDto
>
list
)
{
public
void
updateData
(
List
<
CharacteristicExportDto
>
list
,
HttpServletRequest
request
)
{
//更新数据库里数据
ArrayList
<
Characteristic
>
updateList
=
new
ArrayList
<>();
list
.
stream
().
forEach
((
dto
)
->
{
...
...
@@ -356,6 +371,13 @@ public class CharacteristicServiceImpl implements CharacteristicService {
updateList
.
add
(
c
);
});
for
(
Characteristic
info
:
updateList
)
{
Characteristic
characteristic
=
characteristicMapper
.
getCNameByCode
(
info
.
getCharacteristicCode
(),
info
.
getSuperBomCode
());
CharacteristicLogOpera
logOpera
=
new
CharacteristicLogOpera
();
BeanUtils
.
copyProperties
(
characteristic
,
logOpera
);
logOpera
.
setUpdateUser
(
request
.
getHeader
(
"UserCode"
));
logOpera
.
setOpera
(
"/characteristic/batchUpdateByUpload"
);
characteristicMapper
.
saveLogOpera
(
logOpera
);
info
.
setUpdateUser
(
request
.
getHeader
(
"UserCode"
));
characteristicMapper
.
updateCharacteristicInfo
(
info
);
}
}
...
...
src/main/java/cn/com/uitech/authorization/service/impl/CharacteristicValueServiceImpl.java
View file @
18539078
...
...
@@ -20,6 +20,7 @@ import org.apache.poi.openxml4j.util.ZipSecureFile;
import
org.apache.poi.ss.usermodel.*
;
import
org.apache.poi.xssf.streaming.SXSSFWorkbook
;
import
org.apache.poi.xssf.usermodel.XSSFWorkbook
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.http.HttpEntity
;
...
...
@@ -35,6 +36,7 @@ import org.springframework.web.multipart.MultipartFile;
import
tk.mybatis.mapper.entity.Condition
;
import
javax.servlet.ServletOutputStream
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.OutputStream
;
import
java.nio.charset.StandardCharsets
;
...
...
@@ -101,8 +103,19 @@ public class CharacteristicValueServiceImpl implements CharacteristicValueServic
* @return CrmResponseEntity<?>
*/
@Override
public
Integer
batchModifyBomStatus
(
CharacteristicValueRequestParamDto
dto
)
{
return
characteristicValueMapper
.
batchModifyBomStatus
(
dto
);
public
Integer
batchModifyBomStatus
(
CharacteristicValueRequestParamDto
dto
,
HttpServletRequest
request
)
{
List
<
Map
<
String
,
String
>>
characteristicValueCodes
=
dto
.
getCharacteristicValueCodes
();
characteristicValueCodes
.
forEach
(
item
->{
CharacteristicValue
characteristicValue
=
characteristicValueMapper
.
getVByCode
(
item
.
get
(
"characteristicValueCode"
),
item
.
get
(
"superBomCode"
));
CharacteristicValueLogOpera
logOpera
=
new
CharacteristicValueLogOpera
();
BeanUtils
.
copyProperties
(
characteristicValue
,
logOpera
);
logOpera
.
setUpdateUser
(
request
.
getHeader
(
"UserCode"
));
logOpera
.
setOpera
(
"/characteristicValue/batchModifyBomStatus"
);
characteristicValueMapper
.
saveLogOpera
(
logOpera
);
dto
.
setUpdateUser
(
request
.
getHeader
(
"UserCode"
));
characteristicValueMapper
.
batchModifyBomStatus
(
item
.
get
(
"characteristicValueCode"
),
item
.
get
(
"superBomCode"
),
dto
.
getIsState
(),
request
.
getHeader
(
"UserCode"
));
});
return
null
;
}
/**
...
...
@@ -112,7 +125,7 @@ public class CharacteristicValueServiceImpl implements CharacteristicValueServic
* @return 插入的条数
*/
@Override
public
Integer
editCharacteristicValue
(
CharacteristicValue
dto
)
{
public
Integer
editCharacteristicValue
(
CharacteristicValue
dto
,
HttpServletRequest
request
)
{
SendDataToPlmLog
log
=
new
SendDataToPlmLog
();
try
{
if
(!
StringUtils
.
isEmpty
(
dto
.
getZphCode
()))
{
...
...
@@ -155,6 +168,12 @@ public class CharacteristicValueServiceImpl implements CharacteristicValueServic
log
.
setUrl
(
plmUrlH
);
characteristicValueMapper
.
saveDeployPlm
(
log
);
}
finally
{
CharacteristicValueLogOpera
logOpera
=
new
CharacteristicValueLogOpera
();
BeanUtils
.
copyProperties
(
dto
,
logOpera
);
logOpera
.
setUpdateUser
(
request
.
getHeader
(
"UserCode"
));
logOpera
.
setOpera
(
"/characteristicValue/editCharacteristicValue"
);
characteristicValueMapper
.
saveLogOpera
(
logOpera
);
dto
.
setUpdateUser
(
request
.
getHeader
(
"UserCode"
));
return
characteristicValueMapper
.
editCharacteristicValue
(
dto
);
}
}
...
...
@@ -444,7 +463,7 @@ public class CharacteristicValueServiceImpl implements CharacteristicValueServic
* @desc 特征值管理 上传文件更新
*/
@Override
public
GetProductOutDto
batchUpdateByUpload
(
MultipartFile
file
)
{
public
GetProductOutDto
batchUpdateByUpload
(
MultipartFile
file
,
HttpServletRequest
request
)
{
GetProductOutDto
result
=
new
GetProductOutDto
();
try
{
//判断文件是否为空
...
...
@@ -463,7 +482,7 @@ public class CharacteristicValueServiceImpl implements CharacteristicValueServic
return
result
;
}
}
updateData
(
list
);
updateData
(
list
,
request
);
result
.
setData
(
null
);
result
.
setMsg
(
"更新附件内容成功"
);
result
.
setCode
(
200
);
...
...
@@ -481,7 +500,7 @@ public class CharacteristicValueServiceImpl implements CharacteristicValueServic
* @param list
* @根据特征值编码和产品组更新特征表
*/
public
void
updateData
(
List
<
CharacteristicValueExportDto
>
list
)
{
public
void
updateData
(
List
<
CharacteristicValueExportDto
>
list
,
HttpServletRequest
request
)
{
//更新数据库里数据
ArrayList
<
CharacteristicValue
>
updateList
=
new
ArrayList
<>();
list
.
stream
().
forEach
((
dto
)
->
{
...
...
@@ -496,6 +515,13 @@ public class CharacteristicValueServiceImpl implements CharacteristicValueServic
});
for
(
CharacteristicValue
v
:
updateList
)
{
CharacteristicValue
characteristicValue
=
characteristicValueMapper
.
getVByCode
(
v
.
getCharacteristicValueCode
(),
v
.
getSuperBomCode
());
CharacteristicValueLogOpera
logOpera
=
new
CharacteristicValueLogOpera
();
BeanUtils
.
copyProperties
(
characteristicValue
,
logOpera
);
logOpera
.
setUpdateUser
(
request
.
getHeader
(
"UserCode"
));
logOpera
.
setOpera
(
"/characteristicValue/batchUpdateByUpload"
);
characteristicValueMapper
.
saveLogOpera
(
logOpera
);
v
.
setUpdateUser
(
request
.
getHeader
(
"UserCode"
));
characteristicValueMapper
.
updateCharacteristicValue
(
v
);
}
}
...
...
src/main/java/cn/com/uitech/authorization/service/impl/CtoBomServiceImpl.java
View file @
18539078
...
...
@@ -2,18 +2,14 @@ package cn.com.uitech.authorization.service.impl;
import
cn.com.uitech.authorization.mapper.BomStatusMapper
;
import
cn.com.uitech.authorization.mapper.CtoBomMapper
;
import
cn.com.uitech.authorization.mapper.ProductDescriptionMapper
;
import
cn.com.uitech.authorization.pojo.dto.ComponentCargoDto
;
import
cn.com.uitech.authorization.pojo.dto.ConfigurableBomLogOpera
;
import
cn.com.uitech.authorization.pojo.dto.CtoBomRequestParamDto
;
import
cn.com.uitech.authorization.pojo.entity.BomStatusEntity
;
import
cn.com.uitech.authorization.pojo.entity.ConfigurableBom
;
import
cn.com.uitech.authorization.pojo.entity.ProductDescription
;
import
cn.com.uitech.authorization.pojo.entity.ProductGroup
;
import
cn.com.uitech.authorization.service.CtoBomService
;
import
cn.com.uitech.authorization.utils.RedisHelper
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.google.common.collect.Lists
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -23,9 +19,7 @@ import tk.mybatis.mapper.entity.Condition;
import
tk.mybatis.mapper.entity.Example
;
import
javax.annotation.Resource
;
import
java.sql.Timestamp
;
import
java.util.ArrayList
;
import
java.util.Calendar
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.List
;
/**
...
...
@@ -38,11 +32,6 @@ public class CtoBomServiceImpl implements CtoBomService {
@Autowired
private
CtoBomMapper
ctoBomMapper
;
@Autowired
private
ProductDescriptionMapper
productDescriptionMapper
;
@Autowired
private
BomStatusMapper
bomStatusMapper
;
...
...
@@ -81,23 +70,13 @@ public class CtoBomServiceImpl implements CtoBomService {
* @return 受影响的行数
*/
@Override
public
Integer
updateCtoBomByBomCode
(
CtoBomRequestParamDto
ctoBomRequestParamDto
)
{
//更新产品描述
ProductDescription
pd
=
new
ProductDescription
();
if
(
StringUtils
.
isNotBlank
(
ctoBomRequestParamDto
.
getDescription
()))
{
pd
.
setSuperBomCode
(
ctoBomRequestParamDto
.
getSuperBomCode
());
productDescriptionMapper
.
getCondition
().
createCriteria
().
andEqualTo
(
"superBomCode"
,
ctoBomRequestParamDto
.
getSuperBomCode
());
List
<
ProductDescription
>
pds
=
productDescriptionMapper
.
select
(
pd
);
BeanUtils
.
copyProperties
(
ctoBomRequestParamDto
,
pd
);
if
(
pds
.
size
()
>
0
)
{
//有数据更新
productDescriptionMapper
.
updateByBomCode
(
pd
);
}
else
{
//没数据插入
productDescriptionMapper
.
insert
(
pd
);
}
}
public
Integer
updateCtoBomByBomCode
(
CtoBomRequestParamDto
ctoBomRequestParamDto
,
HttpServletRequest
request
)
{
ConfigurableBomLogOpera
logOpera
=
new
ConfigurableBomLogOpera
();
BeanUtils
.
copyProperties
(
ctoBomRequestParamDto
,
logOpera
);
logOpera
.
setUpdateUser
(
request
.
getHeader
(
"UserCode"
));
logOpera
.
setOpera
(
"/ctobom/updateEdit"
);
ctoBomMapper
.
saveLogOpera
(
logOpera
);
ctoBomRequestParamDto
.
setUpdateUser
(
request
.
getHeader
(
"UserCode"
));
return
ctoBomMapper
.
updateCtoBomByBomCode
(
ctoBomRequestParamDto
);
}
...
...
@@ -119,11 +98,19 @@ public class CtoBomServiceImpl implements CtoBomService {
* @return 受影响的行数
*/
@Override
public
Integer
updateIsPresaleByBomCode
(
CtoBomRequestParamDto
ctoBomRequestParamDto
)
{
int
status
=
ctoBomRequestParamDto
.
getIsState
();
public
Integer
updateIsPresaleByBomCode
(
CtoBomRequestParamDto
ctoBomRequestParamDto
,
HttpServletRequest
request
)
{
List
<
String
>
superBomCodes
=
ctoBomRequestParamDto
.
getSuperBomCodes
();
superBomCodes
.
forEach
(
item
->{
ConfigurableBomLogOpera
logOpera
=
new
ConfigurableBomLogOpera
();
ConfigurableBom
cto
=
ctoBomMapper
.
getCto
(
item
);
BeanUtils
.
copyProperties
(
cto
,
logOpera
);
logOpera
.
setUpdateUser
(
request
.
getHeader
(
"UserCode"
));
logOpera
.
setOpera
(
"/ctobom/update"
);
ctoBomMapper
.
saveLogOpera
(
logOpera
);
});
ctoBomRequestParamDto
.
setUpdateUser
(
request
.
getHeader
(
"UserCode"
));
return
ctoBomMapper
.
updateIsPresaleByBomCode
(
ctoBomRequestParamDto
);
}
/**
* 根据产品组,层次id查询所有的cto物料
*
...
...
@@ -137,54 +124,6 @@ public class CtoBomServiceImpl implements CtoBomService {
return
ctoBomMapper
.
getCtoBomCodeNameAll
(
dto
);
}
/**
* @param componentCargoDto
* @return 根据产品组,统一名称查询所有的cto 名称,统一编码,产品编码,产品名称受控状态
*/
@Override
public
List
<
ComponentCargoDto
>
getCtoScopeNameAll
(
ComponentCargoDto
componentCargoDto
)
{
return
ctoBomMapper
.
getCtoScopeNameAll
(
componentCargoDto
);
}
/**
* @param dto
* @return 商机立项时 添加基准机型时 CTO下拉列表
*/
@Override
public
List
<
ConfigurableBom
>
getCtoComboBox
(
CtoBomRequestParamDto
dto
)
{
return
ctoBomMapper
.
getCtoComboBox
(
dto
);
}
/**
* @param bomStatusEntity
* @return PageInfo
* @desc cto 客户处可卖批量更新
*/
@Override
public
void
updateInsertCustomerbelongtoByBom
(
BomStatusEntity
bomStatusEntity
)
{
//删除历史的可卖
Condition
condition
=
bomStatusMapper
.
getCondition
();
condition
.
createCriteria
().
andEqualTo
(
"bomCode"
,
bomStatusEntity
.
getBomCode
()).
andEqualTo
(
"productGroupCode"
,
bomStatusEntity
.
getProductGroupCode
());
bomStatusMapper
.
deleteByExample
(
condition
);
//保存最新的可卖
if
(!
CollectionUtils
.
isEmpty
(
bomStatusEntity
.
getIndustryIds
()))
{
ArrayList
<
BomStatusEntity
>
list
=
Lists
.
newArrayList
();
for
(
Integer
industryId
:
bomStatusEntity
.
getIndustryIds
())
{
BomStatusEntity
bom
=
new
BomStatusEntity
();
bom
.
setBomCode
(
bomStatusEntity
.
getBomCode
());
bom
.
setIndustryId
(
industryId
);
bom
.
setProductGroupCode
(
bomStatusEntity
.
getProductGroupCode
());
bom
.
setUpdateTime
(
new
Timestamp
(
Calendar
.
getInstance
().
getTimeInMillis
()));
bom
.
setStatus
(
bomStatusEntity
.
getStatus
());
list
.
add
(
bom
);
}
bomStatusMapper
.
insertList
(
list
);
}
}
@Override
public
void
insertCto
(
List
<
ConfigurableBom
>
configurableBoms
)
{
...
...
src/main/java/cn/com/uitech/authorization/service/impl/IntegrateServiceImpl.java
View file @
18539078
...
...
@@ -19,11 +19,8 @@ import org.springframework.http.HttpEntity;
import
org.springframework.http.HttpHeaders
;
import
org.springframework.http.HttpMethod
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.ldap.core.CollectingAuthenticationErrorCallback
;
import
org.springframework.ldap.core.LdapTemplate
;
import
org.springframework.ldap.filter.AndFilter
;
import
org.springframework.ldap.filter.EqualsFilter
;
import
org.springframework.ldap.query.LdapQuery
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
...
...
@@ -33,6 +30,7 @@ import org.springframework.util.StringUtils;
import
org.springframework.web.client.RestTemplate
;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletRequest
;
import
java.sql.Timestamp
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
...
...
@@ -40,8 +38,6 @@ import java.util.Date;
import
java.util.List
;
import
java.util.Map
;
import
static
org
.
springframework
.
ldap
.
query
.
LdapQueryBuilder
.
query
;
@Service
@Transactional
...
...
@@ -406,7 +402,7 @@ public class IntegrateServiceImpl implements IntegrateService {
* @Param [superBomSkuInfo]
* @return java.lang.Object
**/
public
Object
GetSKUByConfigInfo
(
SuperBomSkuInfo
superBomSkuInfo
)
{
public
Object
GetSKUByConfigInfo
(
SuperBomSkuInfo
superBomSkuInfo
,
HttpServletRequest
request
)
{
GetProductOutDto
result
=
new
GetProductOutDto
();
//checkToken(superBomSkuInfo.getToken());
...
...
@@ -418,68 +414,9 @@ public class IntegrateServiceImpl implements IntegrateService {
4.申请失败的SKU->可以再次提交申请->申请SKU->返回SKU信息
**/
if
(
superBomSkuInfo
.
getPoliticalMiningId
()
!=
null
&&
superBomSkuInfo
.
getPatern
()
!=
null
&&
superBomSkuInfo
.
getSuperBomCode
()
!=
null
&&
superBomSkuInfo
.
getBrand
()
!=
null
)
{
superBomSkuInfo
.
setApplyUser
(
"CRM"
);
//根据 政采 模式 品牌 superbom 查询sku主信息
List
<
SuperBomSkuInfo
>
skuInfos
=
superBomSkuInfoMapper
.
getSkuInfo
(
superBomSkuInfo
);
Boolean
flag
=
true
;
if
(!
CollectionUtils
.
isEmpty
(
skuInfos
))
{
for
(
SuperBomSkuInfo
skuInfo
:
skuInfos
)
{
//对比查出来的skuConfig信息是否完全一样
List
<
String
>
items
=
superBomSkuInfoMapper
.
getConfigInfos
(
skuInfo
.
getConfigId
());
List
<
String
>
newItems
=
new
ArrayList
<>();
ArrayList
<
SuperBomSkuConfigInfo
>
params
=
new
ArrayList
<>(
superBomSkuInfo
.
getCharacteristicList
());
params
.
forEach
(
param
->
newItems
.
add
(
param
.
getCharacteristicCode
()
+
param
.
getCharacteristicValueCode
()
+
skuInfo
.
getSuperBomCode
()));
boolean
equals
=
items
.
containsAll
(
newItems
);
//撞配成功
if
(
equals
)
{
SuperBomSkuInfo
getSkuByConfigId
=
superBomSkuInfoMapper
.
getSkuInfoByConfigId
(
skuInfo
.
getConfigId
());
if
(!
StringUtils
.
isEmpty
(
getSkuByConfigId
.
getSkuCode
()))
{
//1.申请SKU->验证配置是否存在->存在->是否生成SKU->生成SKU->返回SKU信息
superBomSkuInfo
.
setSkuCode
(
getSkuByConfigId
.
getSkuCode
());
superBomSkuInfo
.
setSkuName
(
getSkuByConfigId
.
getSkuName
());
result
.
setMsg
(
"配置已存在:SKUCode:"
+
superBomSkuInfo
.
getSkuCode
());
result
.
setCode
(
500
);
result
.
setData
(
superBomSkuInfo
);
return
result
;
}
else
{
//2.申请SKU->验证配置是否存在->存在->是否生成SKU->
// 未生成SKU->使用历史configid申请SKU->返回SKU信息
superBomSkuInfo
.
setConfigId
(
skuInfo
.
getConfigId
());
ApplySkuCodeResultDto
applySkuCodeResultDto
=
applySkuCode
(
superBomSkuInfo
);
if
(
applySkuCodeResultDto
.
getCode
().
equals
(
200
))
{
if
(
applySkuCodeResultDto
.
getCode
().
equals
(
200
))
{
ApplySkuCodeResultDto
.
data
data
=
applySkuCodeResultDto
.
getData
();
data
.
setConfigId
(
superBomSkuInfo
.
getConfigId
());
data
.
setMsg
(
"已回号"
);
data
.
setUser
(
superBomSkuInfo
.
getApplyUser
());
characteristicMapper
.
updateSuperBomSkuInfo
(
data
);
superBomSkuInfo
.
setSkuCode
(
data
.
getSkuCode
());
superBomSkuInfo
.
setSkuName
(
data
.
getSkuName
());
// result.setMsg(applySkuCodeResultDto.getMsg());
result
.
setMsg
(
applySkuCodeResultDto
.
getMsg
());
result
.
setCode
(
200
);
result
.
setData
(
superBomSkuInfo
);
return
result
;
}
else
{
superBomSkuInfoMapper
.
updateSkuStatus
(
superBomSkuInfo
);
result
.
setCode
(
500
);
result
.
setMsg
(
applySkuCodeResultDto
.
getMsg
());
return
result
;
}
}
else
{
superBomSkuInfoMapper
.
updateSkuStatus
(
superBomSkuInfo
);
result
.
setMsg
(
applySkuCodeResultDto
.
getMsg
());
result
.
setCode
(
applySkuCodeResultDto
.
getCode
());
return
result
;
}
}
}
else
{
//撞配失败赋值false
flag
=
false
;
}
}
}
else
{
if
(
superBomSkuInfo
.
getIsConfig
().
equals
(
"是"
))
{
//todo 01-10 是特配的不做本地验证,每次都重新申请
//根据 政采 模式 品牌 superbom 查询sku主信息 没有查询到信息
//撞配不通过 保存SKU信息&config信息 调用申请SKU接口 applySkuCode
superBomSkuInfo
.
setId
(
sequence
.
nextId
());
...
...
@@ -493,7 +430,7 @@ public class IntegrateServiceImpl implements IntegrateService {
superBomSkuInfoMapper
.
saveSkuConfig
(
config
);
});
//调用PLM申请sku号 返回后修改sku数据返回
ApplySkuCodeResultDto
applySkuCodeResultDto
=
applySkuCode
(
superBomSkuInfo
);
ApplySkuCodeResultDto
applySkuCodeResultDto
=
applySkuCode
(
superBomSkuInfo
,
request
);
if
(
applySkuCodeResultDto
.
getCode
().
equals
(
200
))
{
if
(
applySkuCodeResultDto
.
getCode
().
equals
(
200
))
{
ApplySkuCodeResultDto
.
data
data
=
applySkuCodeResultDto
.
getData
();
...
...
@@ -522,58 +459,161 @@ public class IntegrateServiceImpl implements IntegrateService {
result
.
setCode
(
applySkuCodeResultDto
.
getCode
());
return
result
;
}
}
else
{
List
<
SuperBomSkuInfo
>
skuInfos
=
superBomSkuInfoMapper
.
getSkuInfo
(
superBomSkuInfo
);
Boolean
flag
=
true
;
if
(!
CollectionUtils
.
isEmpty
(
skuInfos
))
{
for
(
SuperBomSkuInfo
skuInfo
:
skuInfos
)
{
//对比查出来的skuConfig信息是否完全一样
List
<
String
>
items
=
superBomSkuInfoMapper
.
getConfigInfos
(
skuInfo
.
getConfigId
());
List
<
String
>
newItems
=
new
ArrayList
<>();
ArrayList
<
SuperBomSkuConfigInfo
>
params
=
new
ArrayList
<>(
superBomSkuInfo
.
getCharacteristicList
());
params
.
forEach
(
param
->
newItems
.
add
(
param
.
getCharacteristicCode
()
+
param
.
getCharacteristicValueCode
()
+
skuInfo
.
getSuperBomCode
()));
boolean
equals
=
items
.
containsAll
(
newItems
);
//撞配成功
if
(
equals
)
{
SuperBomSkuInfo
getSkuByConfigId
=
superBomSkuInfoMapper
.
getSkuInfoByConfigId
(
skuInfo
.
getConfigId
());
if
(!
StringUtils
.
isEmpty
(
getSkuByConfigId
.
getSkuCode
()))
{
//1.申请SKU->验证配置是否存在->存在->是否生成SKU->生成SKU->返回SKU信息
superBomSkuInfo
.
setSkuCode
(
getSkuByConfigId
.
getSkuCode
());
superBomSkuInfo
.
setSkuName
(
getSkuByConfigId
.
getSkuName
());
result
.
setMsg
(
"配置已存在:SKUCode:"
+
superBomSkuInfo
.
getSkuCode
());
result
.
setCode
(
500
);
result
.
setData
(
superBomSkuInfo
);
return
result
;
}
else
{
//2.申请SKU->验证配置是否存在->存在->是否生成SKU->
// 未生成SKU->使用历史configid申请SKU->返回SKU信息
superBomSkuInfo
.
setConfigId
(
skuInfo
.
getConfigId
());
ApplySkuCodeResultDto
applySkuCodeResultDto
=
applySkuCode
(
superBomSkuInfo
,
request
);
if
(
applySkuCodeResultDto
.
getCode
().
equals
(
200
))
{
if
(
applySkuCodeResultDto
.
getCode
().
equals
(
200
))
{
ApplySkuCodeResultDto
.
data
data
=
applySkuCodeResultDto
.
getData
();
data
.
setConfigId
(
superBomSkuInfo
.
getConfigId
());
data
.
setMsg
(
"已回号"
);
data
.
setUser
(
superBomSkuInfo
.
getApplyUser
());
characteristicMapper
.
updateSuperBomSkuInfo
(
data
);
superBomSkuInfo
.
setSkuCode
(
data
.
getSkuCode
());
superBomSkuInfo
.
setSkuName
(
data
.
getSkuName
());
// result.setMsg(applySkuCodeResultDto.getMsg());
result
.
setMsg
(
applySkuCodeResultDto
.
getMsg
());
result
.
setCode
(
200
);
result
.
setData
(
superBomSkuInfo
);
return
result
;
}
else
{
superBomSkuInfoMapper
.
updateSkuStatus
(
superBomSkuInfo
);
result
.
setCode
(
500
);
result
.
setMsg
(
applySkuCodeResultDto
.
getMsg
());
return
result
;
}
}
else
{
superBomSkuInfoMapper
.
updateSkuStatus
(
superBomSkuInfo
);
result
.
setMsg
(
applySkuCodeResultDto
.
getMsg
());
result
.
setCode
(
applySkuCodeResultDto
.
getCode
());
return
result
;
}
}
}
//3.申请SKU->验证配置是否存在->不存在->保存配置信息->申请SKU->返回SKU信息
//撞配不通过 保存SKU信息&config信息 调用申请SKU接口 applySkuCode
if
(
flag
.
equals
(
false
))
{
superBomSkuInfo
.
setId
(
sequence
.
nextId
());
superBomSkuInfo
.
setApplyUser
(
SecurityService
.
getPrincipal
().
getCode
());
superBomSkuInfoMapper
.
saveSkuInfo
(
superBomSkuInfo
);
List
<
SuperBomSkuConfigInfo
>
characteristicList
=
superBomSkuInfo
.
getCharacteristicList
();
characteristicList
.
forEach
(
item
->
{
SuperBomSkuConfigInfo
config
=
new
SuperBomSkuConfigInfo
();
BeanUtils
.
copyProperties
(
item
,
config
);
config
.
setId
(
sequence
.
nextId
());
config
.
setConfigId
(
superBomSkuInfo
.
getConfigId
());
superBomSkuInfoMapper
.
saveSkuConfig
(
config
);
});
//调用PLM申请sku号 返回后修改sku数据返回
ApplySkuCodeResultDto
applySkuCodeResultDto
=
applySkuCode
(
superBomSkuInfo
);
if
(
applySkuCodeResultDto
.
getCode
().
equals
(
200
))
{
}
else
{
//撞配失败赋值false
flag
=
false
;
}
}
}
else
{
//根据 政采 模式 品牌 superbom 查询sku主信息 没有查询到信息
//撞配不通过 保存SKU信息&config信息 调用申请SKU接口 applySkuCode
superBomSkuInfo
.
setId
(
sequence
.
nextId
());
superBomSkuInfoMapper
.
saveSkuInfo
(
superBomSkuInfo
);
List
<
SuperBomSkuConfigInfo
>
characteristicList
=
superBomSkuInfo
.
getCharacteristicList
();
characteristicList
.
forEach
(
item
->
{
SuperBomSkuConfigInfo
config
=
new
SuperBomSkuConfigInfo
();
BeanUtils
.
copyProperties
(
item
,
config
);
config
.
setId
(
sequence
.
nextId
());
config
.
setConfigId
(
superBomSkuInfo
.
getConfigId
());
superBomSkuInfoMapper
.
saveSkuConfig
(
config
);
});
//调用PLM申请sku号 返回后修改sku数据返回
ApplySkuCodeResultDto
applySkuCodeResultDto
=
applySkuCode
(
superBomSkuInfo
,
request
);
if
(
applySkuCodeResultDto
.
getCode
().
equals
(
200
))
{
ApplySkuCodeResultDto
.
data
data
=
applySkuCodeResultDto
.
getData
();
data
.
setConfigId
(
superBomSkuInfo
.
getConfigId
());
data
.
setMsg
(
"已回号"
);
data
.
setUser
(
superBomSkuInfo
.
getApplyUser
());
characteristicMapper
.
updateSuperBomSkuInfo
(
data
);
superBomSkuInfo
.
setSkuCode
(
data
.
getSkuCode
());
superBomSkuInfo
.
setSkuName
(
data
.
getSkuName
());
if
(
applySkuCodeResultDto
.
getCode
().
equals
(
200
))
{
ApplySkuCodeResultDto
.
data
data
=
applySkuCodeResultDto
.
getData
();
data
.
setConfigId
(
superBomSkuInfo
.
getConfigId
());
data
.
setMsg
(
"已回号"
);
data
.
setUser
(
superBomSkuInfo
.
getApplyUser
());
characteristicMapper
.
updateSuperBomSkuInfo
(
data
);
superBomSkuInfo
.
setSkuCode
(
data
.
getSkuCode
());
superBomSkuInfo
.
setSkuName
(
data
.
getSkuName
());
result
.
setMsg
(
applySkuCodeResultDto
.
getMsg
());
result
.
setCode
(
applySkuCodeResultDto
.
getCode
());
result
.
setData
(
superBomSkuInfo
);
return
result
;
}
else
{
superBomSkuInfo
.
setPlmMsg
(
applySkuCodeResultDto
.
getMsg
());
superBomSkuInfoMapper
.
updateSkuStatus
(
superBomSkuInfo
);
result
.
setCode
(
applySkuCodeResultDto
.
getCode
());
result
.
setMsg
(
applySkuCodeResultDto
.
getMsg
());
result
.
setData
(
applySkuCodeResultDto
);
return
result
;
}
}
else
{
superBomSkuInfo
.
setPlmMsg
(
applySkuCodeResultDto
.
getMsg
());
superBomSkuInfoMapper
.
updateSkuStatus
(
superBomSkuInfo
);
result
.
setMsg
(
applySkuCodeResultDto
.
getMsg
());
result
.
setCode
(
applySkuCodeResultDto
.
getCode
());
result
.
setData
(
superBomSkuInfo
);
return
result
;
}
}
//3.申请SKU->验证配置是否存在->不存在->保存配置信息->申请SKU->返回SKU信息
//撞配不通过 保存SKU信息&config信息 调用申请SKU接口 applySkuCode
if
(
flag
.
equals
(
false
))
{
superBomSkuInfo
.
setId
(
sequence
.
nextId
());
superBomSkuInfoMapper
.
saveSkuInfo
(
superBomSkuInfo
);
List
<
SuperBomSkuConfigInfo
>
characteristicList
=
superBomSkuInfo
.
getCharacteristicList
();
characteristicList
.
forEach
(
item
->
{
SuperBomSkuConfigInfo
config
=
new
SuperBomSkuConfigInfo
();
BeanUtils
.
copyProperties
(
item
,
config
);
config
.
setId
(
sequence
.
nextId
());
config
.
setConfigId
(
superBomSkuInfo
.
getConfigId
());
superBomSkuInfoMapper
.
saveSkuConfig
(
config
);
});
//调用PLM申请sku号 返回后修改sku数据返回
ApplySkuCodeResultDto
applySkuCodeResultDto
=
applySkuCode
(
superBomSkuInfo
,
request
);
if
(
applySkuCodeResultDto
.
getCode
().
equals
(
200
))
{
if
(
applySkuCodeResultDto
.
getCode
().
equals
(
200
))
{
ApplySkuCodeResultDto
.
data
data
=
applySkuCodeResultDto
.
getData
();
data
.
setConfigId
(
superBomSkuInfo
.
getConfigId
());
data
.
setMsg
(
"已回号"
);
data
.
setUser
(
superBomSkuInfo
.
getApplyUser
());
characteristicMapper
.
updateSuperBomSkuInfo
(
data
);
superBomSkuInfo
.
setSkuCode
(
data
.
getSkuCode
());
superBomSkuInfo
.
setSkuName
(
data
.
getSkuName
());
result
.
setMsg
(
applySkuCodeResultDto
.
getMsg
());
result
.
setCode
(
applySkuCodeResultDto
.
getCode
());
result
.
setData
(
superBomSkuInfo
);
return
result
;
}
else
{
superBomSkuInfo
.
setPlmMsg
(
applySkuCodeResultDto
.
getMsg
());
superBomSkuInfoMapper
.
updateSkuStatus
(
superBomSkuInfo
);
result
.
setCode
(
applySkuCodeResultDto
.
getCode
());
result
.
setMsg
(
applySkuCodeResultDto
.
getMsg
());
result
.
setData
(
applySkuCodeResultDto
);
return
result
;
}
}
else
{
superBomSkuInfo
.
setPlmMsg
(
applySkuCodeResultDto
.
getMsg
());
superBomSkuInfoMapper
.
updateSkuStatus
(
superBomSkuInfo
);
result
.
setCode
(
applySkuCodeResultDto
.
getCode
());
result
.
setMsg
(
applySkuCodeResultDto
.
getMsg
());
result
.
set
Data
(
applySkuCodeResultDto
);
result
.
set
Code
(
applySkuCodeResultDto
.
getCode
()
);
return
result
;
}
}
else
{
superBomSkuInfo
.
setPlmMsg
(
applySkuCodeResultDto
.
getMsg
());
superBomSkuInfoMapper
.
updateSkuStatus
(
superBomSkuInfo
);
result
.
setMsg
(
applySkuCodeResultDto
.
getMsg
());
result
.
setCode
(
applySkuCodeResultDto
.
getCode
());
result
.
setMsg
(
"配置已存在,请勿重复申请"
);
result
.
setCode
(
500
);
result
.
setData
(
superBomSkuInfo
);
return
result
;
}
}
else
{
result
.
setMsg
(
"配置已存在,请勿重复申请"
);
result
.
setCode
(
500
);
result
.
setData
(
superBomSkuInfo
);
return
result
;
}
}
}
else
{
...
...
@@ -596,13 +636,12 @@ public class IntegrateServiceImpl implements IntegrateService {
* @Param [superBomSkuInfo]
* @return java.lang.Object
**/
public
Object
GetConfigBySUKINFO
(
SuperBomSkuInfo
superBomSkuInfo
)
{
public
Object
GetConfigBySUKINFO
(
SuperBomSkuInfo
superBomSkuInfo
,
HttpServletRequest
request
)
{
GetProductOutDto
result
=
new
GetProductOutDto
();
//checkToken(superBomSkuInfo.getToken());
//撞配
superBomSkuInfo
.
setApplyUser
(
"CRM"
);
Object
ob
=
GetSKUByConfigInfo
(
superBomSkuInfo
);
Object
ob
=
GetSKUByConfigInfo
(
superBomSkuInfo
,
request
);
boolean
flag
=
ob
instanceof
GetProductOutDto
;
if
(
flag
)
{
Object
o
=
JSONObject
.
toJSON
(
ob
);
...
...
@@ -790,6 +829,13 @@ public class IntegrateServiceImpl implements IntegrateService {
return
result
;
}
@Override
public
void
saveUserOperationLog
(
HttpServletRequest
request
,
UserOperationLog
log
)
{
log
.
setUserCode
(
request
.
getHeader
(
"UserCode"
));
log
.
setId
(
sequence
.
nextId
());
userInfoMapper
.
saveUserOperationLog
(
log
);
}
/**
* @Author 赵晓雷
...
...
@@ -798,7 +844,7 @@ public class IntegrateServiceImpl implements IntegrateService {
* @Param
* @return
**/
public
ApplySkuCodeResultDto
applySkuCode
(
SuperBomSkuInfo
superBomSkuInfo
)
{
public
ApplySkuCodeResultDto
applySkuCode
(
SuperBomSkuInfo
superBomSkuInfo
,
HttpServletRequest
request
)
{
ApplySkuCodeResultDto
dto
=
new
ApplySkuCodeResultDto
();
Map
<
String
,
Object
>
map
=
null
;
try
{
...
...
@@ -837,6 +883,7 @@ public class IntegrateServiceImpl implements IntegrateService {
toPLMDto
.
setOptionChoiceMaps
(
maps
);
HttpHeaders
headers
=
getHttpHeaderPlm
(
nonce
);
HttpEntity
httpEntity
=
new
HttpEntity
<>(
JSONObject
.
toJSON
(
toPLMDto
),
headers
);
characteristicMapper
.
saveAppluOpera
(
httpEntity
.
toString
(),
request
.
getHeader
(
"UserCode"
),
plmUrl
);
restTemplate
.
setErrorHandler
(
new
CustomResponseErrorHandler
());
map
=
(
Map
<
String
,
Object
>)
restTemplate
.
exchange
(
plmUrl
,
HttpMethod
.
POST
,
httpEntity
,
Object
.
class
).
getBody
();
Integer
code
=
(
Integer
)
map
.
get
(
"code"
);
...
...
@@ -972,7 +1019,7 @@ public class IntegrateServiceImpl implements IntegrateService {
* @Param [configSkuInfo]
* @return java.lang.Object
**/
public
Object
GetSKUByH3CConfigInfo
(
GetSKUByH3CConfigInfo
configSkuInfo
)
{
public
Object
GetSKUByH3CConfigInfo
(
GetSKUByH3CConfigInfo
configSkuInfo
,
HttpServletRequest
request
)
{
//checkToken(configSkuInfo.getToken());
/*
...
...
@@ -1079,7 +1126,6 @@ public class IntegrateServiceImpl implements IntegrateService {
BeanUtils
.
copyProperties
(
superBomInfo
,
superBomSkuInfo
);
superBomSkuInfo
.
setToken
(
configSkuInfo
.
getToken
());
superBomSkuInfo
.
setPatern
(
"CTO"
);
superBomSkuInfo
.
setApplyUser
(
"H3C"
);
Integer
politicalMiningId
=
cpnList
.
getPoliticalMiningId
();
if
(
politicalMiningId
.
equals
(
1
))
{
superBomSkuInfo
.
setPoliticalMiningId
(
"是"
);
...
...
@@ -1165,7 +1211,7 @@ public class IntegrateServiceImpl implements IntegrateService {
Map
<
String
,
Object
>
preVerifyMap
=
(
Map
<
String
,
Object
>)
JSONObject
.
toJSON
(
preVerify
);
if
(
preVerifyMap
.
get
(
"result"
).
equals
(
true
))
{
//撞配 找PLM申请SKU
Object
ob
=
GetSKUByConfigInfo
(
superBomSkuInfo
);
Object
ob
=
GetSKUByConfigInfo
(
superBomSkuInfo
,
request
);
boolean
flag1
=
ob
instanceof
GetProductOutDto
;
if
(
flag1
)
{
Object
o1
=
JSONObject
.
toJSON
(
ob
);
...
...
@@ -1280,10 +1326,9 @@ public class IntegrateServiceImpl implements IntegrateService {
* @Param [superBomSkuInfo]
* @return java.lang.Object
**/
public
Object
saveSukInfo
(
SuperBomSkuInfo
superBomSkuInfo
)
{
superBomSkuInfo
.
setApplyUser
(
"CRM"
);
public
Object
saveSukInfo
(
SuperBomSkuInfo
superBomSkuInfo
,
HttpServletRequest
request
)
{
GetProductOutDto
result
=
new
GetProductOutDto
();
Object
ob
=
GetSKUByConfigInfo
(
superBomSkuInfo
);
Object
ob
=
GetSKUByConfigInfo
(
superBomSkuInfo
,
request
);
boolean
flag
=
ob
instanceof
GetProductOutDto
;
if
(
flag
)
{
Object
o
=
JSONObject
.
toJSON
(
ob
);
...
...
src/main/java/cn/com/uitech/authorization/service/impl/SuperBomPriceCalculateServiceImpl.java
View file @
18539078
...
...
@@ -5,6 +5,7 @@ import cn.com.uitech.authorization.exception.BusinessException;
import
cn.com.uitech.authorization.mapper.BasicsPriceInfoMapper
;
import
cn.com.uitech.authorization.mapper.SuperBomPriceCalculateMapper
;
import
cn.com.uitech.authorization.pojo.dto.CharacteristicValueExportDto
;
import
cn.com.uitech.authorization.pojo.dto.CharacteristicsLogOpera
;
import
cn.com.uitech.authorization.pojo.dto.GetProductOutDto
;
import
cn.com.uitech.authorization.pojo.dto.SuperCharacterPriceInfoDto
;
import
cn.com.uitech.authorization.pojo.entity.*
;
...
...
@@ -20,6 +21,7 @@ import org.apache.poi.hssf.usermodel.*;
import
org.apache.poi.openxml4j.util.ZipSecureFile
;
import
org.apache.poi.ss.usermodel.*
;
import
org.apache.poi.xssf.usermodel.XSSFWorkbook
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.CollectionUtils
;
...
...
@@ -28,12 +30,12 @@ import org.springframework.web.multipart.MultipartFile;
import
javax.annotation.Resource
;
import
javax.servlet.ServletOutputStream
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.math.BigDecimal
;
import
java.nio.charset.StandardCharsets
;
import
java.text.DecimalFormat
;
import
java.util.ArrayList
;
import
java.util.Calendar
;
import
java.util.Date
;
import
java.util.List
;
...
...
@@ -548,7 +550,7 @@ public class SuperBomPriceCalculateServiceImpl implements SuperBomPriceCalculate
* @desc 特征值价格管理 上传文件更新
*/
@Override
public
GetProductOutDto
batchUpdateByUpload
(
MultipartFile
file
)
{
public
GetProductOutDto
batchUpdateByUpload
(
MultipartFile
file
,
HttpServletRequest
request
)
{
GetProductOutDto
result
=
new
GetProductOutDto
();
try
{
//判断文件是否为空
...
...
@@ -567,7 +569,7 @@ public class SuperBomPriceCalculateServiceImpl implements SuperBomPriceCalculate
return
result
;
}
}
updateData
(
li
st
);
updateData
(
list
,
reque
st
);
result
.
setData
(
null
);
result
.
setMsg
(
"更新附件内容成功"
);
result
.
setCode
(
200
);
...
...
@@ -584,7 +586,7 @@ public class SuperBomPriceCalculateServiceImpl implements SuperBomPriceCalculate
/**
* @param list
*/
public
void
updateData
(
List
<
SuperCharacterPriceInfoDto
>
list
)
{
public
void
updateData
(
List
<
SuperCharacterPriceInfoDto
>
list
,
HttpServletRequest
request
)
{
//更新数据库里数据
ArrayList
<
Characteristics
>
updateList
=
new
ArrayList
<>();
list
.
stream
().
forEach
((
dto
)
->
{
...
...
@@ -618,6 +620,13 @@ public class SuperBomPriceCalculateServiceImpl implements SuperBomPriceCalculate
updateList
.
add
(
vPrice
);
});
for
(
Characteristics
info
:
updateList
)
{
Characteristics
cPrice
=
superBomPriceCalculateMapper
.
getPriceByCode
(
info
.
getSuperBomCode
(),
info
.
getCharacteristicCode
(),
info
.
getCharacteristicValueCode
());
CharacteristicsLogOpera
logOpera
=
new
CharacteristicsLogOpera
();
BeanUtils
.
copyProperties
(
cPrice
,
logOpera
);
logOpera
.
setUpdateUser
(
request
.
getHeader
(
"UserCode"
));
logOpera
.
setOpera
(
"/superBom/batchUpdateByUpload"
);
superBomPriceCalculateMapper
.
saveLogOpera
(
logOpera
);
info
.
setUpdateUser
(
request
.
getHeader
(
"UserCode"
));
superBomPriceCalculateMapper
.
updateCharacteristicInfo
(
info
);
}
}
...
...
src/main/java/cn/com/uitech/authorization/service/impl/TempServiceImpl.java
View file @
18539078
package
cn
.
com
.
uitech
.
authorization
.
service
.
impl
;
import
cn.com.uitech.authorization.controller.IntegrateController
;
...
...
@@ -30,7 +31,7 @@ public class TempServiceImpl implements TempServer {
private
IntegrateController
integrateController
;
@Autowired
private
IntegrateServiceImpl
integrateService
;
/*
@Override
public Object getTempList() {
GetProductOutDto result = new GetProductOutDto();
...
...
@@ -130,5 +131,6 @@ public class TempServiceImpl implements TempServer {
}
getTempList();
return result;
}
}
*/
}
src/main/java/cn/com/uitech/authorization/utils/IPUtils.java
deleted
100644 → 0
View file @
73a78212
package
cn
.
com
.
uitech
.
authorization
.
utils
;
import
org.apache.commons.lang3.StringUtils
;
import
javax.servlet.http.HttpServletRequest
;
/**
* IP地址
* @author liangkesai
* @date 2018/8/13 12:42
*/
public
class
IPUtils
{
/**
* 获取IP地址
* 使用Nginx等反向代理软件, 则不能通过request.getRemoteAddr()获取IP地址
* 如果使用了多级反向代理的话,X-Forwarded-For的值并不止一个,而是一串IP地址,X-Forwarded-For中第一个非unknown的有效IP字符串,则为真实IP地址
*/
public
static
String
getIpAddr
(
HttpServletRequest
request
)
{
String
ip
=
null
;
try
{
ip
=
request
.
getHeader
(
"x-forwarded-for"
);
if
(
StringUtils
.
isEmpty
(
ip
)
||
"unknown"
.
equalsIgnoreCase
(
ip
))
{
ip
=
request
.
getHeader
(
"Proxy-Client-IP"
);
}
if
(
StringUtils
.
isEmpty
(
ip
)
||
ip
.
length
()
==
0
||
"unknown"
.
equalsIgnoreCase
(
ip
))
{
ip
=
request
.
getHeader
(
"WL-Proxy-Client-IP"
);
}
if
(
StringUtils
.
isEmpty
(
ip
)
||
"unknown"
.
equalsIgnoreCase
(
ip
))
{
ip
=
request
.
getHeader
(
"HTTP_CLIENT_IP"
);
}
if
(
StringUtils
.
isEmpty
(
ip
)
||
"unknown"
.
equalsIgnoreCase
(
ip
))
{
ip
=
request
.
getHeader
(
"HTTP_X_FORWARDED_FOR"
);
}
if
(
StringUtils
.
isEmpty
(
ip
)
||
"unknown"
.
equalsIgnoreCase
(
ip
))
{
ip
=
request
.
getRemoteAddr
();
}
}
catch
(
Exception
e
)
{
}
// //使用代理,则获取第一个IP地址
// if(StringUtils.isEmpty(ip) && ip.length() > 15) {
// if(ip.indexOf(",") > 0) {
// ip = ip.substring(0, ip.indexOf(","));
// }
// }
return
ip
;
}
}
\ No newline at end of file
src/main/resources/application-lcrx-prod.yml
View file @
18539078
spring
:
redis
:
host
:
172.16.0.9
4
host
:
172.16.0.9
3
port
:
6379
database
:
0
ssl
:
false
...
...
src/main/resources/mapper/CharacteristicMapper.xml
View file @
18539078
...
...
@@ -46,7 +46,9 @@
h3c_c_code =#{H3CCCode},
is_hidden =#{isHidden},
is_h3c =#{isH3C},
sort = #{sort}
sort = #{sort},
update_time = now(),
update_user = #{updateUser}
where
Characteristic_Code=#{characteristicCode}
and super_bom_code = #{superBomCode}
...
...
@@ -214,14 +216,13 @@
</update>
<update
id=
"updateCharacteristicIsH3C"
>
update super_characteristic_info set is_h3c = #{isH3C}
update super_characteristic_info set is_h3c = #{isH3C}
,update_time = now(),update_user = #{userCode}
<where>
<if
test=
"characteristicCodes!=null"
>
characteristic_Code IN
<foreach
collection=
"characteristicCodes"
item=
"characteristicCode"
open=
"("
separator=
","
close=
")"
>
#{characteristicCode}
</foreach>
<if
test=
"characteristicCode!=null and characteristicCode!=''"
>
characteristic_Code = #{characteristicCode}
</if>
<if
test=
"superBomCode!='' and superBomCode!=null"
>
and super_bom_code = #{superBomCode}
</if>
</where>
</update>
...
...
@@ -267,7 +268,29 @@
</select>
<update
id=
"updateCharacteristicInfo"
>
update super_characteristic_info set is_h3c = #{isH3C} , unis_sales_c_name = #{unisSalesCName} , sort = #{sort}
update super_characteristic_info set is_h3c = #{isH3C} , unis_sales_c_name = #{unisSalesCName} , sort = #{sort}
,update_time = now(),update_user = #{updateUser}
where super_bom_code = #{superBomCode} and characteristic_Code = #{characteristicCode}
</update>
<insert
id=
"saveLogOpera"
>
INSERT INTO super_characteristic_info_log_opera(
characteristic_code,super_bom_code,characteristic_type,characteristic_name,
is_hidden,is_show,unis_sales_c_name,h3c_c_code,is_h3c,sort,update_time,update_user,opera)
VALUES
(
#{characteristicCode},#{superBomCode},#{characteristicType},#{characteristicName},#{isHidden},
#{isShow},#{unisSalesCName},#{H3CCCode},#{isH3C},#{sort},now(),#{updateUser},#{opera}
);
</insert>
<insert
id=
"saveAppluOpera"
>
insert into apply_log_opera (
url
,param
,update_user
,update_time
) values (
#{plmUrl},#{httpEntity},#{userCode},now()
)
</insert>
</mapper>
src/main/resources/mapper/CharacteristicValueMapper.xml
View file @
18539078
...
...
@@ -69,14 +69,13 @@
<update
id=
"batchModifyBomStatus"
parameterType=
"cn.com.uitech.authorization.pojo.dto.CharacteristicValueRequestParamDto"
>
UPDATE super_characteristic_value_info
SET is_state=#{isState}
SET is_state=#{isState}
,update_time = now(),update_user = #{updateUser}
<where>
<if
test=
"characteristicValueCodes!=null"
>
characteristic_Value_Code IN
<foreach
collection=
"characteristicValueCodes"
item=
"characteristicValueCode"
open=
"("
separator=
","
close=
")"
>
#{characteristicValueCode}
</foreach>
<if
test=
"characteristicValueCode!=null and characteristicValueCode != ''"
>
characteristic_Value_Code = #{characteristicValueCode}
</if>
<if
test=
"superBomCode!='' and superBomCode!=null"
>
and super_bom_code = #{superBomCode}
</if>
</where>
</update>
...
...
@@ -91,7 +90,9 @@
zph_name=#{zphName},
qualify_date=#{qualifyDate},
unis_sales_v_name=#{unisSalesVName},
h3c_c_value=#{h3cCValue}
h3c_c_value=#{h3cCValue},
update_time = now(),
update_user = #{updateUser}
where
Characteristic_Value_Code=#{characteristicValueCode}
and Characteristic_Code=#{characteristicCode}
...
...
@@ -340,7 +341,40 @@
</select>
<update
id=
"updateCharacteristicValue"
>
update super_characteristic_value_info set unis_sales_v_name = #{unisSalesVName},h3c_c_value = #{h3cCValue}, h3c_Deliver_Code = #{h3cDeliverCode}
update super_characteristic_value_info set
unis_sales_v_name = #{unisSalesVName},
h3c_c_value = #{h3cCValue},
h3c_Deliver_Code = #{h3cDeliverCode},
update_time = now(),
update_user = #{updateUser}
where super_bom_code = #{superBomCode} and characteristic_Code = #{characteristicCode} and characteristic_Value_Code = #{characteristicValueCode}
</update>
<insert
id=
"saveLogOpera"
>
insert into super_characteristic_value_info_log_opera(
characteristic_value_code
,characteristic_code
,characteristic_value_name
,is_state
,super_bom_code
,zph_code
,zph_name
,qualify_date
,unis_sales_v_name
,h3c_c_value
,is_base
,is_show
,h3c_deliver_code
,update_time
,update_user
,opera
) values (
#{characteristicValueCode},#{characteristicCode},#{characteristicValueName},#{isState},#{superBomCode},#{zphCode},#{zphName},
#{qualifyDate},#{unisSalesVName},#{h3cCValue},#{isBase},#{isShow},#{h3cDeliverCode},now(),#{updateUser},#{opera}
)
</insert>
<select
id=
"getVByCode"
resultType=
"cn.com.uitech.authorization.pojo.entity.CharacteristicValue"
>
select * from super_characteristic_value_info where characteristic_value_code = #{param1} and super_bom_code = #{param2}
</select>
</mapper>
src/main/resources/mapper/CtoBomMapper.xml
View file @
18539078
...
...
@@ -43,7 +43,9 @@
h3c_pn=#{h3cPn} ,
config_id=#{configId} ,
product_class_code=#{productClassCode},
unis_sales_name=#{unisSalesName}
unis_sales_name=#{unisSalesName},
update_time = now(),
update_user = #{updateUser}
where
<if
test=
"superBomCode!=null and superBomCode!=''"
>
super_bom_code=#{superBomCode}
...
...
@@ -75,8 +77,10 @@
UPDATE super_bom_info
<set>
<if
test=
"isState!=null"
>
is_state=#{isState}
is_state=#{isState}
,
</if>
update_time = now(),
update_user = #{updateUser}
</set>
<where>
<if
test=
"superBomCodes!=null and superBomCodes.size>0"
>
...
...
@@ -88,16 +92,6 @@
</where>
</update>
<select
id=
"selectInfoByCode"
resultType=
"integer"
>
select count(*) from configurablebom where ProductGroupCode = #{productGroupCode} and bomtypeid = #{bomTypeId}
</select>
<select
id=
"getCtoBomCodeNameAll"
parameterType=
"cn.com.uitech.authorization.pojo.dto.CtoBomRequestParamDto"
resultType=
"cn.com.uitech.authorization.pojo.entity.ConfigurableBom"
>
SELECT DISTINCT
...
...
@@ -121,71 +115,6 @@
</where>
</select>
<!--商机立项时 添加基准机型时 CTO下拉列表-->
<select
id=
"getCtoComboBox"
parameterType=
"cn.com.uitech.authorization.pojo.dto.CtoBomRequestParamDto"
resultType=
"cn.com.uitech.authorization.pojo.entity.ConfigurableBom"
>
SELECT DISTINCT
b.product_class_name,
a.type,
a.super_bom_name,
c.product_description,
a.super_bom_code,
a.product_class_code,
a.config_id,
b.product_class_name
FROM super_bom_info a left join a_productclasscode b on a.product_class_code = b.product_class_code
left join ProductDescription c on a.super_bom_code = c.super_bom_code
<where>
1=1
<if
test=
"isState!=null"
>
and is_state=#{isState}
</if>
<if
test=
"productClassCode!=null and productClassCode!=''"
>
and product_class_code=#{productClassCode}
</if>
<if
test=
"superBomName!=null and superBomName!=''"
>
and CONCAT(super_bom_code,super_bom_name) ilike CONCAT('%','${superBomName}','%')
</if>
</where>
</select>
<select
id=
"getCtoScopeNameAll"
parameterType=
"cn.com.uitech.authorization.pojo.dto.ComponentCargoDto"
resultType=
"cn.com.uitech.authorization.pojo.dto.ComponentCargoDto"
>
SELECT
super_bom_code,
super_bom_name
FROM super_bom_info
<where>
super_bom_info.is_state=1
<if
test=
"productClassCode!=null and productClassCode!=''"
>
and super_bom_info.product_class_Code=#{productClassCode}
</if>
<if
test=
"superBomName!=null and superBomName!=''"
>
and super_bom_info.super_bom_name=#{superBomName}
</if>
</where>
</select>
<!--新增产品od关系返回列表-->
<select
id=
"selectOdProductByPage"
resultType=
"cn.com.uitech.authorization.pojo.dto.OdProductResultDto"
>
SELECT
bomcode,
NAME,
2 as producttype
FROM super_bom_info
<where>
Status=1
<if
test=
"productGroupCode!=null and productGroupCode!=''"
>
and productgroupcode = #{productGroupCode}
</if>
<if
test=
"bomCode!=null and bomCode!=''"
>
and bomcode like CONCAT('%','${bomCode}','%')
</if>
<if
test=
"name!=null and name!=''"
>
and name like CONCAT('%','${name}','%')
</if>
</where>
</select>
<!--根据bomCode更新configId-->
<select
id=
"updateConfigId"
parameterType=
"cn.com.uitech.authorization.pojo.dto.StandardModelManageDto"
>
...
...
@@ -304,6 +233,7 @@
<result
column=
"model_status"
property=
"modelStatus"
></result>
<result
column=
"revision"
property=
"revision"
></result>
<result
column=
"h3c_pn"
property=
"h3cPn"
></result>
<result
column=
"unis_sales_name"
property=
"unisSalesName"
></result>
<result
column=
"is_state"
property=
"isState"
></result>
<collection
property=
"characteristicList"
ofType=
"cn.com.uitech.authorization.pojo.entity.Characteristic"
>
<result
column=
"super_bom_code"
property=
"superBomCode"
></result>
...
...
@@ -350,30 +280,11 @@
order by sort asc
</select>
<select
id=
"getSuperBomInfo"
resultMap=
"superBomInfo"
>
SELECT
A.*,
b.*,
C.*
FROM
super_bom_info
A LEFT JOIN super_characteristic_info b ON A.super_bom_code = b.super_bom_code
LEFT JOIN super_characteristic_value_info C ON b.characteristic_code = C.characteristic_code and A.super_bom_code = c.super_bom_code
WHERE
A.super_bom_code = #{ materialCode }
AND A.product_class_code = #{ productGroupCode}
and a.is_state = 1
and b.is_hidden = 1
and c.is_state = 1
</select>
<select
id=
"getSuperBomInfoBySuperBomCode"
resultType=
"String"
>
select config_id from super_bom_sku_info where sku_code = #{skuCode}
</select>
<select
id=
"getSkuInfo"
resultType=
"cn.com.uitech.authorization.pojo.entity.SuperBomSkuInfo"
>
select * from super_bom_sku_info where cpq_config_id = #{cpqConfigId} and super_bom_code = #{superPartNumber}
</select>
<select
id=
"getConfigId"
resultType=
"cn.com.uitech.authorization.pojo.entity.ConfigurableBom"
>
select * from super_bom_info where h3c_pn = #{h3cPn}
...
...
@@ -386,4 +297,44 @@
<select
id=
"getCto"
resultMap=
"superBomInfo"
>
select * from super_bom_info where super_bom_code = #{superBomCode}
</select>
<insert
id=
"saveLogOpera"
>
INSERT INTO super_bom_info_log_opera (
super_bom_code
,product_class_code
,super_bom_name
,is_state
,type
,description
,config_id
,product_class_name
,revision
,h3c_pn
,unis_sales_name
,model_status
,brand
,update_time
,update_user
,opera
)
VALUES
(
#{superBomCode},
#{productClassCode},
#{superBomName},
#{isState},
#{type},
#{description},
#{configId},
#{productClassName},
#{revision},
#{h3cPn},
#{unisSalesName},
#{modelStatus},
#{brand},
now(),
#{updateUser},
#{opera}
);
</insert>
</mapper>
\ No newline at end of file
src/main/resources/mapper/ProductDescriptionMapper.xml
deleted
100644 → 0
View file @
73a78212
<?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=
"cn.com.uitech.authorization.mapper.ProductDescriptionMapper"
>
<update
id=
"updateByBomCode"
parameterType=
"cn.com.uitech.authorization.pojo.entity.ProductDescription"
>
UPDATE productdescription
<set>
<if
test=
"productClassCode!=null and productClassCode!=''"
>
product_class_code=#{productClassCode},
</if>
<if
test=
"type!=null and type!=''"
>
type=#{type},
</if>
<if
test=
"productDescription!=null and productDescription!=''"
>
product_description=#{productDescription},
</if>
<if
test=
"originalPGCode!=null and originalPGCode!=''"
>
OriginalPGCode=#{originalPGCode}
</if>
</set>
<where>
<if
test=
"superBomCode!=null and superBomCode!=''"
>
super_bom_code=#{superBomCode}
</if>
</where>
</update>
</mapper>
src/main/resources/mapper/SuperBomPriceCalculateMapper.xml
View file @
18539078
...
...
@@ -197,9 +197,50 @@
leve2_price = #{leve2Price},
leve3_price = #{leve3Price},
leve4_price = #{leve4Price},
update_time = now()
update_time = now(),
update_user = #{updateUser}
where super_bom_code = #{superBomCode}
and character_Code = #{characteristicCode}
and character_Value_Code = #{characteristicValueCode}
</update>
<select
id=
"getPriceByCode"
resultType=
"cn.com.uitech.authorization.pojo.entity.Characteristics"
>
select super_bom_code as superBomCode
,character_code as characteristicCode
,character_value_code as characteristicValueCode
,actual_price as actualPrice
,leve0_price as leve0Price
,leve1_price as leve1Price
,leve2_price as leve2Price
,leve3_price as leve3Price
,leve4_price as leve4Price
,agent_price as agentPrice
,update_user as updateUser
,update_time as updateTime
from super_character_price_info
where super_bom_code = #{superBomCode}
and character_Code = #{characteristicCode}
and character_Value_Code = #{characteristicValueCode}
</select>
<insert
id=
"saveLogOpera"
>
insert into super_character_price_info_log_opera(
super_bom_code
,character_code
,character_value_code
,actual_price
,leve0_price
,leve1_price
,leve2_price
,leve3_price
,leve4_price
,agent_price
,update_user
,update_time
,opera
) values(
#{superBomCode},#{characteristicCode},#{characteristicValueCode},#{actualPrice},#{leve0Price},#{leve1Price},
#{leve2Price},#{leve3Price},#{leve4Price},#{agentPrice},#{updateUser},now(),#{opera}
)
</insert>
</mapper>
src/main/resources/mapper/UserInfoMapper.xml
View file @
18539078
...
...
@@ -18,7 +18,17 @@
upper(A.user_code) = upper(#{userCode})
</select>
<select
id=
"getUserOne"
resultType=
"cn.com.uitech.authorization.pojo.entity.UserInfo"
>
select * from user_info where user_code = #{userCode}
<select
id=
"getUserOne"
resultType=
"cn.com.uitech.authorization.pojo.entity.UserInfo"
>
select * from user_info where user_code = #{userCode}
</select>
<insert
id=
"saveUserOperationLog"
>
insert into user_operation_log(
id,user_code,update_time,msg
) values (
#{id},#{userCode},now(),#{msg}
)
</insert>
</mapper>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment