Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
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
项目统一框架
amos-boot-biz
Commits
f6cab0c1
Commit
f6cab0c1
authored
May 21, 2025
by
刘林
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop_tzs_register' into develop_tzs_register
parents
c93dc05c
d7c100f1
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
49 additions
and
7 deletions
+49
-7
BizDataChangeController.java
...oot/module/jg/biz/controller/BizDataChangeController.java
+1
-1
FillingCompanyTypeForCurrentUser.java
...biz/edit/permission/FillingCompanyTypeForCurrentUser.java
+0
-1
CommonEquipDataProcessService.java
...biz/edit/process/equip/CommonEquipDataProcessService.java
+3
-0
EquipChangeDataUpdateServiceImpl.java
.../edit/process/equip/EquipChangeDataUpdateServiceImpl.java
+1
-0
SingleEquipChangeProcess.java
...e/jg/biz/edit/process/equip/SingleEquipChangeProcess.java
+32
-1
CommonServiceImpl.java
...os/boot/module/jg/biz/service/impl/CommonServiceImpl.java
+12
-4
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/BizDataChangeController.java
View file @
f6cab0c1
...
@@ -90,7 +90,7 @@ public class BizDataChangeController extends BaseController {
...
@@ -90,7 +90,7 @@ public class BizDataChangeController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/v2/{bizType}/change-logs"
)
@GetMapping
(
value
=
"/v2/{bizType}/change-logs"
)
@ApiOperation
(
value
=
"编辑
二
级页面详情查询--通用"
,
httpMethod
=
"GET"
)
@ApiOperation
(
value
=
"编辑
一
级页面详情查询--通用"
,
httpMethod
=
"GET"
)
public
ResponseModel
<
IPage
<?>>
getChangeLogPage
(
@ApiParam
(
value
=
"设备或者装置唯一标识"
)
@RequestParam
String
bizId
,
public
ResponseModel
<
IPage
<?>>
getChangeLogPage
(
@ApiParam
(
value
=
"设备或者装置唯一标识"
)
@RequestParam
String
bizId
,
@ApiParam
(
required
=
true
,
value
=
"业务类型"
)
@PathVariable
String
bizType
,
@ApiParam
(
required
=
true
,
value
=
"业务类型"
)
@PathVariable
String
bizType
,
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"current"
)
int
current
,
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/edit/permission/FillingCompanyTypeForCurrentUser.java
View file @
f6cab0c1
...
@@ -33,7 +33,6 @@ public class FillingCompanyTypeForCurrentUser extends BaseUseRegisterResultData
...
@@ -33,7 +33,6 @@ public class FillingCompanyTypeForCurrentUser extends BaseUseRegisterResultData
}
else
{
}
else
{
jsonObject
.
put
(
COMPANY_TYPE
,
BaseController
.
COMPANY_TYPE_SUPERVISION
);
jsonObject
.
put
(
COMPANY_TYPE
,
BaseController
.
COMPANY_TYPE_SUPERVISION
);
}
}
}
}
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/edit/process/equip/CommonEquipDataProcessService.java
View file @
f6cab0c1
...
@@ -19,6 +19,7 @@ import com.yeejoin.amos.boot.module.common.api.dto.IBaseChangeData;
...
@@ -19,6 +19,7 @@ import com.yeejoin.amos.boot.module.common.api.dto.IBaseChangeData;
import
com.yeejoin.amos.boot.module.jg.api.dto.*
;
import
com.yeejoin.amos.boot.module.jg.api.dto.*
;
import
com.yeejoin.amos.boot.module.jg.api.enums.EquipSourceEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.EquipSourceEnum
;
import
com.yeejoin.amos.boot.module.jg.biz.service.*
;
import
com.yeejoin.amos.boot.module.jg.biz.service.*
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.CommonServiceImpl
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.IdxBizJgProjectContraptionServiceImpl
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.IdxBizJgProjectContraptionServiceImpl
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.IdxBizJgUseInfoServiceImpl
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.IdxBizJgUseInfoServiceImpl
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.JgUseRegistrationServiceImpl
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.JgUseRegistrationServiceImpl
;
...
@@ -107,6 +108,8 @@ public class CommonEquipDataProcessService {
...
@@ -107,6 +108,8 @@ public class CommonEquipDataProcessService {
private
final
JgUseRegistrationServiceImpl
jgUseRegistrationService
;
private
final
JgUseRegistrationServiceImpl
jgUseRegistrationService
;
private
final
CommonServiceImpl
commonService
;
public
static
final
String
BASE_COLUMN_REC_DATE
=
"\"REC_DATE\""
;
public
static
final
String
BASE_COLUMN_REC_DATE
=
"\"REC_DATE\""
;
public
static
final
String
BASE_COLUMN_REC_USERID
=
"\"REC_USER_ID\""
;
public
static
final
String
BASE_COLUMN_REC_USERID
=
"\"REC_USER_ID\""
;
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/edit/process/equip/EquipChangeDataUpdateServiceImpl.java
View file @
f6cab0c1
...
@@ -174,6 +174,7 @@ public class EquipChangeDataUpdateServiceImpl {
...
@@ -174,6 +174,7 @@ public class EquipChangeDataUpdateServiceImpl {
esEquipmentCategoryDto
.
setEQU_TYPE
(
registerChangeDataDto
.
getEquType
());
esEquipmentCategoryDto
.
setEQU_TYPE
(
registerChangeDataDto
.
getEquType
());
esEquipmentCategoryDto
.
setEQU_CATEGORY_CODE
(
registerChangeDataDto
.
getEquCategory
());
esEquipmentCategoryDto
.
setEQU_CATEGORY_CODE
(
registerChangeDataDto
.
getEquCategory
());
esEquipmentCategoryDto
.
setEQU_DEFINE_CODE
(
registerChangeDataDto
.
getEquDefine
());
esEquipmentCategoryDto
.
setEQU_DEFINE_CODE
(
registerChangeDataDto
.
getEquDefine
());
esEquipmentCategoryDto
.
setUSE_ORG_CODE
(
registerChangeDataDto
.
getUseOrgCode
());
// 冗余设备类别名称
// 冗余设备类别名称
if
(
StringUtils
.
isEmpty
(
registerChangeDataDto
.
getEquCategory
()))
{
if
(
StringUtils
.
isEmpty
(
registerChangeDataDto
.
getEquCategory
()))
{
esEquipmentCategoryDto
.
setEQU_CATEGORY
(
null
);
esEquipmentCategoryDto
.
setEQU_CATEGORY
(
null
);
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/edit/process/equip/SingleEquipChangeProcess.java
View file @
f6cab0c1
...
@@ -4,12 +4,16 @@ import cn.hutool.core.bean.BeanUtil;
...
@@ -4,12 +4,16 @@ import cn.hutool.core.bean.BeanUtil;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yeejoin.amos.boot.module.jg.api.dto.FieldChangeMeta
;
import
com.yeejoin.amos.boot.module.jg.api.dto.FieldChangeMeta
;
import
com.yeejoin.amos.boot.module.jg.api.enums.CylinderTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.DefaultBizDataChangeHandler
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.DefaultBizDataChangeHandler
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.strategy.IBizDataChangeHandleStrategy
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.strategy.IBizDataChangeHandleStrategy
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.process.equip.strategy.IEquipChangeDataProcessStrategy
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.process.equip.strategy.IEquipChangeDataProcessStrategy
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.*
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.*
;
import
lombok.RequiredArgsConstructor
;
import
lombok.RequiredArgsConstructor
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
...
@@ -40,6 +44,9 @@ public class SingleEquipChangeProcess implements IEquipChangeDataProcessStrategy
...
@@ -40,6 +44,9 @@ public class SingleEquipChangeProcess implements IEquipChangeDataProcessStrategy
CommonEquipDataProcessService
.
castMap2Bean
(
changeJson
,
registerInfoNew
);
CommonEquipDataProcessService
.
castMap2Bean
(
changeJson
,
registerInfoNew
);
registerInfoNew
.
setSequenceNbr
(
registerInfoOld
.
getSequenceNbr
());
registerInfoNew
.
setSequenceNbr
(
registerInfoOld
.
getSequenceNbr
());
// 历史有证设备检验(台套类设备+气瓶)
beforeCheckForUseOrgCode
(
useInfoOld
,
registerInfoNew
);
IdxBizJgFactoryInfo
factoryInfoOld
=
commonEquipDataProcessService
.
getJgFactoryInfoMapper
().
selectOne
(
new
LambdaQueryWrapper
<
IdxBizJgFactoryInfo
>().
eq
(
IdxBizJgFactoryInfo:
:
getRecord
,
record
));
IdxBizJgFactoryInfo
factoryInfoOld
=
commonEquipDataProcessService
.
getJgFactoryInfoMapper
().
selectOne
(
new
LambdaQueryWrapper
<
IdxBizJgFactoryInfo
>().
eq
(
IdxBizJgFactoryInfo:
:
getRecord
,
record
));
IdxBizJgFactoryInfo
factoryInfoNew
=
BeanUtil
.
copyProperties
(
factoryInfoOld
,
IdxBizJgFactoryInfo
.
class
);
IdxBizJgFactoryInfo
factoryInfoNew
=
BeanUtil
.
copyProperties
(
factoryInfoOld
,
IdxBizJgFactoryInfo
.
class
);
CommonEquipDataProcessService
.
castMap2Bean
(
changeJson
,
factoryInfoNew
);
CommonEquipDataProcessService
.
castMap2Bean
(
changeJson
,
factoryInfoNew
);
...
@@ -54,7 +61,7 @@ public class SingleEquipChangeProcess implements IEquipChangeDataProcessStrategy
...
@@ -54,7 +61,7 @@ public class SingleEquipChangeProcess implements IEquipChangeDataProcessStrategy
IdxBizJgOtherInfo
otherInfoNew
=
BeanUtil
.
copyProperties
(
otherInfoOld
,
IdxBizJgOtherInfo
.
class
);
IdxBizJgOtherInfo
otherInfoNew
=
BeanUtil
.
copyProperties
(
otherInfoOld
,
IdxBizJgOtherInfo
.
class
);
CommonEquipDataProcessService
.
castMap2Bean
(
changeJson
,
otherInfoNew
);
CommonEquipDataProcessService
.
castMap2Bean
(
changeJson
,
otherInfoNew
);
otherInfoNew
.
setSequenceNbr
(
otherInfoOld
.
getSequenceNbr
());
otherInfoNew
.
setSequenceNbr
(
otherInfoOld
.
getSequenceNbr
());
IdxBizJgSupervisionInfo
idxBizJgSupervisionInfoOld
=
commonEquipDataProcessService
.
getJgUseRegistrationService
().
getIdxBizJgSupervisionInfoMapper
().
selectOne
(
new
LambdaQueryWrapper
<
IdxBizJgSupervisionInfo
>().
eq
(
IdxBizJgSupervisionInfo:
:
getRecord
,
record
));
IdxBizJgSupervisionInfo
idxBizJgSupervisionInfoOld
=
commonEquipDataProcessService
.
getJgUseRegistrationService
().
getIdxBizJgSupervisionInfoMapper
().
selectOne
(
new
LambdaQueryWrapper
<
IdxBizJgSupervisionInfo
>().
eq
(
IdxBizJgSupervisionInfo:
:
getRecord
,
record
));
IdxBizJgSupervisionInfo
idxBizJgSupervisionInfoNew
=
BeanUtil
.
copyProperties
(
idxBizJgSupervisionInfoOld
,
IdxBizJgSupervisionInfo
.
class
);
IdxBizJgSupervisionInfo
idxBizJgSupervisionInfoNew
=
BeanUtil
.
copyProperties
(
idxBizJgSupervisionInfoOld
,
IdxBizJgSupervisionInfo
.
class
);
CommonEquipDataProcessService
.
castMap2Bean
(
changeJson
,
idxBizJgSupervisionInfoNew
);
CommonEquipDataProcessService
.
castMap2Bean
(
changeJson
,
idxBizJgSupervisionInfoNew
);
...
@@ -112,6 +119,7 @@ public class SingleEquipChangeProcess implements IEquipChangeDataProcessStrategy
...
@@ -112,6 +119,7 @@ public class SingleEquipChangeProcess implements IEquipChangeDataProcessStrategy
List
<
FieldChangeMeta
>
idxBizJgSupervisionInfoFieldChangeMetas
=
commonEquipDataProcessService
.
simpleTrackAndUpdate
(
commonEquipDataProcessService
.
getJgUseRegistrationService
().
getIdxBizJgSupervisionInfoMapper
(),
idxBizJgSupervisionInfoOld
,
idxBizJgSupervisionInfoNew
,
useInfoNew
.
getRecord
(),
"record"
,
useInfoNew
.
getRecord
());
List
<
FieldChangeMeta
>
idxBizJgSupervisionInfoFieldChangeMetas
=
commonEquipDataProcessService
.
simpleTrackAndUpdate
(
commonEquipDataProcessService
.
getJgUseRegistrationService
().
getIdxBizJgSupervisionInfoMapper
(),
idxBizJgSupervisionInfoOld
,
idxBizJgSupervisionInfoNew
,
useInfoNew
.
getRecord
(),
"record"
,
useInfoNew
.
getRecord
());
allChangeColumns
.
addAll
(
idxBizJgSupervisionInfoFieldChangeMetas
);
allChangeColumns
.
addAll
(
idxBizJgSupervisionInfoFieldChangeMetas
);
commonEquipDataProcessService
.
updateEsDataOfEquip
(
record
,
registerInfoNew
);
commonEquipDataProcessService
.
updateEsDataOfEquip
(
record
,
useInfoNew
);
commonEquipDataProcessService
.
updateEsDataOfEquip
(
record
,
useInfoNew
);
commonEquipDataProcessService
.
updateEsDataOfEquip
(
record
,
designInfoNew
);
commonEquipDataProcessService
.
updateEsDataOfEquip
(
record
,
designInfoNew
);
commonEquipDataProcessService
.
updateEsDataOfEquip
(
record
,
otherInfoNew
);
commonEquipDataProcessService
.
updateEsDataOfEquip
(
record
,
otherInfoNew
);
...
@@ -121,6 +129,29 @@ public class SingleEquipChangeProcess implements IEquipChangeDataProcessStrategy
...
@@ -121,6 +129,29 @@ public class SingleEquipChangeProcess implements IEquipChangeDataProcessStrategy
return
allChangeColumns
;
return
allChangeColumns
;
}
}
private
void
beforeCheckForUseOrgCode
(
IdxBizJgUseInfo
useInfoOld
,
IdxBizJgRegisterInfo
registerInfoNew
)
{
// 1.使用登记证编辑时重复性校验
if
(!
CylinderTypeEnum
.
CYLINDER
.
getCode
().
equals
(
registerInfoNew
.
getEquCategory
()))
{
// 非气瓶逻辑,所有设备不能重复
if
(
useInfoOld
.
getDataSource
().
equals
(
"jg_his"
)
&&
StringUtils
.
isNotEmpty
(
registerInfoNew
.
getUseOrgCode
()))
{
Boolean
isUsed
=
commonEquipDataProcessService
.
getCommonService
().
useRegistrationCertificateAccountUnique
(
registerInfoNew
.
getUseOrgCode
(),
useInfoOld
.
getRecord
());
if
(
isUsed
){
throw
new
BadRequest
(
"使用登记证编号已存在!"
);
}
}
}
else
{
// 气瓶逻辑,使用单位下不能重复
if
(
StringUtils
.
isNotEmpty
(
useInfoOld
.
getUseUnitCreditCode
()))
{
// 需求 35094 历史设备(有使用登记证)需按证录入。录入时先录入使用登记证编号。
// 需验证录入的使用登记证编号平台是否跟当前用户(使用单位类型)一致,如跟当前用户不一致,系统给出提示“该使用登记证编号”已被“单位名称“使用”,请确认后再录入”。
// 历史设备不限制使用登记证编号在一个单位重复录入,但需验证使用登记证编号+单位内编号唯一。(下面方法checkFactoryNumUniqueWithGasCylinder中已经校验)
String
occupiedUseUnitName
=
commonEquipDataProcessService
.
getCommonService
().
isRegistrationNumberUsedByOtherUnits
(
registerInfoNew
.
getUseOrgCode
(),
useInfoOld
.
getUseUnitCreditCode
());
if
(!
ValidationUtil
.
isEmpty
(
occupiedUseUnitName
))
{
throw
new
BadRequest
(
"该使用登记证编号已被【"
+
occupiedUseUnitName
+
"】使用,请确认后再录入!"
);
}
}
}
}
@Override
@Override
public
IBizDataChangeHandleStrategy
.
ModelType
canHandleMode
()
{
public
IBizDataChangeHandleStrategy
.
ModelType
canHandleMode
()
{
return
DefaultBizDataChangeHandler
.
ModelType
.
singleEquip
;
return
DefaultBizDataChangeHandler
.
ModelType
.
singleEquip
;
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/CommonServiceImpl.java
View file @
f6cab0c1
...
@@ -3015,10 +3015,7 @@ public class CommonServiceImpl implements ICommonService {
...
@@ -3015,10 +3015,7 @@ public class CommonServiceImpl implements ICommonService {
*/
*/
public
Boolean
useRegistrationCertificateAccountUnique
(
String
useRegistrationCode
,
String
equipId
)
{
public
Boolean
useRegistrationCertificateAccountUnique
(
String
useRegistrationCode
,
String
equipId
)
{
Integer
count
=
commonMapper
.
useRegistrationCertificateAccountUnique
(
useRegistrationCode
,
equipId
);
Integer
count
=
commonMapper
.
useRegistrationCertificateAccountUnique
(
useRegistrationCode
,
equipId
);
if
(
count
>
0
)
{
return
count
>
0
;
return
true
;
}
return
false
;
}
}
/**
/**
...
@@ -3037,6 +3034,17 @@ public class CommonServiceImpl implements ICommonService {
...
@@ -3037,6 +3034,17 @@ public class CommonServiceImpl implements ICommonService {
}
}
/**
/**
* 判断使用登记证编号是否被其他单位使用
* @param useRegistrationCode 使用登记证编号
* @param companyCode 使用登记证所在单位编码
* @return 使用的单位
*/
public
String
isRegistrationNumberUsedByOtherUnits
(
String
useRegistrationCode
,
String
companyCode
)
{
String
companyCodeReal
=
companyCode
.
contains
(
"_"
)
?
companyCode
.
split
(
"_"
)[
1
]
:
companyCode
;
return
commonMapper
.
isRegistrationNumberUsedByOtherUnits
(
useRegistrationCode
,
companyCodeReal
);
}
/**
* 根据单位ID查询单位的信用代码及名称
* 根据单位ID查询单位的信用代码及名称
* @param unitSeq 单位seq
* @param unitSeq 单位seq
* @return 单位信用代码_单位名称
* @return 单位信用代码_单位名称
...
...
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