Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
T
tianjin-cement
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
竹天卫
tianjin-cement
Commits
582a44ee
Commit
582a44ee
authored
Mar 18, 2021
by
竹天卫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改禅道的bug
parent
71a7f82a
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
97 additions
and
68 deletions
+97
-68
EntrustController.java
...wise/sc/cement/business/controller/EntrustController.java
+13
-34
EntrustMapper.xml
...a/cn/wise/sc/cement/business/mapper/xml/EntrustMapper.xml
+3
-0
PlanTrainingMapper.xml
...wise/sc/cement/business/mapper/xml/PlanTrainingMapper.xml
+2
-1
IEntrustService.java
...a/cn/wise/sc/cement/business/service/IEntrustService.java
+29
-25
IPlanTrainingService.java
...wise/sc/cement/business/service/IPlanTrainingService.java
+0
-1
EntrustServiceImpl.java
...e/sc/cement/business/service/impl/EntrustServiceImpl.java
+50
-7
No files found.
cement-business/src/main/java/cn/wise/sc/cement/business/controller/EntrustController.java
View file @
582a44ee
...
...
@@ -76,20 +76,6 @@ public class EntrustController {
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
@ApiOperation
(
"委托列表导出"
)
@PostMapping
(
"/export"
)
public
void
export
(
String
startDate
,
String
endDate
,
Integer
status
,
Integer
clientId
,
String
projectName
,
String
projectCode
,
String
fileName
,
HttpServletResponse
response
)
{
try
{
entrustService
.
export
(
startDate
,
endDate
,
status
,
clientId
,
projectName
,
projectCode
,
fileName
,
response
);
}
catch
(
Exception
e
)
{
log
.
debug
(
"委托列表导出{}"
,
e
);
}
}
@ApiOperation
(
value
=
"置顶取消置顶 (createTime = updateTime显示置顶,否则显示取消置顶)"
)
@PostMapping
(
"/setTopping"
)
public
BaseResponse
setTopping
(
Integer
id
)
{
...
...
@@ -698,6 +684,19 @@ public class EntrustController {
//*********************导出**************************************************
@ApiOperation
(
"委托列表导出"
)
@PostMapping
(
"/export"
)
public
void
export
(
String
startDate
,
String
endDate
,
Integer
status
,
Integer
clientId
,
String
projectName
,
String
projectCode
,
String
fileName
,
HttpServletResponse
response
)
{
try
{
entrustService
.
export
(
startDate
,
endDate
,
status
,
clientId
,
projectName
,
projectCode
,
fileName
,
response
);
}
catch
(
Exception
e
)
{
log
.
debug
(
"委托列表导出{}"
,
e
);
}
}
@PostMapping
(
"/export/{entrustId}"
)
@ApiOperation
(
"导出委托单"
)
...
...
@@ -724,11 +723,6 @@ public class EntrustController {
.
forEach
(
arg
->
{
arg
.
setName
(
arg
.
getName
()
==
null
?
""
:
arg
.
getName
());
arg
.
setSampleCode
(
arg
.
getSampleCode
()
==
null
?
""
:
arg
.
getSampleCode
());
/*List<SampleTeamGroupVo> teamVoList = arg.getSampleTeamGroupVoList();
teamVoList.forEach(args ->{
List<SampleDistributionTeamVo> teamVoList2 = args.getSampleDistributionTeamVoList();
arg.setTeamName(getTeamName(teamVoList2));
});*/
sampleList
.
add
(
arg
);
});
beanParams
.
put
(
"list"
,
sampleList
);
...
...
@@ -737,21 +731,6 @@ public class EntrustController {
beanParams
,
response
,
FileExt
.
DOC
);
}
private
String
getTeamName
(
List
<
SampleDistributionTeamVo
>
teamVos
)
{
if
(
teamVos
.
size
()
==
0
)
{
return
""
;
}
StringBuffer
rts
=
new
StringBuffer
();
teamVos
.
forEach
(
arg
->
{
rts
.
append
(
arg
.
getTeamName
()).
append
(
"、"
);
});
return
rts
.
substring
(
0
,
rts
.
toString
().
length
()
-
1
);
}
@PostMapping
(
"/exportDistribution/{entrustId}"
)
@ApiOperation
(
"导出检测通知单"
)
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/xml/EntrustMapper.xml
View file @
582a44ee
...
...
@@ -23,6 +23,9 @@
<if
test=
"params.clientName != null and params.clientName != ''"
>
and c.name like concat('%', #{params.clientName}, '%')
</if>
<if
test=
"params.clientId != null"
>
and e.client_id = #{params.clientId}
</if>
<if
test=
"params.projectName != null and params.projectName != ''"
>
and p.name like concat('%', #{params.projectName}, '%')
</if>
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/xml/PlanTrainingMapper.xml
View file @
582a44ee
...
...
@@ -45,7 +45,7 @@
<select
id=
"exportList"
resultType=
"java.util.HashMap"
>
SELECT
IF(ISNULL(pt.id.name),'',pt.id)
as 序号,
(@i:=@i+1)
as 序号,
IF(ISNULL(pt.plan_object),'',pt.plan_object) as 培训对象,
IF(ISNULL(pt.objective),'',pt.objective) as 培训目的,
IF(ISNULL(pt.content),'',pt.content) as 培训内容,
...
...
@@ -55,6 +55,7 @@
IF(ISNULL(pt.assessment),'',pt.assessment) as 考核人,
IF(ISNULL(pt.implementation),'',pt.implementation) as 实施情况
from plan_training pt
(@i:=@i+1) as 序号,
<include
refid=
"where"
/>
ORDER BY pt.id ASC
</select>
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/service/IEntrustService.java
View file @
582a44ee
...
...
@@ -119,37 +119,30 @@ public interface IEntrustService extends IService<Entrust> {
BaseResponse
<
String
>
makePublicEnclosure
(
Integer
isPublic
,
Integer
id
,
Integer
type
);
//委托单详情
BaseResponse
<
EntrustVo
>
getBaseDtail
(
Integer
id
);
//报告
BaseResponse
<
IPage
<
EntrustVo
>>
getReportPage
(
PageQuery
pageQuery
,
String
startDate
,
String
endDate
,
Integer
clientId
,
String
projectName
,
String
projectCode
);
BaseResponse
<
EntrustVo
>
getBaseDtailClient
(
Integer
id
);
ReportDetailVo
getReportDetail
(
Integer
entrustI
d
);
BaseResponse
<
List
<
SampleHandleVo
>>
getSampleHandleDtail
(
Integer
i
d
);
BaseResponse
<
IPage
<
EntrustVo
>>
getQualityPage
(
PageQuery
pageQuery
,
String
startDate
,
String
endDate
,
Integer
clientId
,
String
projectName
,
String
projectCode
);
BaseResponse
<
List
<
SampleVo
>>
getSampleCheckDetail
(
Integer
id
);
QualityDetailVo
getQualityDetail
(
Integer
entrustI
d
);
BaseResponse
<
List
<
SampleVo
>>
getSampleCheckDtail
(
Integer
i
d
);
void
export
(
String
startDate
,
String
endDate
,
Integer
status
,
Integer
clientId
,
String
projectName
,
String
projectCode
,
String
fileName
,
HttpServletResponse
response
);
//检测报告
BaseResponse
<
IPage
<
EntrustVo
>>
getReportPage
(
PageQuery
pageQuery
,
String
startDate
,
String
endDate
,
Integer
clientId
,
String
projectName
,
String
projectCode
);
BaseResponse
<
EntrustVo
>
getBaseDtail
(
Integer
i
d
);
ReportDetailVo
getReportDetail
(
Integer
entrustI
d
);
BaseResponse
<
EntrustVo
>
getBaseDtailClient
(
Integer
i
d
);
List
<
TenElementReport
>
getTen1List
(
Integer
entrustI
d
);
BaseResponse
<
List
<
SampleHandleVo
>>
getSampleHandleDtail
(
Integer
id
);
BaseResponse
<
List
<
SampleVo
>>
getSampleCheckDetail
(
Integer
id
);
BaseResponse
<
List
<
SampleVo
>>
getSampleCheckDtail
(
Integer
id
);
List
<
TenElementReport
>
getTen1List
(
Integer
entrustId
);
/**
* 查询工业特性
*
...
...
@@ -158,13 +151,24 @@ public interface IEntrustService extends IService<Entrust> {
*/
List
<
IndustrialReport
>
getSampleIndustrialCheck
(
Integer
entrustId
);
/**
* 导出样品流转单
* @param entrustId
* @return
*/
BaseResponse
<
Map
<
String
,
Object
>>
getSampleFlowList
(
Integer
entrustId
);
//质量管理
BaseResponse
<
IPage
<
EntrustVo
>>
getQualityPage
(
PageQuery
pageQuery
,
String
startDate
,
String
endDate
,
Integer
clientId
,
String
projectName
,
String
projectCode
);
QualityDetailVo
getQualityDetail
(
Integer
entrustId
);
//导出
void
export
(
String
startDate
,
String
endDate
,
Integer
status
,
Integer
clientId
,
String
projectName
,
String
projectCode
,
String
fileName
,
HttpServletResponse
response
);
BaseResponse
<
Map
<
String
,
Object
>>
getSampleFlowList
(
Integer
entrustId
);
void
exportSampleLabel
(
Integer
entrustId
,
String
fileName
,
HttpServletResponse
response
);
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/service/IPlanTrainingService.java
View file @
582a44ee
...
...
@@ -87,7 +87,6 @@ public interface IPlanTrainingService extends IService<PlanTraining> {
/**
* 培训计划导出
*
* @param objective 培训目的
* @param filename 文件名
* @param response
*/
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/EntrustServiceImpl.java
View file @
582a44ee
...
...
@@ -306,10 +306,28 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
.
setUpdateTime
(
entrust
.
getCreateTime
())
.
setSampleNum
(
query
.
getSampleTmpList
().
size
())
.
setIsTop
(
0
);
entrustMapper
.
insert
(
entrust
);
if
(
query
.
getSampleTmpList
()
!=
null
&&
query
.
getSampleTmpList
().
size
()
>
0
)
{
List
<
SampleTmp
>
sampleTmpList
=
new
ArrayList
<>();
for
(
SampleTmpQuery
sampleTmpQuery
:
query
.
getSampleTmpList
())
{
if
(
StringUtils
.
isEmpty
(
sampleTmpQuery
.
getName
()))
{
return
BaseResponse
.
errorMsg
(
"请填写样品名"
);
}
if
(
StringUtils
.
isEmpty
(
sampleTmpQuery
.
getSampleCode
()))
{
return
BaseResponse
.
errorMsg
(
"请填写来样编号"
);
}
if
(
StringUtils
.
isEmpty
(
sampleTmpQuery
.
getSampleForm
()))
{
return
BaseResponse
.
errorMsg
(
"请选择样品状态"
);
}
if
(
StringUtils
.
isEmpty
(
sampleTmpQuery
.
getTeamIds
()))
{
return
BaseResponse
.
errorMsg
(
"请选择检测项目"
);
}
if
(
sampleTmpQuery
.
getWeight
()
==
null
)
{
return
BaseResponse
.
errorMsg
(
"请填写样品重量"
);
}
if
(
sampleTmpQuery
.
getWeightType
()
==
null
)
{
return
BaseResponse
.
errorMsg
(
"请选择重量单位"
);
}
if
(
StringUtils
.
isEmpty
(
sampleTmpQuery
.
getOrigin
()))
{
return
BaseResponse
.
errorMsg
(
"请选择样品产地"
);
}
...
...
@@ -366,6 +384,8 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
}
else
{
return
BaseResponse
.
errorMsg
(
"样品及检测项不可为空"
);
}
entrustMapper
.
insert
(
entrust
);
logsService
.
saveLog
(
SysLogs
.
ObjType
.
ENTRUST_LOG
,
entrust
.
getId
(),
"提交了委托单"
,
null
);
//消息推送
List
<
Integer
>
approvalIdList
=
sysApprovalMapper
.
getApprovalId
(
"委托评审"
);
...
...
@@ -502,17 +522,38 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
.
setUpdateTime
(
entrust
.
getCreateTime
())
.
setSampleNum
(
query
.
getSampleList
().
size
())
.
setIsTop
(
0
);
entrustMapper
.
updateById
(
entrust
);
if
(
query
.
getSampleList
()
!=
null
&&
query
.
getSampleList
().
size
()
>
0
)
{
//对样品信息进行判断
for
(
SampleQuery
sampleQuery
:
query
.
getSampleList
())
{
if
(
StringUtils
.
isEmpty
(
sampleQuery
.
getName
()))
{
return
BaseResponse
.
errorMsg
(
"请填写样品名"
);
}
if
(
StringUtils
.
isEmpty
(
sampleQuery
.
getSampleCode
()))
{
return
BaseResponse
.
errorMsg
(
"请填写来样编号"
);
}
if
(
StringUtils
.
isEmpty
(
sampleQuery
.
getSampleForm
()))
{
return
BaseResponse
.
errorMsg
(
"请选择样品状态"
);
}
if
(
StringUtils
.
isEmpty
(
sampleQuery
.
getTeamIds
()))
{
return
BaseResponse
.
errorMsg
(
"请选择检测项目"
);
}
if
(
sampleQuery
.
getWeight
()
==
null
)
{
return
BaseResponse
.
errorMsg
(
"请填写样品重量"
);
}
if
(
sampleQuery
.
getWeightType
()
==
null
)
{
return
BaseResponse
.
errorMsg
(
"请选择重量单位"
);
}
if
(
StringUtils
.
isEmpty
(
sampleQuery
.
getOrigin
()))
{
return
BaseResponse
.
errorMsg
(
"请选择样品产地"
);
}
}
//删除之前的样品
QueryWrapper
<
SampleTmp
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"entrust_id"
,
entrust
.
getId
());
sampleTmpService
.
remove
(
queryWrapper
);
List
<
SampleTmp
>
sampleTmpList
=
new
ArrayList
<>();
for
(
SampleQuery
sampleQuery
:
query
.
getSampleList
())
{
if
(
StringUtils
.
isEmpty
(
sampleQuery
.
getOrigin
()))
{
return
BaseResponse
.
errorMsg
(
"请选择样品产地"
);
}
SampleTmp
sampleTmp
=
new
SampleTmp
();
BeanUtils
.
copyProperties
(
sampleQuery
,
sampleTmp
);
String
teamIds
=
sampleQuery
.
getTeamIds
();
//选择的检测项id集合
...
...
@@ -577,6 +618,8 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
}
else
{
return
BaseResponse
.
errorMsg
(
"样品及检测项不可为空"
);
}
entrustMapper
.
updateById
(
entrust
);
logsService
.
saveLog
(
SysLogs
.
ObjType
.
ENTRUST_LOG
,
entrust
.
getId
(),
"修改委托单"
,
null
);
//如果是委托人修改的
...
...
@@ -2988,8 +3031,8 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
weiXinService
.
sendTextMessage
(
userIds
,
content
);
//记录委托单日志
logsService
.
saveLog
(
SysLogs
.
ObjType
.
ENTRUST_LOG
,
entrust
.
getId
(),
"退回样品
处理
任务"
,
null
);
return
BaseResponse
.
okMsg
(
"已退回样品
处理
任务"
);
logsService
.
saveLog
(
SysLogs
.
ObjType
.
ENTRUST_LOG
,
entrust
.
getId
(),
"退回样品
检测
任务"
,
null
);
return
BaseResponse
.
okMsg
(
"已退回样品
检测
任务"
);
}
/**
...
...
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