Commit bf34b1b7 authored by 韩桐桐's avatar 韩桐桐

补证登记相关

parent 58bd9ce0
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<?mso-application progid="Word.Document"?>
<pkg:package xmlns:pkg="http://schemas.microsoft.com/office/2006/xmlPackage">
<pkg:part pkg:name="/_rels/.rels" pkg:contentType="application/vnd.openxmlformats-package.relationships+xml">
<pkg:xmlData>
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">
<Relationship Id="rId4"
Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument"
Target="word/document.xml"/>
<Relationship Id="rId2"
Type="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties"
Target="docProps/core.xml"/>
<Relationship Id="rId1"
Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties"
Target="docProps/app.xml"/>
<Relationship Id="rId3"
Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties"
Target="docProps/custom.xml"/>
</Relationships>
</pkg:xmlData>
</pkg:part>
<pkg:part pkg:name="/word/_rels/document.xml.rels"
pkg:contentType="application/vnd.openxmlformats-package.relationships+xml">
<pkg:xmlData>
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">
<Relationship Id="rId4"
Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable"
Target="fontTable.xml"/>
<Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme"
Target="theme/theme1.xml"/>
<Relationship Id="rId2"
Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings"
Target="settings.xml"/>
<Relationship Id="rId1"
Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles"
Target="styles.xml"/>
</Relationships>
</pkg:xmlData>
</pkg:part>
<pkg:part pkg:name="/word/document.xml"
pkg:contentType="application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml">
<pkg:xmlData>
<w:document xmlns:wpc="http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"
xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math"
xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:wp14="http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing"
xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing"
xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main"
xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml"
xmlns:w10="urn:schemas-microsoft-com:office:word"
xmlns:w15="http://schemas.microsoft.com/office/word/2012/wordml"
xmlns:wpg="http://schemas.microsoft.com/office/word/2010/wordprocessingGroup"
xmlns:wpi="http://schemas.microsoft.com/office/word/2010/wordprocessingInk"
xmlns:wne="http://schemas.microsoft.com/office/word/2006/wordml"
xmlns:wps="http://schemas.microsoft.com/office/word/2010/wordprocessingShape"
xmlns:wpsCustomData="http://www.wps.cn/officeDocument/2013/wpsCustomData"
mc:Ignorable="w14 w15 wp14">
<w:body>
<w:p w14:paraId="05B1A808">
<w:pPr>
<w:pStyle w:val="12"/>
<w:tabs>
<w:tab w:val="left" w:pos="6720"/>
</w:tabs>
<w:spacing w:line="600" w:lineRule="exact"/>
<w:ind w:firstLine="880"/>
<w:rPr>
<w:rFonts w:hint="eastAsia" w:ascii="宋体" w:hAnsi="宋体" w:eastAsia="宋体"
w:cs="宋体"/>
<w:sz w:val="44"/>
<w:szCs w:val="44"/>
</w:rPr>
</w:pPr>
<w:bookmarkStart w:id="0" w:name="OLE_LINK1"/>
<w:r>
<w:rPr>
<w:rFonts w:hint="eastAsia" w:ascii="宋体" w:hAnsi="宋体" w:eastAsia="宋体"
w:cs="宋体"/>
<w:sz w:val="44"/>
<w:szCs w:val="44"/>
</w:rPr>
<w:t>特种设备使用登记证补证申请表</w:t>
</w:r>
</w:p>
<w:bookmarkEnd w:id="0"/>
<w:p w14:paraId="0B87F667">
<w:pPr>
<w:pStyle w:val="12"/>
<w:tabs>
<w:tab w:val="left" w:pos="6720"/>
</w:tabs>
<w:spacing w:line="600" w:lineRule="exact"/>
<w:ind w:firstLine="420"/>
<w:rPr>
<w:rFonts w:ascii="仿宋_GB2312" w:hAnsi="宋体" w:eastAsia="仿宋_GB2312"/>
</w:rPr>
</w:pPr>
<w:r>
<w:rPr>
<w:rFonts w:hint="eastAsia" w:hAnsi="宋体"/>
</w:rPr>
<w:t xml:space="preserve"> </w:t>
</w:r>
<w:r>
<w:rPr>
<w:rFonts w:hint="eastAsia" w:ascii="仿宋_GB2312" w:hAnsi="宋体"
w:eastAsia="仿宋_GB2312"/>
</w:rPr>
<w:t>编号:</w:t>
</w:r>
<w:r>
<w:rPr>
<w:rFonts w:hint="eastAsia" w:ascii="仿宋_GB2312" w:hAnsi="宋体"
w:eastAsia="仿宋_GB2312"/>
<w:lang w:val="en-US" w:eastAsia="zh-CN"/>
</w:rPr>
<w:t>applyNo</w:t>
</w:r>
</w:p>
<w:tbl>
<w:tblPr>
<w:tblStyle w:val="5"/>
<w:tblW w:w="8892" w:type="dxa"/>
<w:tblInd w:w="-137" w:type="dxa"/>
<w:tblBorders>
<w:top w:val="single" w:color="auto" w:sz="12" w:space="0"/>
<w:left w:val="single" w:color="auto" w:sz="12" w:space="0"/>
<w:bottom w:val="single" w:color="auto" w:sz="12" w:space="0"/>
<w:right w:val="single" w:color="auto" w:sz="12" w:space="0"/>
<w:insideH w:val="single" w:color="auto" w:sz="6" w:space="0"/>
<w:insideV w:val="single" w:color="auto" w:sz="6" w:space="0"/>
</w:tblBorders>
<w:tblLayout w:type="fixed"/>
<w:tblCellMar>
<w:top w:w="0" w:type="dxa"/>
<w:left w:w="108" w:type="dxa"/>
<w:bottom w:w="0" w:type="dxa"/>
<w:right w:w="108" w:type="dxa"/>
</w:tblCellMar>
</w:tblPr>
<w:tblGrid>
<w:gridCol w:w="580"/>
<w:gridCol w:w="1658"/>
<w:gridCol w:w="2573"/>
<w:gridCol w:w="2117"/>
<w:gridCol w:w="1964"/>
</w:tblGrid>
<w:tr w14:paraId="35BCF936">
<w:tblPrEx>
<w:tblBorders>
<w:top w:val="single" w:color="auto" w:sz="12" w:space="0"/>
<w:left w:val="single" w:color="auto" w:sz="12" w:space="0"/>
<w:bottom w:val="single" w:color="auto" w:sz="12" w:space="0"/>
<w:right w:val="single" w:color="auto" w:sz="12" w:space="0"/>
<w:insideH w:val="single" w:color="auto" w:sz="6" w:space="0"/>
<w:insideV w:val="single" w:color="auto" w:sz="6" w:space="0"/>
</w:tblBorders>
<w:tblCellMar>
<w:top w:w="0" w:type="dxa"/>
<w:left w:w="108" w:type="dxa"/>
<w:bottom w:w="0" w:type="dxa"/>
<w:right w:w="108" w:type="dxa"/>
</w:tblCellMar>
</w:tblPrEx>
<w:tc>
<w:tcPr>
<w:tcW w:w="2238" w:type="dxa"/>
<w:gridSpan w:val="2"/>
<w:vAlign w:val="center"/>
</w:tcPr>
<w:p w14:paraId="7A04896F">
<w:pPr>
<w:spacing w:line="520" w:lineRule="exact"/>
<w:ind w:firstLine="140" w:firstLineChars="50"/>
<w:jc w:val="center"/>
<w:rPr>
<w:rFonts w:ascii="仿宋_GB2312" w:eastAsia="仿宋_GB2312"/>
<w:sz w:val="28"/>
<w:szCs w:val="28"/>
</w:rPr>
</w:pPr>
<w:r>
<w:rPr>
<w:rFonts w:hint="eastAsia" w:ascii="仿宋_GB2312" w:eastAsia="仿宋_GB2312"/>
<w:sz w:val="28"/>
<w:szCs w:val="28"/>
</w:rPr>
<w:t>使用单位名称</w:t>
</w:r>
</w:p>
</w:tc>
<w:tc>
<w:tcPr>
<w:tcW w:w="6654" w:type="dxa"/>
<w:gridSpan w:val="3"/>
<w:vAlign w:val="center"/>
</w:tcPr>
<w:p w14:paraId="1B19541F">
<w:pPr>
<w:spacing w:line="520" w:lineRule="exact"/>
<w:jc w:val="center"/>
<w:rPr>
<w:rFonts w:hint="default" w:ascii="仿宋_GB2312" w:eastAsia="仿宋_GB2312"/>
<w:sz w:val="28"/>
<w:szCs w:val="28"/>
<w:lang w:val="en-US" w:eastAsia="zh-CN"/>
</w:rPr>
</w:pPr>
<w:r>
<w:rPr>
<w:rFonts w:hint="eastAsia" w:ascii="仿宋_GB2312" w:eastAsia="仿宋_GB2312"/>
<w:sz w:val="28"/>
<w:szCs w:val="28"/>
<w:lang w:val="en-US" w:eastAsia="zh-CN"/>
</w:rPr>
<w:t>useUnitName</w:t>
</w:r>
</w:p>
</w:tc>
</w:tr>
<w:tr w14:paraId="205F4058">
<w:tblPrEx>
<w:tblBorders>
<w:top w:val="single" w:color="auto" w:sz="12" w:space="0"/>
<w:left w:val="single" w:color="auto" w:sz="12" w:space="0"/>
<w:bottom w:val="single" w:color="auto" w:sz="12" w:space="0"/>
<w:right w:val="single" w:color="auto" w:sz="12" w:space="0"/>
<w:insideH w:val="single" w:color="auto" w:sz="6" w:space="0"/>
<w:insideV w:val="single" w:color="auto" w:sz="6" w:space="0"/>
</w:tblBorders>
<w:tblCellMar>
<w:top w:w="0" w:type="dxa"/>
<w:left w:w="108" w:type="dxa"/>
<w:bottom w:w="0" w:type="dxa"/>
<w:right w:w="108" w:type="dxa"/>
</w:tblCellMar>
</w:tblPrEx>
<w:tc>
<w:tcPr>
<w:tcW w:w="2238" w:type="dxa"/>
<w:gridSpan w:val="2"/>
<w:vAlign w:val="center"/>
</w:tcPr>
<w:p w14:paraId="2DB15F31">
<w:pPr>
<w:spacing w:line="520" w:lineRule="exact"/>
<w:ind w:firstLine="140" w:firstLineChars="50"/>
<w:jc w:val="center"/>
<w:rPr>
<w:rFonts w:hint="eastAsia" w:ascii="仿宋_GB2312" w:eastAsia="仿宋_GB2312"/>
<w:sz w:val="28"/>
<w:szCs w:val="28"/>
</w:rPr>
</w:pPr>
<w:r>
<w:rPr>
<w:rFonts w:hint="eastAsia" w:ascii="仿宋_GB2312" w:eastAsia="仿宋_GB2312"/>
<w:sz w:val="28"/>
<w:szCs w:val="28"/>
</w:rPr>
<w:t>设备使用地址</w:t>
</w:r>
</w:p>
</w:tc>
<w:tc>
<w:tcPr>
<w:tcW w:w="6654" w:type="dxa"/>
<w:gridSpan w:val="3"/>
<w:vAlign w:val="center"/>
</w:tcPr>
<w:p w14:paraId="089D94B9">
<w:pPr>
<w:spacing w:line="520" w:lineRule="exact"/>
<w:jc w:val="center"/>
<w:rPr>
<w:rFonts w:hint="eastAsia" w:ascii="仿宋_GB2312" w:eastAsia="仿宋_GB2312"/>
<w:sz w:val="28"/>
<w:szCs w:val="28"/>
<w:lang w:val="en-US" w:eastAsia="zh-CN"/>
</w:rPr>
</w:pPr>
<w:r>
<w:rPr>
<w:rFonts w:hint="eastAsia" w:ascii="仿宋_GB2312" w:eastAsia="仿宋_GB2312"/>
<w:sz w:val="28"/>
<w:szCs w:val="28"/>
<w:lang w:val="en-US" w:eastAsia="zh-CN"/>
</w:rPr>
<w:t>useUnitAddress</w:t>
</w:r>
</w:p>
</w:tc>
</w:tr>
<w:tr w14:paraId="5B9C6165">
<w:tblPrEx>
<w:tblBorders>
<w:top w:val="single" w:color="auto" w:sz="12" w:space="0"/>
<w:left w:val="single" w:color="auto" w:sz="12" w:space="0"/>
<w:bottom w:val="single" w:color="auto" w:sz="12" w:space="0"/>
<w:right w:val="single" w:color="auto" w:sz="12" w:space="0"/>
<w:insideH w:val="single" w:color="auto" w:sz="6" w:space="0"/>
<w:insideV w:val="single" w:color="auto" w:sz="6" w:space="0"/>
</w:tblBorders>
<w:tblCellMar>
<w:top w:w="0" w:type="dxa"/>
<w:left w:w="108" w:type="dxa"/>
<w:bottom w:w="0" w:type="dxa"/>
<w:right w:w="108" w:type="dxa"/>
</w:tblCellMar>
</w:tblPrEx>
<w:tc>
<w:tcPr>
<w:tcW w:w="2238" w:type="dxa"/>
<w:gridSpan w:val="2"/>
<w:vAlign w:val="center"/>
</w:tcPr>
<w:p w14:paraId="01344039">
<w:pPr>
<w:spacing w:line="520" w:lineRule="exact"/>
<w:jc w:val="center"/>
<w:rPr>
<w:rFonts w:ascii="仿宋_GB2312" w:eastAsia="仿宋_GB2312"/>
<w:sz w:val="28"/>
<w:szCs w:val="28"/>
</w:rPr>
</w:pPr>
<w:r>
<w:rPr>
<w:rFonts w:hint="eastAsia" w:ascii="仿宋_GB2312" w:eastAsia="仿宋_GB2312"/>
<w:sz w:val="28"/>
<w:szCs w:val="28"/>
</w:rPr>
<w:t>补领原因</w:t>
</w:r>
</w:p>
</w:tc>
<w:tc>
<w:tcPr>
<w:tcW w:w="6654" w:type="dxa"/>
<w:gridSpan w:val="3"/>
<w:vAlign w:val="center"/>
</w:tcPr>
<w:p w14:paraId="4C906C6D">
<w:pPr>
<w:spacing w:line="520" w:lineRule="exact"/>
<w:jc w:val="center"/>
<w:rPr>
<w:rFonts w:ascii="仿宋_GB2312" w:eastAsia="仿宋_GB2312"/>
<w:sz w:val="28"/>
<w:szCs w:val="28"/>
</w:rPr>
</w:pPr>
<w:r>
<w:rPr>
<w:rFonts w:hint="eastAsia" w:ascii="仿宋_GB2312" w:eastAsia="仿宋_GB2312"/>
<w:sz w:val="28"/>
<w:szCs w:val="28"/>
<w:lang w:eastAsia="zh-CN"/>
</w:rPr>
FreeMarker template error (DEBUG mode; use RETHROW in production!):
Can't compare values of these types. Allowed comparisons are between two numbers, two strings, two dates, or two booleans.
Left hand operand is a string (wrapper: f.t.SimpleScalar).
Right hand operand is a number (wrapper: f.t.SimpleNumber).
The blamed expression:
==> applicationReason == 0 [in template "CertificateReplenish.ftl" at line 363, column 46]
----
FTL stack trace ("~" means nesting-related):
- Failed at: #if applicationReason == 0 [in template "CertificateReplenish.ftl" at line 363, column 41]
----
Java stack trace (for programmers):
----
freemarker.core._MiscTemplateException: [... Exception message was already printed; see it above ...]
at freemarker.core.EvalUtil.compare(EvalUtil.java:303)
at freemarker.core.EvalUtil.compare(EvalUtil.java:115)
at freemarker.core.ComparisonExpression.evalToBoolean(ComparisonExpression.java:78)
at freemarker.core.IfBlock.accept(IfBlock.java:49)
at freemarker.core.Environment.visit(Environment.java:347)
at freemarker.core.Environment.visit(Environment.java:353)
at freemarker.core.Environment.process(Environment.java:326)
at freemarker.template.Template.process(Template.java:383)
at com.yeejoin.amos.boot.module.jg.biz.utils.WordTemplateUtils.createDoc(WordTemplateUtils.java:64)
at com.yeejoin.amos.boot.module.jg.biz.utils.WordTemplateUtils.fillAndConvertDocFile(WordTemplateUtils.java:75)
at com.yeejoin.amos.boot.module.jg.biz.service.impl.CommonServiceImpl.wordToPdf(CommonServiceImpl.java:1208)
at com.yeejoin.amos.boot.module.jg.biz.service.impl.CommonServiceImpl$$FastClassBySpringCGLIB$$14f039f5.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:688)
at com.yeejoin.amos.boot.module.jg.biz.service.impl.CommonServiceImpl$$EnhancerBySpringCGLIB$$4a1bedb6.wordToPdf(<generated>)
at com.yeejoin.amos.boot.module.jg.biz.service.impl.JgCertificateReplenishServiceImpl.getCertReplenishFormStream(JgCertificateReplenishServiceImpl.java:89)
at com.yeejoin.amos.boot.module.jg.biz.service.impl.JgCertificateReplenishServiceImpl$$FastClassBySpringCGLIB$$748ce114.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:688)
at com.yeejoin.amos.boot.module.jg.biz.service.impl.JgCertificateReplenishServiceImpl$$EnhancerBySpringCGLIB$$e067ce73.getCertReplenishFormStream(<generated>)
at com.yeejoin.amos.boot.module.jg.biz.controller.CommonController.getCertReplenishFormStream(CommonController.java:820)
at com.yeejoin.amos.boot.module.jg.biz.controller.CommonController$$FastClassBySpringCGLIB$$8e8b1099.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:779)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:750)
at org.springframework.aop.framework.adapter.AfterReturningAdviceInterceptor.invoke(AfterReturningAdviceInterceptor.java:55)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:750)
at org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:56)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:750)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:95)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:750)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:692)
at com.yeejoin.amos.boot.module.jg.biz.controller.CommonController$$EnhancerBySpringCGLIB$$f87fbb8.getCertReplenishFormStream(<generated>)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:190)
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:138)
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:105)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:878)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:792)
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1040)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:943)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:665)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:750)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
at com.github.xiaoymin.knife4j.spring.filter.SecurityBasicAuthFilter.doFilter(SecurityBasicAuthFilter.java:87)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:320)
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:126)
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:90)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:118)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:158)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilterInternal(BasicAuthenticationFilter.java:155)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:116)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:92)
at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:77)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:215)
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:178)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:358)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:271)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.doFilterInternal(WebMvcMetricsFilter.java:97)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:542)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:143)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:357)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:374)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:893)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1707)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)
package com.yeejoin.amos.boot.module.jg.api.dto;
import cn.hutool.json.JSONObject;
import com.baomidou.mybatisplus.annotation.TableField;
import com.yeejoin.amos.boot.module.ymt.api.dto.LicScheduleDto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import lombok.Data;
import lombok.EqualsAndHashCode;
import springfox.documentation.spring.web.json.Json;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
* 使用登记表补证
......@@ -121,5 +126,7 @@ public class JgCertificateReplenishDto extends BaseDto {
@ApiModelProperty("是否车用气瓶1是,0不是(特种气瓶使用)")
private String whetherVehicleCylinder;
private String dataType;
private List<Map<String, Object>> equLists;
}
......@@ -2,9 +2,9 @@ package com.yeejoin.amos.boot.module.jg.api.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Builder;
import org.typroject.tyboot.core.rdbms.orm.entity.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
......
......@@ -52,8 +52,9 @@ public enum BusinessTypeEnum {
JG_HISTORY_USAGE_REGISTRATION("119", "历史设备登记"),
JG_OVER_DESIGN_SERVICE_LIFE("120", "超设计使用年限登记");
JG_OVER_DESIGN_SERVICE_LIFE("120", "超设计使用年限登记"),
JG_REPLACEMENT_REGISTRATION("121", "补证登记");
private final String code;
private final String name;
......
......@@ -90,8 +90,8 @@
<if test="dto.equCategoryCode != null and dto.equCategoryCode != ''">
and tjurm.equ_category_code = #{dto.equCategoryCode}
</if>
<if test="dto.equDefineCode != null and dto.equDefineCode != ''">
and tjurm.equ_define = #{dto.equDefineCode}
<if test="dto.equDefine != null and dto.equDefine != ''">
and tjurm.equ_define = #{dto.equDefine}
</if>
<if test="dto.equDefineCode != null and dto.equDefineCode != ''">
and tjurm.equ_define_code = #{dto.equDefineCode}
......
......@@ -24,6 +24,7 @@ import com.yeejoin.amos.boot.module.jg.biz.service.impl.JgRegistrationHistorySer
import com.yeejoin.amos.boot.module.jg.biz.utils.CodeUtil;
import com.yeejoin.amos.boot.module.ymt.api.dto.EquipmentCategoryDto;
import com.yeejoin.amos.boot.module.ymt.api.entity.EquipmentCategory;
import com.yeejoin.amos.boot.module.ymt.api.enums.ApplicationFormTypeEnum;
import com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum;
import com.yeejoin.amos.feign.systemctl.Systemctl;
import com.yeejoin.amos.feign.systemctl.model.DictionarieValueModel;
......@@ -834,4 +835,22 @@ public class CommonController extends BaseController {
public void getCertReplenishFormStream(HttpServletResponse response, @RequestBody JSONObject jsonObject) {
iJgCertificateReplenishService.getCertReplenishFormStream(jsonObject, response);
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "POST", value = "使用登记表/补证申请表生成", notes = "使用登记表/补证申请表生成")
@PostMapping(value = "/getRegistrationOrCertReplenishFormUrl")
public ResponseModel<Map<String, Object>> getRegistrationOrCertReplenishFormUrl(@RequestBody JSONObject jsonObject) {
String formBusinessType = Objects.toString(jsonObject.get("formBusinessType"));
if (ApplicationFormTypeEnum.BZDJ.getBusinessCode().equals(formBusinessType)) {
return ResponseHelper.buildResponse(iJgCertificateReplenishService.getCertReplenishFormUrl(jsonObject));
}
if (ApplicationFormTypeEnum.SYDJ.getBusinessCode().equals(formBusinessType)) {
JSONObject formData = JSONObject.parseObject(JSONObject.toJSONString(jsonObject.get("formData")));
String manageType = String.valueOf(jsonObject.get("manageType"));
ReginParams selectedOrgInfo = getSelectedOrgInfo();
formData.put("userName", selectedOrgInfo.getUserModel().getRealName());
return ResponseHelper.buildResponse(commonService.getRegistrationFormUrl(manageType, formData));
}
return ResponseHelper.buildResponse(null);
}
}
package com.yeejoin.amos.boot.module.jg.biz.controller;
import com.alibaba.fastjson.JSONObject;
import com.yeejoin.amos.boot.module.jg.api.dto.JgCertificateReplenishDto;
import com.yeejoin.amos.boot.module.jg.api.dto.JgEquipTransferDto;
import com.yeejoin.amos.boot.module.jg.api.entity.JgCertificateReplenish;
import com.yeejoin.amos.boot.module.jg.biz.service.impl.JgUseRegistrationManageServiceImpl;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.RequestMapping;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RestController;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import com.yeejoin.amos.boot.module.jg.biz.service.impl.JgCertificateReplenishServiceImpl;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
......@@ -26,64 +35,37 @@ import org.typroject.tyboot.core.foundation.enumeration.UserType;
* @date 2025-03-19
*/
@RestController
@Api(tags = "Api")
@Api(tags = "补证申请登记")
@RequiredArgsConstructor
@RequestMapping(value = "/jg-certificate-replenish")
public class JgCertificateReplenishController extends BaseController {
@Autowired
JgCertificateReplenishServiceImpl jgCertificateReplenishServiceImpl;
private final JgCertificateReplenishServiceImpl jgCertificateReplenishServiceImpl;
/**
* 新增
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/save")
@ApiOperation(httpMethod = "POST", value = "新增", notes = "新增")
public ResponseModel<JgCertificateReplenish> save(@RequestBody JgCertificateReplenish entity) {
entity = jgCertificateReplenishServiceImpl.createWithModel(entity);
return ResponseHelper.buildResponse(entity);
}
/**
* 根据sequenceNbr更新
* 根据证的sequenceNbr 批量查询证下面的所有设备
*
* @param sequenceNbr 主键
* @return
* @param sequenceNbr 证的sequenceNbr
* @return 证下的所有设备
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PutMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "PUT", value = "根据sequenceNbr更新", notes = "根据sequenceNbr更新")
public ResponseModel<JgCertificateReplenish> updateBySequenceNbrJgCertificateReplenish(@RequestBody JgCertificateReplenish entity, @PathVariable(value = "sequenceNbr") Long sequenceNbr) {
entity.setSequenceNbr(sequenceNbr);
return ResponseHelper.buildResponse(jgCertificateReplenishServiceImpl.updateWithModel(entity));
@GetMapping(value = "/queryEquByCertificateSeqList")
@ApiOperation(httpMethod = "GET", value = "根据证的sequenceNbr 批量查询证下面的所有设备", notes = "根据证的sequenceNbr 批量查询证下面的所有设备")
public ResponseModel<Map<String, Object>> queryEquByCertificateSeqList(@RequestParam(value = "record") String sequenceNbr) {
return ResponseHelper.buildResponse(jgCertificateReplenishServiceImpl.queryEquByCertSeq(sequenceNbr));
}
/**
* 根据sequenceNbr删除
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@DeleteMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "DELETE", value = "根据sequenceNbr删除", notes = "根据sequenceNbr删除")
public ResponseModel<Boolean> deleteBySequenceNbr(HttpServletRequest request, @PathVariable(value = "sequenceNbr") Long sequenceNbr) {
return ResponseHelper.buildResponse(jgCertificateReplenishServiceImpl.removeById(sequenceNbr));
}
/**
* 根据sequenceNbr查询
* 新增
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "GET", value = "根据sequenceNbr查询单个", notes = "根据sequenceNbr查询单个")
public ResponseModel<JgCertificateReplenish> selectOne(@PathVariable Long sequenceNbr) {
return ResponseHelper.buildResponse(jgCertificateReplenishServiceImpl.queryBySeq(sequenceNbr));
@PostMapping(value = "/save")
@ApiOperation(httpMethod = "POST", value = "新增", notes = "新增")
public ResponseModel<List<Map<String, Object>>> save(@RequestBody JSONObject jsonObject) {
return ResponseHelper.buildResponse(jgCertificateReplenishServiceImpl.save(jsonObject));
}
/**
......@@ -96,23 +78,79 @@ public class JgCertificateReplenishController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/page")
@ApiOperation(httpMethod = "GET", value = "分页查询", notes = "分页查询")
public ResponseModel<Page<JgCertificateReplenish>> queryForPage(@RequestParam(value = "current") int current, @RequestParam
(value = "size") int size) {
public ResponseModel<Page<JgCertificateReplenish>> queryForPage(JgCertificateReplenishDto dto,
@RequestParam(value = "current") int current,
@RequestParam(value = "size") int size) {
Page<JgCertificateReplenish> page = new Page<JgCertificateReplenish>();
page.setCurrent(current);
page.setSize(size);
return ResponseHelper.buildResponse(jgCertificateReplenishServiceImpl.queryForJgCertificateReplenishPage(page));
return ResponseHelper.buildResponse(jgCertificateReplenishServiceImpl.queryForJgCertificateReplenishPage(page, dto));
}
/**
* 列表全部数据查询
* 撤回
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "列表全部数据查询", notes = "列表全部数据查询")
@GetMapping(value = "/list")
public ResponseModel<List<JgCertificateReplenish>> selectForList() {
return ResponseHelper.buildResponse(jgCertificateReplenishServiceImpl.queryForJgCertificateReplenishList());
@PostMapping(value = "/cancel")
@ApiOperation(httpMethod = "POST", value = "撤回", notes = "撤回")
public ResponseModel<JgCertificateReplenishDto> cancel(@RequestBody JgCertificateReplenishDto dto) {
jgCertificateReplenishServiceImpl.cancel(dto);
return ResponseHelper.buildResponse(null);
}
//
// /**
// * 根据sequenceNbr更新
// *
// * @param sequenceNbr 主键
// * @return
// */
// @TycloudOperation(ApiLevel = UserType.AGENCY)
// @PutMapping(value = "/{sequenceNbr}")
// @ApiOperation(httpMethod = "PUT", value = "根据sequenceNbr更新", notes = "根据sequenceNbr更新")
// public ResponseModel<JgCertificateReplenish> updateBySequenceNbrJgCertificateReplenish(@RequestBody JgCertificateReplenish entity, @PathVariable(value = "sequenceNbr") Long sequenceNbr) {
// entity.setSequenceNbr(sequenceNbr);
// return ResponseHelper.buildResponse(jgCertificateReplenishServiceImpl.updateWithModel(entity));
// }
//
// /**
// * 根据sequenceNbr删除
// *
// * @param sequenceNbr 主键
// * @return
// */
// @TycloudOperation(ApiLevel = UserType.AGENCY)
// @DeleteMapping(value = "/{sequenceNbr}")
// @ApiOperation(httpMethod = "DELETE", value = "根据sequenceNbr删除", notes = "根据sequenceNbr删除")
// public ResponseModel<Boolean> deleteBySequenceNbr(HttpServletRequest request, @PathVariable(value = "sequenceNbr") Long sequenceNbr) {
// return ResponseHelper.buildResponse(jgCertificateReplenishServiceImpl.removeById(sequenceNbr));
// }
//
// /**
// * 根据sequenceNbr查询
// *
// * @param sequenceNbr 主键
// * @return
// */
// @TycloudOperation(ApiLevel = UserType.AGENCY)
// @GetMapping(value = "/{sequenceNbr}")
// @ApiOperation(httpMethod = "GET", value = "根据sequenceNbr查询单个", notes = "根据sequenceNbr查询单个")
// public ResponseModel<JgCertificateReplenish> selectOne(@PathVariable Long sequenceNbr) {
// return ResponseHelper.buildResponse(jgCertificateReplenishServiceImpl.queryBySeq(sequenceNbr));
// }
//
//
// /**
// * 列表全部数据查询
// *
// * @return
// */
// @TycloudOperation(ApiLevel = UserType.AGENCY)
// @ApiOperation(httpMethod = "GET", value = "列表全部数据查询", notes = "列表全部数据查询")
// @GetMapping(value = "/list")
// public ResponseModel<List<JgCertificateReplenish>> selectForList() {
// return ResponseHelper.buildResponse(jgCertificateReplenishServiceImpl.queryForJgCertificateReplenishList());
// }
}
......@@ -209,6 +209,8 @@ public class CommonServiceImpl implements ICommonService {
@Autowired
JgUseRegistrationServiceImpl jgUseRegistrationServiceImpl;
@Autowired
JgCertificateReplenishServiceImpl jgCertificateReplenishServiceImpl;
@Autowired
@Lazy
JgEquipTransferServiceImpl jgEquipTransferServiceImpl;
@Autowired
......@@ -1345,6 +1347,12 @@ public class CommonServiceImpl implements ICommonService {
noticeObj.put("receiveOrgCode", !ObjectUtils.isEmpty(basicObj.get("receiveOrgCreditCode")) ? String.valueOf(basicObj.get("receiveOrgCreditCode")) : String.valueOf(basicObj.get("receiveOrgCreditCode1")));
JSONObject jsonObject = new JSONObject(noticeObj);
return jgOverDesignServiceLifeService.saveOrUpdate(jsonObject, reginParams);
} else if (ApplicationFormTypeEnum.BZDJ.getBusinessCode().equals(type)) {
noticeObj.put("receiveOrgCode", !ObjectUtils.isEmpty(basicObj.get("receiveOrgCreditCode")) ? String.valueOf(basicObj.get("receiveOrgCreditCode")) : String.valueOf(basicObj.get("receiveOrgCreditCode1")));
JSONObject jsonObject = new JSONObject(noticeObj);
jsonObject.put(JgCertificateReplenishServiceImpl.SHOULD_SUBMIT, "1".equals(submitType) ? JgCertificateReplenishServiceImpl.SUBMITTED : JgCertificateReplenishServiceImpl.DRAFT);
jsonObject.putAll(useRegFormUploadObj);
return jgCertificateReplenishServiceImpl.save(jsonObject);
}
return null;
}
......
package com.yeejoin.amos.boot.module.jg.biz.service.impl;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.map.MapBuilder;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.yeejoin.amos.boot.module.jg.api.entity.JgCertificateReplenish;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yeejoin.amos.boot.biz.common.bo.CompanyBo;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import com.yeejoin.amos.boot.module.jg.api.dto.InstanceRuntimeData;
import com.yeejoin.amos.boot.module.jg.api.dto.JgCertificateReplenishDto;
import com.yeejoin.amos.boot.module.jg.api.dto.JgCertificateReplenishDto;
import com.yeejoin.amos.boot.module.jg.api.dto.WorkflowResultDto;
import com.yeejoin.amos.boot.module.jg.api.entity.*;
import com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum;
import com.yeejoin.amos.boot.module.jg.api.enums.CompanyTypeEnum;
import com.yeejoin.amos.boot.module.jg.api.mapper.JgCertificateReplenishMapper;
import com.yeejoin.amos.boot.module.jg.api.service.IJgCertificateReplenishService;
import com.yeejoin.amos.boot.module.jg.biz.context.EquipUsedCheckStrategyContext;
import com.yeejoin.amos.boot.module.jg.biz.feign.TzsServiceFeignClient;
import com.yeejoin.amos.boot.module.jg.biz.utils.FileExporter;
import com.yeejoin.amos.boot.module.ymt.api.entity.*;
import com.yeejoin.amos.boot.module.ymt.api.enums.ApplicationFormTypeEnum;
import com.yeejoin.amos.boot.module.ymt.api.enums.EquipmentClassifityEnum;
import com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum;
import com.yeejoin.amos.feign.workflow.model.ProcessTaskDTO;
import io.seata.spring.annotation.GlobalTransactional;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.elasticsearch.index.query.BoolQueryBuilder;
import org.elasticsearch.index.query.QueryBuilders;
import org.elasticsearch.index.query.TermQueryBuilder;
import org.elasticsearch.index.query.TermsQueryBuilder;
import org.redisson.api.RLock;
import org.redisson.api.RedissonClient;
import org.springframework.util.CollectionUtils;
import org.springframework.util.ObjectUtils;
import org.typroject.tyboot.core.foundation.context.RequestContext;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import javax.annotation.PostConstruct;
import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.nio.file.Files;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.*;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
import java.util.function.Supplier;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
/**
* 使用登记表补证服务实现类
......@@ -25,23 +67,136 @@ import java.util.Map;
* @author system_generator
* @date 2025-03-19
*/
@Slf4j
@Service
@RequiredArgsConstructor
public class JgCertificateReplenishServiceImpl extends BaseService<JgCertificateReplenish, JgCertificateReplenish, JgCertificateReplenishMapper> implements IJgCertificateReplenishService {
public class JgCertificateReplenishServiceImpl extends BaseService<JgCertificateReplenishDto, JgCertificateReplenish, JgCertificateReplenishMapper> implements IJgCertificateReplenishService {
public static final String IDX_BIZ_VIEW_JG_ALL = "idx_biz_view_jg_all";
public static final String equUseAddress = "equUseAddress";
public static final String useRegistrationCode = "useRegistrationCode";
public static final String USE_ORG_CODE = "USE_ORG_CODE";
public static final String STATUS = "STATUS";
public static final String record = "record";
public static final String SEQUENCE_NBR = "SEQUENCE_NBR";
public static final String FORM_DATA = "formData";
public static final String EQU_LISTS = "equLists";
private final List<String> NOT_FLOWING_STATE = Arrays.asList("6610", "6614", "6615", "6617", "6616");
private static final String EQUIP_TRANSFER_PROCESS_KEY = "certificateReplenish";
private final Map<String, Supplier> actionMap = new HashMap<>();
/**
* 通过
*/
public static final String APPROVED = "APPROVED";
/**
* 驳回
*/
public static final String REJECTED = "REJECTED";
/**
* 提交
*/
public static final String SUBMITTED = "SUBMITTED";
/**
* 暂存
*/
public static final String DRAFT = "DRAFT";
;
/**
* 是否要提交 true :提交进入审批 false:暂存单据
*/
public static final String SHOULD_SUBMIT = "SHOULD_SUBMIT";
private final CommonServiceImpl commonService;
private final JgUseRegistrationManageServiceImpl registrationManageService;
private final TzsServiceFeignClient tzsServiceFeignClient;
private final RedisUtils redisUtils;
private final RedissonClient redissonClient;
private final CmWorkflowServiceImpl cmWorkflowService;
private final JgCertificateReplenishEqServiceImpl certificateReplenishEqService;
/**
* 分页查询
* 用户信息
**/
protected ReginParams getSelectedOrgInfo() {
return JSONObject.parseObject(redisUtils.get(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken())).toString(), ReginParams.class);
}
@PostConstruct
public void init() {
actionMap.put(APPROVED, () -> this.approved());
actionMap.put(REJECTED, () -> this.rejected());
actionMap.put(SUBMITTED, () -> this.submitted());
actionMap.put(DRAFT, () -> this.draft());
}
public Object rejected() {
return null;
}
public Object approved() {
return null;
}
/**
* 发起补证申请
*
* @param jsonObject
* @return
*/
public Page<JgCertificateReplenish> queryForJgCertificateReplenishPage(Page<JgCertificateReplenish> page) {
return this.queryForPage(page, null, false);
@GlobalTransactional(rollbackFor = Exception.class)
public List<Map<String, Object>> save(JSONObject jsonObject) {
JgCertificateReplenishDto model = JSON.parseObject(JSONObject.toJSONString(jsonObject), JgCertificateReplenishDto.class);
List<Map<String, Object>> equLists = model.getEquLists();
// 创建历史数据
// this.saveOrUpdateHisDataBatch();
return null;
}
public Object draft() {
return null;
}
public Object submitted() {
return null;
}
public void saveOrUpdateHisDataBatch(List<JgEquipTransfer> transferList, List<JgEquipTransferEq> jgEquipTransferEqList) {
// commonService.saveOrUpdateHistory(BusinessTypeEnum.JG_REPLACEMENT_REGISTRATION.getName(), getEquipInfoJson(j.getEquId()), j.getEquId(), j.getEquipTransferId());
}
/**
* 列表查询 示例
* 分页查询
*/
public List<JgCertificateReplenish> queryForJgCertificateReplenishList() {
return this.queryForList("", false);
public Page<JgCertificateReplenish> queryForJgCertificateReplenishPage(Page<JgCertificateReplenish> page, JgCertificateReplenishDto dto) {
CompanyBo company = getSelectedOrgInfo().getCompany();
boolean isCompany = company.getLevel().equals(BaseController.COMPANY_TYPE_COMPANY);
boolean isSupervision = company.getLevel().equals(BaseController.COMPANY_TYPE_SUPERVISION);
String useUnitCode = "";
if (isCompany) {
useUnitCode = CompanyTypeEnum.INDIVIDUAL.getName().equals(company.getCompanyType()) ?
company.getCompanyCode().split("_")[1] : company.getCompanyCode();
}
Page<JgCertificateReplenish> result = new Page<>();
IPage<JgCertificateReplenish> replenishIPage = this.lambdaQuery()
// 监管
.eq(isSupervision, JgCertificateReplenish::getReceiveOrgCode, company.getCompanyCode())
// 非监管
.eq(isCompany, JgCertificateReplenish::getUseUnitCode, useUnitCode)
.eq(JgCertificateReplenish::getIsDelete, Boolean.FALSE)
.eq(!ValidationUtil.isEmpty(dto.getUseRegistrationCode()), JgCertificateReplenish::getUseRegistrationCode, dto.getUseRegistrationCode())
.eq(!ValidationUtil.isEmpty(dto.getEquListCode()), JgCertificateReplenish::getEquListCode, dto.getEquListCode())
.eq(!ValidationUtil.isEmpty(dto.getApplyNo()), JgCertificateReplenish::getApplyNo, dto.getApplyNo())
.eq(!ValidationUtil.isEmpty(dto.getApplyStatus()), JgCertificateReplenish::getApplyStatus, dto.getApplyStatus())
.eq(!ValidationUtil.isEmpty(dto.getUseUnitCode()), JgCertificateReplenish::getUseUnitCode, dto.getUseUnitCode())
.eq(!ValidationUtil.isEmpty(dto.getApplicationReason()), JgCertificateReplenish::getApplicationReason, dto.getApplicationReason())
.eq(!ValidationUtil.isEmpty(dto.getLossDamageTime()), JgCertificateReplenish::getLossDamageTime, dto.getLossDamageTime())
.eq(!ValidationUtil.isEmpty(dto.getInstanceStatus()), JgCertificateReplenish::getInstanceStatus, dto.getInstanceStatus())
.eq(!ValidationUtil.isEmpty(dto.getAcceptDate()), JgCertificateReplenish::getAcceptDate, dto.getAcceptDate())
.page(page);
result.setRecords(replenishIPage.getRecords());
result.setTotal(replenishIPage.getTotal());
return result;
}
/**
......@@ -52,7 +207,13 @@ public class JgCertificateReplenishServiceImpl extends BaseService<JgCertificate
*/
@Override
public Map<String, Object> getCertReplenishFormUrl(JSONObject jsonObject) {
JSONObject formData = this.writeCertReplenishFormData(jsonObject);
// 生成申请编号
String applyNo = "";
ResponseModel<List<String>> listResponseModel = tzsServiceFeignClient.applicationFormCode(ApplicationFormTypeEnum.BZDJ.getCode(), 1);
if (!listResponseModel.getResult().isEmpty()) {
applyNo = listResponseModel.getResult().get(0);
}
JSONObject formData = this.writeCertReplenishFormData(jsonObject.getJSONObject(FORM_DATA), applyNo);
String wordPath = "CertificateReplenish.ftl";
String fileName = "使用登记证补证申请表_";
File pdfFile = null;
......@@ -60,6 +221,7 @@ public class JgCertificateReplenishServiceImpl extends BaseService<JgCertificate
pdfFile = commonService.wordToPdf(fileName, wordPath, formData);
return MapBuilder.<String, Object>create()
.put("certReplenishFormUrl", commonService.uploadFile(pdfFile, "certificateReplenishFiles"))
.put("applyNo", applyNo)
.build();
} catch (Exception e) {
throw new RuntimeException(e);
......@@ -81,7 +243,7 @@ public class JgCertificateReplenishServiceImpl extends BaseService<JgCertificate
*/
@Override
public void getCertReplenishFormStream(JSONObject jsonObject, HttpServletResponse response) {
JSONObject formData = this.writeCertReplenishFormData(jsonObject);
JSONObject formData = this.writeCertReplenishFormData(jsonObject, "");
String wordPath = "CertificateReplenish.ftl";
String fileName = "使用登记证补证申请表_";
File pdfFile;
......@@ -105,35 +267,138 @@ public class JgCertificateReplenishServiceImpl extends BaseService<JgCertificate
}
}
private JSONObject writeCertReplenishFormData(JSONObject jsonObject) {
private JSONObject writeCertReplenishFormData(JSONObject jsonObject, String applyNo) {
JSONArray equLists = jsonObject.getJSONArray(EQU_LISTS);
JSONObject result = new JSONObject();
result.put("applyNo", "applyNo");
result.put("useUnitName", "useUnitName");
result.put("useUnitAddress", "useUnitAddress");
result.put("applicationReason", "1");
result.put("lossDamageTime", "2022-09-09");
result.put("safetyManagerName", "张三");
result.put("safetyManagerPhone", "13209090909");
JSONArray equLists = new JSONArray();
equLists.fluentAdd(MapBuilder.<String, Object>create()
.put("index", "1")
.put("productName", "产品名称")
.put("equCode", "设备代码")
.put("useRegistrationCode", "使用登记证编号")
.put("factoryNum", "设备编号")
.build())
.fluentAdd(MapBuilder.<String, Object>create()
.put("index", "2")
.put("productName", "产品名称1")
.put("equCode", "设备代码2")
.put("useRegistrationCode", "使用登记证编号3")
.put("factoryNum", "设备编号4")
.build());
result.put("equLists", equLists);
result.put("handler", "handler");
result.put("applicationDateYear", "2001");
result.put("applicationDateMonth", "12");
result.put("applicationDateDay", "12");
result.put("applyNo", applyNo);
result.put("useUnitName", jsonObject.getString("useUnitName"));
result.put("equUseAddress", jsonObject.getString("equUseAddress"));
result.put("applicationReason", jsonObject.getString("applicationReason"));
result.put("lossDamageTime", jsonObject.getString("lossDamageTime"));
result.put("safetyManagerName", jsonObject.getString("safetyManagerId").split("_")[1]);
result.put("safetyManagerPhone", jsonObject.getString("safetyManagerPhone"));
JSONArray equListsAfterAssembly = new JSONArray();
for (int i = 0; i < equLists.size(); i++) {
JSONObject item = equLists.getJSONObject(i);
equListsAfterAssembly.add(MapBuilder.<String, Object>create()
.put("index", i + 1)
.put("productName", item.getString("PRODUCT_NAME"))
.put("equCode", item.getString("EQU_CODE"))
.put("useRegistrationCode", item.getString("USE_ORG_CODE"))
.put("factoryNum", item.getString("FACTORY_NUM"))
.build());
}
result.put(EQU_LISTS, equListsAfterAssembly);
result.put("handler", getSelectedOrgInfo().getUserModel().getRealName());
result.put("applicationDateYear", DateTime.now().year());
result.put("applicationDateMonth", DateTime.now().month());
result.put("applicationDateDay", DateTime.now().dayOfMonth());
return result;
}
/**
* 根据证的sequenceNbr 批量查询证下面的所有设备
*
* @param sequenceNbr
* @return
*/
public Map<String, Object> queryEquByCertSeq(String sequenceNbr) {
JgUseRegistrationManage registrationManage = registrationManageService.getBaseMapper().selectOne(new LambdaQueryWrapper<JgUseRegistrationManage>().eq(JgUseRegistrationManage::getSequenceNbr, sequenceNbr).eq(JgUseRegistrationManage::getIsDelete, 0).select(JgUseRegistrationManage::getUseRegistrationCode, JgUseRegistrationManage::getEquUseAddress));
HashMap<String, Object> result = new HashMap<>();
if (ValidationUtil.isEmpty(registrationManage)) {
return result;
}
BoolQueryBuilder boolQuery = QueryBuilders.boolQuery();
TermQueryBuilder termQueryBuilder = QueryBuilders.termQuery(USE_ORG_CODE, registrationManage.getUseRegistrationCode());
boolQuery.must(termQueryBuilder);
BoolQueryBuilder meBuilder = QueryBuilders.boolQuery();
meBuilder.should(QueryBuilders.matchQuery(STATUS, "已认领"));
meBuilder.should(QueryBuilders.boolQuery().mustNot(QueryBuilders.existsQuery(STATUS)));
meBuilder.should(QueryBuilders.boolQuery().must(QueryBuilders.matchPhraseQuery(STATUS, "")));
meBuilder.minimumShouldMatch(1);
boolQuery.must(meBuilder);
List<JSONObject> equipmentLists = Collections.emptyList();
try {
equipmentLists = registrationManageService.searchResponse(IDX_BIZ_VIEW_JG_ALL, boolQuery, hit -> JSONObject.parseObject(hit.getSourceAsString(), JSONObject.class)).stream().map(item -> {
JSONObject newItem = new JSONObject(item);
newItem.put(record, Objects.toString(newItem.get(SEQUENCE_NBR), ""));
return newItem;
}).collect(Collectors.toList());
} catch (Exception ex) {
ex.printStackTrace();
}
result.put(EQU_LISTS, equipmentLists);
result.put(useRegistrationCode, registrationManage.getUseRegistrationCode());
result.put(equUseAddress, registrationManage.getEquUseAddress());
return result;
}
/**
* 撤回
*
* @param dto
*/
@GlobalTransactional(rollbackFor = Exception.class)
public void cancel(JgCertificateReplenishDto dto) {
String instanceId = dto.getInstanceId();
String nextTaskId = dto.getNextTaskId();
String lockKey = CommonServiceImpl.buildJgExecuteLockKey(instanceId);
RLock lock = redissonClient.getLock(lockKey);
try {
boolean isLocked = lock.tryLock(0, 180, TimeUnit.SECONDS);
if (!isLocked) {
throw new BadRequest("当前流程已经被执行!请重新打开页面查看并执行!");
}
// 流程执行时,状态及权限校验
commonService.checkForRevocationFlow(nextTaskId, instanceId);
JgCertificateReplenish certRep = baseMapper.selectById(dto.getSequenceNbr());
// 回滚工作流
ProcessTaskDTO processTaskDTO = cmWorkflowService.rollBack(dto.getInstanceId());
WorkflowResultDto workflowResultDto = commonService.buildWorkFlowInfo(Collections.singletonList(processTaskDTO)).get(0);
certRep.setPromoter("");
certRep.setNextExecuteIds(workflowResultDto.getNextExecutorRoleIds());
certRep.setNextExecuteUserIds(workflowResultDto.getNextExecutorUserIds());
certRep.setApplyStatus(String.valueOf(FlowStatusEnum.ROLLBACK.getCode()));
certRep.setNextTaskId(workflowResultDto.getNextTaskId());
baseMapper.updateById(certRep);
JSONObject jsonObject = JSON.parseObject(JSON.toJSONString(certRep));
jsonObject.put("nextExecuteUser", certRep.getNextExecuteIds());
jsonObject.put("taskType", BusinessTypeEnum.JG_REPLACEMENT_REGISTRATION.getCode());
jsonObject.put("flowStatus", FlowStatusEnum.ROLLBACK.getCode());
jsonObject.put("flowStatusLabel", FlowStatusEnum.ROLLBACK.getName());
commonService.rollbackTask(certRep.getInstanceId(), jsonObject);
commonService.saveExecuteFlowData2Redis(instanceId, this.buildInstanceRuntimeData(certRep));
this.delRepeatUseEquipData(certRep.getSequenceNbr(), certRep.getApplyStatus(), certRep.getUseUnitCode());
} catch (InterruptedException e) {
e.printStackTrace();
} finally {
if (lock.isHeldByCurrentThread()) {
lock.unlock();
}
}
}
/**
* 删除redis校验重复引用设备的数据
*/
private void delRepeatUseEquipData(Long id, String status, String companyCode) {
List<JgCertificateReplenishEq> list = certificateReplenishEqService.lambdaQuery().eq(JgCertificateReplenishEq::getCertificateReplenishId, id).list();
// 获取单位变更设备列表
if (CollectionUtils.isEmpty(list)) {
return;
}
List<String> records = list.stream().map(JgCertificateReplenishEq::getEquId).collect(Collectors.toList());
if (NOT_FLOWING_STATE.contains(status)) {
EquipUsedCheckStrategyContext.getUsedStrategy(EQUIP_TRANSFER_PROCESS_KEY)
.delDataForCheckEquipRepeatUsed(records, companyCode);
}
}
public InstanceRuntimeData buildInstanceRuntimeData(JgCertificateReplenish certRep) {
return InstanceRuntimeData.builder()
.nextExecuteUserIds(certRep.getNextExecuteUserIds())
.promoter(certRep.getPromoter())
.nextTaskId(certRep.getNextTaskId())
.build();
}
}
\ No newline at end of file
......@@ -289,7 +289,7 @@
<w:szCs w:val="28"/>
<w:lang w:val="en-US" w:eastAsia="zh-CN"/>
</w:rPr>
<w:t>${(useUnitAddress)!'——'}</w:t>
<w:t>${(equUseAddress)!'——'}</w:t>
</w:r>
</w:p>
</w:tc>
......
......@@ -21,6 +21,7 @@ public enum ApplicationFormTypeEnum {
AZGZ("AZGZ", "GZ_AZ"),//安装告知
WBBA("WBBA", "WB_BA"),//维保合同备案
SYDJ("SYDJ", "DJ_SY"),//使用登记
BZDJ("BZDJ", "DJ_BZ"),// 补证登记
SBYJ("SBYJ", "SB_YJ"),//设备移交
GZGZ("GZGZ", "GZ_GZ"),//改造告知
WXGZ("WXGZ", "GZ_WX"),//维修告知
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment