@ -5,20 +5,20 @@ import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSON ;
import com.github.pagehelper.PageInfo ;
import com.glxp.api.annotation.AuthRuleAnnotation ;
import com.glxp.api.annotation.Log ;
import com.glxp.api.common.enums.ResultEnum ;
import com.glxp.api.common.res.BaseResponse ;
import com.glxp.api.common.util.ResultVOUtils ;
import com.glxp.api.constant.BusinessType ;
import com.glxp.api.constant.ConstantStatus ;
import com.glxp.api.entity.auth.AuthAdmin ;
import com.glxp.api.entity.purchase.* ;
import com.glxp.api.entity.system.Sys temPDFModule Entity;
import com.glxp.api.entity.system.Sys PdfTemplateRelevanceStatemen Entity;
import com.glxp.api.entity.system.SystemPDFTemplateEntity ;
import com.glxp.api.exception.JsonException ;
import com.glxp.api.req.inout.InspectionPDFTemplateRequest ;
import com.glxp.api.req.inout.SystemPDFModuleRequest ;
import com.glxp.api.req.purchase.* ;
import com.glxp.api.req.system.DeleteCompanyFileRequest ;
import com.glxp.api.req.system.FilterPdfModuleRequest ;
import com.glxp.api.res.PageSimpleResponse ;
import com.glxp.api.res.purchase.SupProductResponse ;
import com.glxp.api.service.auth.AuthAdminService ;
@ -83,6 +83,7 @@ public class SupCertController {
@AuthRuleAnnotation ( "" )
@PostMapping ( "/sup/info/selectAllCert" )
@Log ( title = "资质证书" , businessType = BusinessType . INSERT )
public BaseResponse selectAllCert ( @RequestBody PostSelCertRequest postSelCertRequest ) {
String customerId = null ;
if ( StrUtil . isEmpty ( postSelCertRequest . getCustomerId ( ) ) )
@ -96,6 +97,76 @@ public class SupCertController {
if ( postSelCertRequest . getCertType ( ) = = null ) {
return ResultVOUtils . error ( 500 , "参数错误!" ) ;
}
if ( postSelCertRequest . getManufacturerIdFk ( ) = = null ) {
String errMsg = "" ;
ArrayList < String > list = new ArrayList < > ( ) ;
int i = postSelCertRequest . getSupCertSetEntities ( ) . size ( ) ;
for ( SupCertSetEntity supCertSetEntity : postSelCertRequest . getSupCertSetEntities ( ) ) {
i - - ;
FilterSupCertRequest supCertRequest = new FilterSupCertRequest ( ) ;
supCertRequest . setName ( supCertSetEntity . getName ( ) ) ;
supCertRequest . setCustomerId ( customerId ) ;
List < SupCertEntity > supCertEntities = supCertService . selectCompanyCert ( supCertRequest ) ;
if ( supCertEntities . size ( ) ! = 0 ) {
list . add ( supCertEntities . get ( 0 ) . getName ( ) ) ;
if ( supCertEntities . size ( ) ! = 0 & & i = = 0 ) {
for ( String s : list ) {
errMsg = errMsg + "," + s ;
}
return ResultVOUtils . error ( 999 , errMsg . substring ( 1 ) + "已存在!" ) ;
}
}
}
} else {
if ( postSelCertRequest . getProductIdFk ( ) = = null ) {
String errMsg = "" ;
ArrayList < String > list = new ArrayList < > ( ) ;
int i = postSelCertRequest . getSupCertSetEntities ( ) . size ( ) ;
for ( SupCertSetEntity supCertSetEntity : postSelCertRequest . getSupCertSetEntities ( ) ) {
i - - ;
FilterSupCertRequest supCertRequest = new FilterSupCertRequest ( ) ;
supCertRequest . setName ( supCertSetEntity . getName ( ) ) ;
supCertRequest . setCustomerId ( customerId ) ;
supCertRequest . setManufacturerIdFk ( postSelCertRequest . getManufacturerIdFk ( ) ) ;
supCertRequest . setType ( 2 ) ;
List < SupCertEntity > supCertEntities = supCertService . selectCompanyCert ( supCertRequest ) ;
if ( supCertEntities . size ( ) ! = 0 ) {
list . add ( supCertEntities . get ( 0 ) . getName ( ) ) ;
if ( supCertEntities . size ( ) ! = 0 & & i = = 0 ) {
for ( String s : list ) {
errMsg = errMsg + "," + s ;
}
return ResultVOUtils . error ( 999 , errMsg . substring ( 1 ) + "已存在!" ) ;
}
}
}
} else {
String errMsg = "" ;
ArrayList < String > list = new ArrayList < > ( ) ;
int i = postSelCertRequest . getSupCertSetEntities ( ) . size ( ) ;
for ( SupCertSetEntity supCertSetEntity : postSelCertRequest . getSupCertSetEntities ( ) ) {
i - - ;
FilterSupCertRequest supCertRequest = new FilterSupCertRequest ( ) ;
supCertRequest . setName ( supCertSetEntity . getName ( ) ) ;
supCertRequest . setCustomerId ( customerId ) ;
supCertRequest . setManufacturerIdFk ( postSelCertRequest . getManufacturerIdFk ( ) ) ;
supCertRequest . setProductIdFk ( postSelCertRequest . getProductIdFk ( ) ) ;
supCertRequest . setType ( 3 ) ;
List < SupCertEntity > supCertEntities = supCertService . selectCompanyCert ( supCertRequest ) ;
if ( supCertEntities . size ( ) ! = 0 ) {
list . add ( supCertEntities . get ( 0 ) . getName ( ) ) ;
if ( supCertEntities . size ( ) ! = 0 & & i = = 0 ) {
for ( String s : list ) {
errMsg = errMsg + "," + s ;
}
return ResultVOUtils . error ( 999 , errMsg . substring ( 1 ) + "已存在!" ) ;
}
}
}
}
}
for ( SupCertSetEntity supCertSetEntity : postSelCertRequest . getSupCertSetEntities ( ) ) {
SupCertEntity supCertEntity = new SupCertEntity ( ) ;
supCertEntity . setName ( supCertSetEntity . getName ( ) ) ;
@ -127,9 +198,11 @@ public class SupCertController {
@AuthRuleAnnotation ( "" )
@PostMapping ( "/sup/info/insertCompanyCert" )
@Log ( title = "资质证书" , businessType = BusinessType . INSERT )
public BaseResponse insertCompanyCert ( @RequestBody SupCertEntity supCertEntity ) {
supCertEntity . setCreateTime ( new Date ( ) ) ;
supCertEntity . setUpdateTime ( new Date ( ) ) ;
supCertEntity . setStatus ( 0 ) ;
boolean b = supCertService . insertCompanyCert ( supCertEntity ) ;
return ResultVOUtils . success ( "成功" ) ;
}
@ -137,6 +210,7 @@ public class SupCertController {
@AuthRuleAnnotation ( "" )
@PostMapping ( "/sale/sup/cert/audit" )
@Log ( title = "资质证书" , businessType = BusinessType . UPDATE )
public BaseResponse auditSupCert ( @RequestBody SupCertEntity supCertEntity ) {
supCertEntity . setCreateTime ( new Date ( ) ) ;
supCertEntity . setUpdateTime ( new Date ( ) ) ;
@ -144,6 +218,38 @@ public class SupCertController {
return ResultVOUtils . success ( "成功" ) ;
}
//撤回单据
@AuthRuleAnnotation ( "" )
@PostMapping ( "/sale/sup/cert/revoke" )
@Log ( title = "单据管理" , businessType = BusinessType . UPDATE )
public BaseResponse revokeSupCert ( @RequestBody SupCertEntity supCertEntity ) {
supCertEntity . setCreateTime ( new Date ( ) ) ;
supCertEntity . setUpdateTime ( new Date ( ) ) ;
boolean b = supCertService . updateCompanyCert ( supCertEntity ) ;
if ( supCertEntity . getType ( ) = = ConstantStatus . CERT_COMPANY ) {
SupCompanyEntity supCompanyEntity = supCompanyService . findCompany ( supCertEntity . getCustomerId ( ) ) ;
supCompanyEntity . setAuditStatus ( ConstantStatus . AUDIT_UN ) ;
supCompanyEntity . setUpdateTime ( new Date ( ) ) ;
supCompanyService . modifyCompany ( supCompanyEntity ) ;
} else if ( supCertEntity . getType ( ) = = ConstantStatus . CERT_MANUFACTURER ) {
SupManufacturerEntity supManufacturerEntity = supManufacturerService . findManufacturer ( supCertEntity . getManufacturerIdFk ( ) ) ;
supManufacturerEntity . setAuditStatus ( ConstantStatus . AUDIT_UN ) ;
supManufacturerEntity . setUpdateTime ( new Date ( ) ) ;
supManufacturerService . modifyCompany ( supManufacturerEntity ) ;
} else if ( supCertEntity . getType ( ) = = ConstantStatus . CERT_PRODUCT ) {
SupProductResponse supProductResponse = supProductService . findByProductId ( supCertEntity . getProductIdFk ( ) ) ;
SupProductEntity supProductEntity = new SupProductEntity ( ) ;
supProductEntity . setId ( supProductResponse . getId ( ) ) ;
supProductEntity . setUpdateTime ( new Date ( ) ) ;
supProductEntity . setAuditStatus ( ConstantStatus . AUDIT_UN ) ;
supProductService . modifyRegistration ( supProductEntity ) ;
}
return ResultVOUtils . success ( "成功" ) ;
}
@Resource
SupCompanyService supCompanyService ;
@Resource
@ -153,9 +259,21 @@ public class SupCertController {
@AuthRuleAnnotation ( "" )
@PostMapping ( "/sup/info/updateCompanyCert" )
@Log ( title = "资质证书" , businessType = BusinessType . UPDATE )
public BaseResponse updateCompanyCert ( @RequestBody PostSupCertRequest postSupCertRequest ) {
SupCertEntity supCertEntity = new SupCertEntity ( ) ;
BeanUtils . copyProperties ( postSupCertRequest , supCertEntity ) ;
if ( postSupCertRequest . getVailDate ( ) ! = null & & postSupCertRequest . getExpireDate ( ) ! = null ) {
if ( postSupCertRequest . getVailDate ( ) . getTime ( ) > postSupCertRequest . getExpireDate ( ) . getTime ( ) ) {
return ResultVOUtils . error ( 999 , "生效期不能小于失效期!" ) ;
}
}
if ( postSupCertRequest . getRepeatUpload ( ) = = 1 ) {
//已审核的重新提交
//1.修改对应的资质信息进入变更审核状态,
@ -219,18 +337,17 @@ public class SupCertController {
return ResultVOUtils . error ( ResultEnum . PARAM_VERIFY_FALL , "参数不能为空!" ) ;
}
//查询模板文件是否存在
FilterPdfModuleRequest filterPdfModuleRequest = new FilterPdfModuleRequest ( ) ;
filterPdfModuleRequest . setId ( inspectionPDFTemplateRequest . getModuleId ( ) ) ;
SystemPDFModuleEntity systemPDFModule = systemPDFModuleService . findSystemPDFModule ( filterPdfModuleRequest ) ;
if ( null = = systemPDFModule ) {
SysPdfTemplateRelevanceStatemenEntity sysPdfTemplateRelevanceStatemenEntity = systemPDFModuleService . selectByStatemenId ( inspectionPDFTemplateRequest . getId ( ) ) ;
if ( null = = sysPdfTemplateRelevanceStatemenEntity ) {
return ResultVOUtils . error ( ResultEnum . DATA_NOT , "所属模块错误" ) ;
}
SystemPDFTemplateEntity systemPDFTemplateEntity = systemPDFTemplateService . selectById ( String . valueOf ( sys temPDFModule . getTemplateId ( ) ) ) ;
SystemPDFTemplateEntity systemPDFTemplateEntity = systemPDFTemplateService . selectById ( String . valueOf ( sys PdfTemplateRelevanceStatemenEntity . getTemplateId ( ) ) ) ;
if ( null = = systemPDFTemplateEntity ) {
return ResultVOUtils . error ( ResultEnum . DATA_NOT , "模板错误" ) ;
}
return ResultVOUtils . success ( sys temPDFModule . getTemplateId ( ) ) ;
return ResultVOUtils . success ( sys PdfTemplateRelevanceStatemenEntity . getTemplateId ( ) ) ;
}
/ * *
@ -258,27 +375,31 @@ public class SupCertController {
int i = 1 ;
if ( selectSupCertList ! = null & & selectSupCertList . size ( ) > 0 ) {
for ( SupCertEntity obj : selectSupCertList ) {
//组装数据
Map < String , Object > supData = new HashMap < > ( ) ;
supData . put ( "companyName" , supCompanyEntity . getCompanyName ( ) = = null ? ' ' : supCompanyEntity . getCompanyName ( ) ) ;
supData . put ( "creditNum" , supCompanyEntity . getCreditNum ( ) = = null ? ' ' : supCompanyEntity . getCreditNum ( ) ) ;
supData . put ( "classes" , supCompanyEntity . getClasses ( ) . equals ( 1 ) ? "医院" : "经营企业" ) ;
supData . put ( "area" , supCompanyEntity . getArea ( ) = = null ? ' ' : supCompanyEntity . getArea ( ) ) ;
supData . put ( "contacts" , supCompanyEntity . getContacts ( ) = = null ? ' ' : supCompanyEntity . getContacts ( ) ) ;
supData . put ( "detailAddr" , supCompanyEntity . getDetailAddr ( ) = = null ? ' ' : supCompanyEntity . getDetailAddr ( ) ) ;
supData . put ( "mobile" , supCompanyEntity . getMobile ( ) = = null ? ' ' : supCompanyEntity . getMobile ( ) ) ;
supData . put ( "email" , supCompanyEntity . getEmail ( ) = = null ? ' ' : supCompanyEntity . getEmail ( ) ) ;
supData . put ( "index" , String . valueOf ( i ) ) ;
supData . put ( "name" , obj . getName ( ) = = null ? ' ' : obj . getName ( ) ) ;
supData . put ( "code" , obj . getCode ( ) = = null ? ' ' : obj . getCode ( ) ) ;
supData . put ( "vaiDate" , formatter . format ( obj . getVailDate ( ) ) ) ;
supData . put ( "expireDate" , formatter . format ( obj . getExpireDate ( ) ) ) ;
supData . put ( "status" , obj . getStatus ( ) = = 0 ? "有效" : "失效" ) ;
supData . put ( "auditStatus" , getAuditStatus ( obj . getAuditStatus ( ) ) ) ;
supData . put ( "remark" , obj . getRemark ( ) = = null ? ' ' : obj . getRemark ( ) ) ;
supData . put ( "filePath" , "D:/udi/udiwms/udiwmsfile/register/image2/" + obj . getFilePath ( ) ) ;
list . add ( supData ) ;
i + + ;
List < String > urlList = Arrays . asList ( obj . getFilePath ( ) . split ( "," ) ) ;
for ( String url : urlList ) {
//组装数据
Map < String , Object > supData = new HashMap < > ( ) ;
supData . put ( "companyName" , supCompanyEntity . getCompanyName ( ) = = null ? ' ' : supCompanyEntity . getCompanyName ( ) ) ;
supData . put ( "creditNum" , supCompanyEntity . getCreditNum ( ) = = null ? ' ' : supCompanyEntity . getCreditNum ( ) ) ;
supData . put ( "classes" , supCompanyEntity . getClasses ( ) . equals ( 1 ) ? "医院" : "经营企业" ) ;
supData . put ( "area" , supCompanyEntity . getArea ( ) = = null ? ' ' : supCompanyEntity . getArea ( ) ) ;
supData . put ( "contacts" , supCompanyEntity . getContacts ( ) = = null ? ' ' : supCompanyEntity . getContacts ( ) ) ;
supData . put ( "detailAddr" , supCompanyEntity . getDetailAddr ( ) = = null ? ' ' : supCompanyEntity . getDetailAddr ( ) ) ;
supData . put ( "mobile" , supCompanyEntity . getMobile ( ) = = null ? ' ' : supCompanyEntity . getMobile ( ) ) ;
supData . put ( "email" , supCompanyEntity . getEmail ( ) = = null ? ' ' : supCompanyEntity . getEmail ( ) ) ;
supData . put ( "index" , String . valueOf ( i ) ) ;
supData . put ( "name" , obj . getName ( ) = = null ? ' ' : obj . getName ( ) ) ;
supData . put ( "code" , obj . getCode ( ) = = null ? ' ' : obj . getCode ( ) ) ;
supData . put ( "vaiDate" , obj . getVailDate ( ) = = null ? ' ' : formatter . format ( obj . getVailDate ( ) ) ) ;
supData . put ( "expireDate" , obj . getExpireDate ( ) = = null ? ' ' : formatter . format ( obj . getExpireDate ( ) ) ) ;
supData . put ( "status" , obj . getStatus ( ) = = 0 ? "有效" : "失效" ) ;
supData . put ( "auditStatus" , getAuditStatus ( obj . getAuditStatus ( ) ) ) ;
supData . put ( "remark" , obj . getRemark ( ) = = null ? ' ' : obj . getRemark ( ) ) ;
supData . put ( "filePath" , filePath + "register/image2/" + url ) ;
list . add ( supData ) ;
i + + ;
}
}
}
@ -368,29 +489,32 @@ public class SupCertController {
int i = 1 ;
if ( selectSupCertList ! = null & & selectSupCertList . size ( ) > 0 ) {
for ( SupCertEntity obj : selectSupCertList ) {
//组装数据
Map < String , Object > supData = new HashMap < > ( ) ;
supData . put ( "customerName" , supManufacturerEntity . getSupName ( ) = = null ? ' ' : supManufacturerEntity . getSupName ( ) ) ;
supData . put ( "companyName" , supManufacturerEntity . getCompanyName ( ) = = null ? ' ' : supManufacturerEntity . getCompanyName ( ) ) ;
supData . put ( "companyType" , supManufacturerEntity . getCompanyType ( ) . equals ( 1 ) ? "境内企业" : "境外企业" ) ;
supData . put ( "creditCode" , supManufacturerEntity . getCreditCode ( ) = = null ? ' ' : supManufacturerEntity . getCreditCode ( ) ) ;
supData . put ( "placeArea" , supManufacturerEntity . getPlaceArea ( ) = = null ? ' ' : supManufacturerEntity . getPlaceArea ( ) ) ;
supData . put ( "productionArea" , supManufacturerEntity . getProductionArea ( ) = = null ? ' ' : supManufacturerEntity . getProductionArea ( ) ) ;
supData . put ( "registerStatus" , getRegisterStatus ( supManufacturerEntity . getRegisterStatus ( ) ) ) ;
supData . put ( "placeAddress" , supManufacturerEntity . getPlaceAddress ( ) = = null ? ' ' : supManufacturerEntity . getPlaceAddress ( ) ) ;
supData . put ( "productionAddress" , supManufacturerEntity . getProductionAddress ( ) = = null ? ' ' : supManufacturerEntity . getProductionAddress ( ) ) ;
supData . put ( "remark1" , supManufacturerEntity . getRemark ( ) = = null ? ' ' : supManufacturerEntity . getRemark ( ) ) ;
supData . put ( "index" , String . valueOf ( i ) ) ;
supData . put ( "name" , obj . getName ( ) = = null ? ' ' : obj . getName ( ) ) ;
supData . put ( "code" , obj . getCode ( ) = = null ? ' ' : obj . getCode ( ) ) ;
supData . put ( "vaiDate" , formatter . format ( obj . getVailDate ( ) ) ) ;
supData . put ( "expireDate" , formatter . format ( obj . getExpireDate ( ) ) ) ;
supData . put ( "status" , obj . getStatus ( ) = = 0 ? "有效" : "失效" ) ;
supData . put ( "auditStatus" , getAuditStatus ( obj . getAuditStatus ( ) ) ) ;
supData . put ( "remark2" , obj . getRemark ( ) = = null ? ' ' : obj . getRemark ( ) ) ;
supData . put ( "filePath" , "d:/1s/udiwms/register/file/image2/" + obj . getFilePath ( ) ) ;
list . add ( supData ) ;
i + + ;
List < String > urlList = Arrays . asList ( obj . getFilePath ( ) . split ( "," ) ) ;
for ( String url : urlList ) {
//组装数据
Map < String , Object > supData = new HashMap < > ( ) ;
supData . put ( "customerName" , supManufacturerEntity . getSupName ( ) = = null ? ' ' : supManufacturerEntity . getSupName ( ) ) ;
supData . put ( "companyName" , supManufacturerEntity . getCompanyName ( ) = = null ? ' ' : supManufacturerEntity . getCompanyName ( ) ) ;
supData . put ( "companyType" , supManufacturerEntity . getCompanyType ( ) . equals ( 1 ) ? "境内企业" : "境外企业" ) ;
supData . put ( "creditCode" , supManufacturerEntity . getCreditCode ( ) = = null ? ' ' : supManufacturerEntity . getCreditCode ( ) ) ;
supData . put ( "placeArea" , supManufacturerEntity . getPlaceArea ( ) = = null ? ' ' : supManufacturerEntity . getPlaceArea ( ) ) ;
supData . put ( "productionArea" , supManufacturerEntity . getProductionArea ( ) = = null ? ' ' : supManufacturerEntity . getProductionArea ( ) ) ;
supData . put ( "registerStatus" , getRegisterStatus ( supManufacturerEntity . getRegisterStatus ( ) ) ) ;
supData . put ( "placeAddress" , supManufacturerEntity . getPlaceAddress ( ) = = null ? ' ' : supManufacturerEntity . getPlaceAddress ( ) ) ;
supData . put ( "productionAddress" , supManufacturerEntity . getProductionAddress ( ) = = null ? ' ' : supManufacturerEntity . getProductionAddress ( ) ) ;
supData . put ( "remark1" , supManufacturerEntity . getRemark ( ) = = null ? ' ' : supManufacturerEntity . getRemark ( ) ) ;
supData . put ( "index" , String . valueOf ( i ) ) ;
supData . put ( "name" , obj . getName ( ) = = null ? ' ' : obj . getName ( ) ) ;
supData . put ( "code" , obj . getCode ( ) = = null ? ' ' : obj . getCode ( ) ) ;
supData . put ( "vaiDate" , obj . getVailDate ( ) = = null ? ' ' : formatter . format ( obj . getVailDate ( ) ) ) ;
supData . put ( "expireDate" , obj . getExpireDate ( ) = = null ? ' ' : formatter . format ( obj . getExpireDate ( ) ) ) ;
supData . put ( "status" , obj . getStatus ( ) = = 0 ? "有效" : "失效" ) ;
supData . put ( "auditStatus" , getAuditStatus ( obj . getAuditStatus ( ) ) ) ;
supData . put ( "remark2" , obj . getRemark ( ) = = null ? ' ' : obj . getRemark ( ) ) ;
supData . put ( "filePath" , filePath + "register/image2/" + url ) ;
list . add ( supData ) ;
i + + ;
}
}
}
@ -428,31 +552,35 @@ public class SupCertController {
int i = 1 ;
if ( selectSupCertList ! = null & & selectSupCertList . size ( ) > 0 ) {
for ( SupCertEntity obj : selectSupCertList ) {
//组装数据
Map < String , Object > supData = new HashMap < > ( ) ;
supData . put ( "customerName" , supManufacturerEntity . getSupName ( ) = = null ? ' ' : supManufacturerEntity . getSupName ( ) ) ;
supData . put ( "manufacturerldFk" , supManufacturerEntity . getCompanyName ( ) = = null ? ' ' : supManufacturerEntity . getCompanyName ( ) ) ;
supData . put ( "recordProductName" , supProductEntity . getRecordProductName ( ) = = null ? ' ' : supProductEntity . getRecordProductName ( ) ) ;
supData . put ( "recordCode" , supProductEntity . getRecordCode ( ) = = null ? ' ' : supProductEntity . getRecordCode ( ) ) ;
supData . put ( "recordPeopleName" , supProductEntity . getRecordPeopleName ( ) = = null ? ' ' : supProductEntity . getRecordPeopleName ( ) ) ;
supData . put ( "hchzsb" , supProductEntity . getHchzsb ( ) = = null ? ' ' : supProductEntity . getHchzsb ( ) ) ;
supData . put ( "productType" , supProductEntity . getProductType ( ) = = null ? ' ' : supProductEntity . getProductType ( ) ) ;
supData . put ( "productDirectoryCode" , supProductEntity . getProductDirectoryCode ( ) = = null ? ' ' : supProductEntity . getProductDirectoryCode ( ) ) ;
supData . put ( "specification" , supProductEntity . getSpecification ( ) = = null ? ' ' : supProductEntity . getSpecification ( ) ) ;
supData . put ( "cpms" , supProductEntity . getCpms ( ) = = null ? ' ' : supProductEntity . getCpms ( ) ) ;
supData . put ( "remark1" , supProductEntity . getRemark ( ) = = null ? ' ' : supProductEntity . getRemark ( ) ) ;
supData . put ( "index" , String . valueOf ( i ) ) ;
supData . put ( "name" , obj . getName ( ) = = null ? ' ' : obj . getName ( ) ) ;
supData . put ( "code" , obj . getCode ( ) = = null ? ' ' : obj . getCode ( ) ) ;
supData . put ( "vaiDate" , formatter . format ( obj . getVailDate ( ) ) ) ;
supData . put ( "expireDate" , formatter . format ( obj . getExpireDate ( ) ) ) ;
supData . put ( "status" , obj . getStatus ( ) = = 0 ? "有效" : "失效" ) ;
supData . put ( "auditStatus" , getAuditStatus ( obj . getAuditStatus ( ) ) ) ;
supData . put ( "remark2" , obj . getRemark ( ) = = null ? ' ' : obj . getRemark ( ) ) ;
supData . put ( "filePath" , "d:/1s/udiwms/register/file/image2/" + obj . getFilePath ( ) ) ;
list . add ( supData ) ;
i + + ;
List < String > urlList = Arrays . asList ( obj . getFilePath ( ) . split ( "," ) ) ;
for ( String url : urlList ) {
//组装数据
Map < String , Object > supData = new HashMap < > ( ) ;
supData . put ( "customerName" , supManufacturerEntity . getSupName ( ) = = null ? ' ' : supManufacturerEntity . getSupName ( ) ) ;
supData . put ( "manufacturerldFk" , supManufacturerEntity . getCompanyName ( ) = = null ? ' ' : supManufacturerEntity . getCompanyName ( ) ) ;
supData . put ( "recordProductName" , supProductEntity . getRecordProductName ( ) = = null ? ' ' : supProductEntity . getRecordProductName ( ) ) ;
supData . put ( "recordCode" , supProductEntity . getRecordCode ( ) = = null ? ' ' : supProductEntity . getRecordCode ( ) ) ;
supData . put ( "recordPeopleName" , supProductEntity . getRecordPeopleName ( ) = = null ? ' ' : supProductEntity . getRecordPeopleName ( ) ) ;
supData . put ( "hchzsb" , supProductEntity . getHchzsb ( ) = = null ? ' ' : supProductEntity . getHchzsb ( ) ) ;
supData . put ( "productType" , supProductEntity . getProductType ( ) = = null ? ' ' : supProductEntity . getProductType ( ) ) ;
supData . put ( "productDirectoryCode" , supProductEntity . getProductDirectoryCode ( ) = = null ? ' ' : supProductEntity . getProductDirectoryCode ( ) ) ;
supData . put ( "specification" , supProductEntity . getSpecification ( ) = = null ? ' ' : supProductEntity . getSpecification ( ) ) ;
// supData.put("cpms", supProductEntity.getCpms() == null ? ' ' : supProductEntity.getCpms());
supData . put ( "remark1" , supProductEntity . getRemark ( ) = = null ? ' ' : supProductEntity . getRemark ( ) ) ;
supData . put ( "index" , String . valueOf ( i ) ) ;
supData . put ( "name" , obj . getName ( ) = = null ? ' ' : obj . getName ( ) ) ;
supData . put ( "code" , obj . getCode ( ) = = null ? ' ' : obj . getCode ( ) ) ;
supData . put ( "vaiDate" , obj . getVailDate ( ) = = null ? ' ' : formatter . format ( obj . getVailDate ( ) ) ) ;
supData . put ( "expireDate" , obj . getExpireDate ( ) = = null ? ' ' : formatter . format ( obj . getExpireDate ( ) ) ) ;
supData . put ( "status" , obj . getStatus ( ) = = 0 ? "有效" : "失效" ) ;
supData . put ( "auditStatus" , getAuditStatus ( obj . getAuditStatus ( ) ) ) ;
supData . put ( "remark2" , obj . getRemark ( ) = = null ? ' ' : obj . getRemark ( ) ) ;
supData . put ( "filePath" , filePath + "register/image2/" + url ) ;
list . add ( supData ) ;
i + + ;
}
}
}
@ -460,35 +588,17 @@ public class SupCertController {
JasperUtils . jasperReport ( request , response , param , systemPDFTemplateEntity . getPath ( ) , "pdf" ) ;
}
//撤回单据
@AuthRuleAnnotation ( "" )
@PostMapping ( "/sale/sup/cert/revoke" )
public BaseResponse revokeSupCert ( @RequestBody SupCertEntity supCertEntity ) {
supCertEntity . setCreateTime ( new Date ( ) ) ;
supCertEntity . setUpdateTime ( new Date ( ) ) ;
boolean b = supCertService . updateCompanyCert ( supCertEntity ) ;
if ( supCertEntity . getType ( ) = = ConstantStatus . CERT_COMPANY ) {
SupCompanyEntity supCompanyEntity = supCompanyService . findCompany ( supCertEntity . getCustomerId ( ) ) ;
supCompanyEntity . setAuditStatus ( ConstantStatus . AUDIT_UN ) ;
supCompanyEntity . setUpdateTime ( new Date ( ) ) ;
supCompanyService . modifyCompany ( supCompanyEntity ) ;
} else if ( supCertEntity . getType ( ) = = ConstantStatus . CERT_MANUFACTURER ) {
SupManufacturerEntity supManufacturerEntity = supManufacturerService . findManufacturer ( supCertEntity . getManufacturerIdFk ( ) ) ;
supManufacturerEntity . setAuditStatus ( ConstantStatus . AUDIT_UN ) ;
supManufacturerEntity . setUpdateTime ( new Date ( ) ) ;
supManufacturerService . modifyCompany ( supManufacturerEntity ) ;
} else if ( supCertEntity . getType ( ) = = ConstantStatus . CERT_PRODUCT ) {
SupProductResponse supProductResponse = supProductService . findByProductId ( supCertEntity . getProductIdFk ( ) ) ;
SupProductEntity supProductEntity = new SupProductEntity ( ) ;
supProductEntity . setId ( supProductResponse . getId ( ) ) ;
supProductEntity . setUpdateTime ( new Date ( ) ) ;
supProductEntity . setAuditStatus ( ConstantStatus . AUDIT_UN ) ;
supProductService . modifyRegistration ( supProductEntity ) ;
//首营预览文件
@PostMapping ( "/udiwms/image/register/file" )
public BaseResponse uploadRegisterFile ( @RequestBody FilterImageRequest filterImageRequest ) {
List < String > urlList = Arrays . asList ( filterImageRequest . getImageUrl ( ) . split ( "," ) ) ;
List < String > list = new ArrayList < > ( ) ;
for ( String obj : urlList ) {
String url = filterImageRequest . getCertFileUrl ( ) + obj ;
list . add ( url ) ;
}
return ResultVOUtils . success ( "成功" ) ;
return ResultVOUtils . success ( list ) ;
}
}