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
11c4a211
Commit
11c4a211
authored
Dec 10, 2021
by
zhaoxiaolei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
必填校验
parent
29b681c6
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
69 additions
and
9 deletions
+69
-9
CharacteristicController.java
...ch/authorization/controller/CharacteristicController.java
+10
-0
CharacteristicMapper.java
...com/uitech/authorization/mapper/CharacteristicMapper.java
+3
-0
CharacteristicRequestParamDto.java
...authorization/pojo/dto/CharacteristicRequestParamDto.java
+3
-0
Characteristic.java
.../com/uitech/authorization/pojo/entity/Characteristic.java
+3
-0
CharacteristicValue.java
...uitech/authorization/pojo/entity/CharacteristicValue.java
+4
-0
CharacteristicService.java
...m/uitech/authorization/service/CharacteristicService.java
+4
-0
CharacteristicServiceImpl.java
...authorization/service/impl/CharacteristicServiceImpl.java
+5
-0
IntegrateServiceImpl.java
...tech/authorization/service/impl/IntegrateServiceImpl.java
+15
-4
CharacteristicMapper.xml
src/main/resources/mapper/CharacteristicMapper.xml
+15
-1
SuperBomPriceCalculateMapper.xml
src/main/resources/mapper/SuperBomPriceCalculateMapper.xml
+7
-4
No files found.
src/main/java/cn/com/uitech/authorization/controller/CharacteristicController.java
View file @
11c4a211
package
cn
.
com
.
uitech
.
authorization
.
controller
;
import
cn.com.uitech.authorization.annotation.BathUpdate
;
import
cn.com.uitech.authorization.annotation.EditSave
;
import
cn.com.uitech.authorization.annotation.Query
;
import
cn.com.uitech.authorization.pojo.dto.CharacteristicRequestParamDto
;
import
cn.com.uitech.authorization.pojo.dto.CharacteristicValueRequestParamDto
;
import
cn.com.uitech.authorization.pojo.entity.Characteristic
;
import
cn.com.uitech.authorization.service.CharacteristicService
;
import
cn.com.uitech.authorization.service.SecurityService
;
...
...
@@ -99,5 +101,13 @@ public class CharacteristicController {
return
ResultGenerator
.
genSuccessResult
(
characteristicService
.
getCharacteristicAll
(
characteristicRequestParamDto
));
}
@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
));
}
}
src/main/java/cn/com/uitech/authorization/mapper/CharacteristicMapper.java
View file @
11c4a211
...
...
@@ -3,6 +3,7 @@ package cn.com.uitech.authorization.mapper;
import
cn.com.uitech.authorization.pojo.dto.ApplySkuCodeResultDto
;
import
cn.com.uitech.authorization.pojo.dto.CharacteristicRequestParamDto
;
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
;
...
...
@@ -86,4 +87,6 @@ public interface CharacteristicMapper extends IBaseMapper<Characteristic>, Inser
void
updateSuperBomSkuStatus
(
ApplySkuCodeResultDto
.
data
data
);
void
updateSuperBomSku
(
SuperBomSkuInfo
superBomSkuInfo
);
Integer
updateCharacteristicIsH3C
(
CharacteristicRequestParamDto
dto
);
}
src/main/java/cn/com/uitech/authorization/pojo/dto/CharacteristicRequestParamDto.java
View file @
11c4a211
...
...
@@ -56,6 +56,9 @@ public class CharacteristicRequestParamDto extends BasePageDto implements Seria
@ApiModelProperty
(
name
=
"isHidden"
,
value
=
"C显示隐藏"
,
dataType
=
"Integer"
)
private
Integer
isHidden
;
@ApiModelProperty
(
name
=
"isH3C"
,
value
=
"isH3C"
,
dataType
=
"Integer"
)
private
Integer
isH3C
;
/**
* 批量更新接口
*/
...
...
src/main/java/cn/com/uitech/authorization/pojo/entity/Characteristic.java
View file @
11c4a211
...
...
@@ -60,6 +60,9 @@ public class Characteristic implements Serializable{
@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
;
@Transient
...
...
src/main/java/cn/com/uitech/authorization/pojo/entity/CharacteristicValue.java
View file @
11c4a211
...
...
@@ -97,6 +97,10 @@ public class CharacteristicValue extends BasePageDto implements Serializable{
@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
;
...
...
src/main/java/cn/com/uitech/authorization/service/CharacteristicService.java
View file @
11c4a211
...
...
@@ -2,6 +2,7 @@ package cn.com.uitech.authorization.service;
import
cn.com.uitech.authorization.pojo.dto.CharacteristicDto
;
import
cn.com.uitech.authorization.pojo.dto.CharacteristicRequestParamDto
;
import
cn.com.uitech.authorization.pojo.dto.CharacteristicValueRequestParamDto
;
import
cn.com.uitech.authorization.pojo.entity.Characteristic
;
import
com.github.pagehelper.PageInfo
;
...
...
@@ -51,4 +52,7 @@ public interface CharacteristicService {
void
insertList
(
List
<
Characteristic
>
characteristics
);
Object
updateCharacteristicIsH3C
(
CharacteristicRequestParamDto
dto
);
}
src/main/java/cn/com/uitech/authorization/service/impl/CharacteristicServiceImpl.java
View file @
11c4a211
...
...
@@ -143,4 +143,9 @@ public class CharacteristicServiceImpl implements CharacteristicService {
}
}
}
@Override
public
Object
updateCharacteristicIsH3C
(
CharacteristicRequestParamDto
dto
)
{
return
characteristicMapper
.
updateCharacteristicIsH3C
(
dto
);
}
}
src/main/java/cn/com/uitech/authorization/service/impl/IntegrateServiceImpl.java
View file @
11c4a211
...
...
@@ -353,6 +353,8 @@ public class IntegrateServiceImpl implements IntegrateService {
GetProductOutDto
result
=
new
GetProductOutDto
();
if
(!
ObjectUtils
.
isEmpty
(
superBomSkuInfo
))
{
//根据 政采 模式 品牌 superbom 查询sku主信息
if
(
superBomSkuInfo
.
getPoliticalMiningId
()!=
null
&&
superBomSkuInfo
.
getPatern
()!=
null
&&
superBomSkuInfo
.
getSuperBomCode
()!=
null
&&
superBomSkuInfo
.
getBrand
()!=
null
){
List
<
SuperBomSkuInfo
>
skuInfos
=
superBomSkuInfoMapper
.
getSkuInfo
(
superBomSkuInfo
);
Boolean
flag
=
true
;
if
(!
CollectionUtils
.
isEmpty
(
skuInfos
))
{
...
...
@@ -415,7 +417,7 @@ public class IntegrateServiceImpl implements IntegrateService {
}
//撞配不通过 保存SKU信息&config信息 调用申请SKU接口 applySkuCode
if
(
flag
.
equals
(
tru
e
))
{
if
(
flag
.
equals
(
fals
e
))
{
superBomSkuInfo
.
setId
(
sequence
.
nextId
());
superBomSkuInfoMapper
.
saveSkuInfo
(
superBomSkuInfo
);
List
<
SuperBomSkuConfigInfo
>
characteristicList
=
superBomSkuInfo
.
getCharacteristicList
();
...
...
@@ -460,9 +462,16 @@ public class IntegrateServiceImpl implements IntegrateService {
}
}
else
{
result
.
setMsg
(
"是否政采/模式/产品编码/品牌是否,不能为空!"
);
result
.
setCode
(
500
);
result
.
setData
(
superBomSkuInfo
);
return
result
;
}
}
return
result
;
}
@Override
...
...
@@ -481,10 +490,12 @@ public class IntegrateServiceImpl implements IntegrateService {
JSONObject
data
=
(
JSONObject
)
map
.
get
(
"data"
);
result
.
setCode
(
200
);
result
.
setData
(
data
);
}
else
{
result
.
setCode
(
code
);
result
.
setMsg
((
String
)
map
.
get
(
"msg"
));
result
.
setData
(
superBomSkuInfo
);
}
//superBomSkuInfo.setSkuCode(getSkuInfo.getSkuCode());
//superBomSkuInfo.setSkuName(getSkuInfo.getSkuName());
return
ob
;
return
result
;
}
else
{
GetProductOutDto
ss
=
(
GetProductOutDto
)
ob
;
result
.
setCode
(
ss
.
getCode
());
...
...
src/main/resources/mapper/CharacteristicMapper.xml
View file @
11c4a211
...
...
@@ -29,7 +29,8 @@
unis_Sales_C_Name =#{unisSalesCName},
characteristic_type =#{characteristicType},
h3c_c_code =#{H3CCCode},
is_hidden =#{isHidden}
is_hidden =#{isHidden},
is_h3c =#{isH3C}
where
Characteristic_Code=#{characteristicCode}
</update>
...
...
@@ -193,4 +194,17 @@
<update
id=
"updateSuperBomSku"
>
update super_bom_sku_info set apply_status = #{description} where config_id = #{configId}
</update>
<update
id=
"updateCharacteristicIsH3C"
>
update super_characteristic_info set is_h3c = #{isH3C}
<where>
<if
test=
"characteristicCodes!=null"
>
characteristic_Code IN
<foreach
collection=
"characteristicCodes"
item=
"characteristicCode"
open=
"("
separator=
","
close=
")"
>
#{characteristicCode}
</foreach>
</if>
</where>
</update>
</mapper>
src/main/resources/mapper/SuperBomPriceCalculateMapper.xml
View file @
11c4a211
...
...
@@ -92,16 +92,19 @@
<if
test=
"superBomCode != null and superBomCode != ''.toString()"
>
a.super_bom_code = #{superBomCode}
</if>
<if
test=
"characteristicName != null and characteristicName != ''.toString()"
>
and b.characteristic_name = #{characteristicName}
<if
test=
"characteristicValueName != null and characteristicValueName != ''.toString()"
>
and c.characteristic_value_name = #{characteristicValueName}
</if>
<if
test=
"characteristicValueCode != null and characteristicValueCode != ''.toString()"
>
and c.characteristic_value_code = #{characteristicValueCode}
</if>
<if
test=
"characteristicCode != null and characteristicCode != ''.toString()"
>
and b.characteristic_code = #{characteristicCode}
</if>
<if
test=
"isState != null
and isState != ''.toString()
"
>
<if
test=
"isState != null"
>
and c.is_state = #{isState}
</if>
<if
test=
"superBomIsState != null
and superBomIsState != ''.toString()
"
>
<if
test=
"superBomIsState != null "
>
and a.is_state = #{superBomIsState}
</if>
<if
test=
"brand != null and brand != ''.toString()"
>
...
...
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