Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
JSH ERP
Commits
95561f8b
Commit
95561f8b
authored
Dec 01, 2021
by
季圣华
Browse files
解决计量单位更新的bug
parent
5df31c1e
Changes
3
Hide whitespace changes
Inline
Side-by-side
jshERP-boot/src/main/java/com/jsh/erp/datasource/mappers/UnitMapperEx.java
View file @
95561f8b
...
@@ -18,4 +18,8 @@ public interface UnitMapperEx {
...
@@ -18,4 +18,8 @@ public interface UnitMapperEx {
@Param
(
"name"
)
String
name
);
@Param
(
"name"
)
String
name
);
int
batchDeleteUnitByIds
(
@Param
(
"updateTime"
)
Date
updateTime
,
@Param
(
"updater"
)
Long
updater
,
@Param
(
"ids"
)
String
ids
[]);
int
batchDeleteUnitByIds
(
@Param
(
"updateTime"
)
Date
updateTime
,
@Param
(
"updater"
)
Long
updater
,
@Param
(
"ids"
)
String
ids
[]);
void
updateRatioTwoById
(
@Param
(
"id"
)
Long
id
);
void
updateRatioThreeById
(
@Param
(
"id"
)
Long
id
);
}
}
\ No newline at end of file
jshERP-boot/src/main/java/com/jsh/erp/service/unit/UnitService.java
View file @
95561f8b
...
@@ -120,6 +120,12 @@ public class UnitService {
...
@@ -120,6 +120,12 @@ public class UnitService {
try
{
try
{
parseNameByUnit
(
unit
);
parseNameByUnit
(
unit
);
result
=
unitMapper
.
updateByPrimaryKeySelective
(
unit
);
result
=
unitMapper
.
updateByPrimaryKeySelective
(
unit
);
if
(
unit
.
getRatioTwo
()==
null
)
{
unitMapperEx
.
updateRatioTwoById
(
unit
.
getId
());
}
if
(
unit
.
getRatioThree
()==
null
)
{
unitMapperEx
.
updateRatioThreeById
(
unit
.
getId
());
}
logService
.
insertLog
(
"计量单位"
,
logService
.
insertLog
(
"计量单位"
,
new
StringBuffer
(
BusinessConstants
.
LOG_OPERATION_TYPE_EDIT
).
append
(
unit
.
getName
()).
toString
(),
request
);
new
StringBuffer
(
BusinessConstants
.
LOG_OPERATION_TYPE_EDIT
).
append
(
unit
.
getName
()).
toString
(),
request
);
}
catch
(
Exception
e
){
}
catch
(
Exception
e
){
...
...
jshERP-boot/src/main/resources/mapper_xml/UnitMapperEx.xml
View file @
95561f8b
...
@@ -35,4 +35,14 @@
...
@@ -35,4 +35,14 @@
</foreach>
</foreach>
)
)
</update>
</update>
<update
id=
"updateRatioTwoById"
>
update jsh_unit
set ratio_two=null
where id=#{id}
</update>
<update
id=
"updateRatioThreeById"
>
update jsh_unit
set ratio_three=null
where id=#{id}
</update>
</mapper>
</mapper>
\ No newline at end of file
Write
Preview
Supports
Markdown
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