diff --git a/logon/jnlogoRLF20240528162449110129.png b/logon/jnlogoRLF20240528162449110129.png new file mode 100644 index 0000000..4b005d0 Binary files /dev/null and b/logon/jnlogoRLF20240528162449110129.png differ diff --git a/logon/jnlogoVFU20240528162510116091.png b/logon/jnlogoVFU20240528162510116091.png new file mode 100644 index 0000000..4b005d0 Binary files /dev/null and b/logon/jnlogoVFU20240528162510116091.png differ diff --git a/logon/wcQES20240528162510119987.png b/logon/wcQES20240528162510119987.png new file mode 100644 index 0000000..ae1f9fa Binary files /dev/null and b/logon/wcQES20240528162510119987.png differ diff --git a/logon/wcWGB20240528162449139599.png b/logon/wcWGB20240528162449139599.png new file mode 100644 index 0000000..ae1f9fa Binary files /dev/null and b/logon/wcWGB20240528162449139599.png differ diff --git a/ruoyi-admin/pom.xml b/ruoyi-admin/pom.xml index b1a3eb4..0b4c0be 100644 --- a/ruoyi-admin/pom.xml +++ b/ruoyi-admin/pom.xml @@ -143,6 +143,16 @@ + + src/main/java + + **/*.properties + **/*.xml + **/*.yml + + + false + src/main/resources BOOT-INF @@ -159,6 +169,10 @@ src/main/resources + + **/*.* + + false diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/customer/CustomerController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/customer/CustomerController.java index 20f3678..4599e5a 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/customer/CustomerController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/customer/CustomerController.java @@ -3,11 +3,15 @@ package com.ruoyi.web.controller.customer; import java.io.IOException; import java.util.ArrayList; import java.util.List; +import java.util.concurrent.TimeUnit; import javax.servlet.http.HttpServletResponse; import com.alibaba.fastjson2.JSON; +import com.ruoyi.common.constant.CacheConstants; import com.ruoyi.common.constant.WebsocketConst; import com.ruoyi.common.core.domain.entity.SysUser; import com.ruoyi.common.core.domain.model.LoginUser; +import com.ruoyi.common.core.redis.RedisCache; +import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.uuid.UUID; import com.ruoyi.customer.domain.RfcResult; @@ -17,6 +21,7 @@ import com.ruoyi.customer.domain.qcc.QccECIIndustryVerifyJsonResult; import com.ruoyi.customer.domain.qcc.QccFuzzySearchJsonResult; import com.ruoyi.quot.domain.Quot; import com.ruoyi.system.domain.SysNotice; +import com.ruoyi.system.service.ISysConfigService; import com.ruoyi.system.service.ISysNoticeService; import com.ruoyi.web.utils.IdUtils; import com.ruoyi.web.utils.SapFunction.SapRfcUtils; @@ -56,6 +61,11 @@ import com.ruoyi.common.core.page.TableDataInfo; @PropertySource("classpath:/common.yml") public class CustomerController extends BaseController { + @Autowired + private RedisCache redisCache; + @Autowired + private ISysConfigService configService; + // 接口请求Key @Value("${qichacha.key}") private String Qcc_Key; @@ -267,6 +277,29 @@ public class CustomerController extends BaseController } /***********************************************企查查模块************************************/ + + /** + * 查询企查查客户列表 + */ + @PreAuthorize("@ss.hasPermi('customer:customer:qcclist')") + @PostMapping("/checkQccCount") + public AjaxResult checkQccCount(){ + String qccCusCount = configService.selectConfigByKey("qcc:cus:count"); + Integer searchCount = redisCache.getCacheObject(getCacheKey(getUsername())); + if (searchCount == null){ + searchCount = 1; + } else{ + searchCount++; + } + + if(searchCount<= Integer.valueOf(qccCusCount)){ + redisCache.setCacheObject(getCacheKey(getUsername()), searchCount, DateUtils.secondsUntilMidnight(), TimeUnit.SECONDS); + }else{ + return error("已超过查询限制次数"); + } + return success(); + } + /** * 查询企查查客户列表 */ @@ -296,6 +329,17 @@ public class CustomerController extends BaseController return getDataTable(result); } + /** + * 企查查客户查询次数缓存键名 + * + * @param username 用户名 + * @return 缓存键key + */ + private String getCacheKey(String username) + { + return CacheConstants.QCC_CUS + username; + } + // 获取企查查客户行业代码 @PreAuthorize("@ss.hasPermi('customer:customer:qcclist')") @GetMapping("/getIndustryCodeQcc/{cusName}") diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/monitor/CacheController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/monitor/CacheController.java index eca9778..f526d0f 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/monitor/CacheController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/monitor/CacheController.java @@ -47,6 +47,8 @@ public class CacheController caches.add(new SysCache(CacheConstants.SAP_COMMON, "SAP公共数据")); caches.add(new SysCache(CacheConstants.RB_VERSION_DATE, "调价版本")); + + caches.add(new SysCache(CacheConstants.QCC_CUS, "企查查客户查询次数")); } @PreAuthorize("@ss.hasPermi('monitor:cache:list')") diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/tool/quot/quotJswController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/tool/quot/quotJswController.java new file mode 100644 index 0000000..b34b447 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/tool/quot/quotJswController.java @@ -0,0 +1,22 @@ +package com.ruoyi.web.controller.tool.quot; + +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.R; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@Api("报价单数据接收") +@RestController +@RequestMapping("/jsw/jsw") +public class quotJswController extends BaseController { + + @ApiOperation("同步报价数据") + @PostMapping("/updateQuot") + public R updateQuot(quotModel quot) + { + return R.ok(quot); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/tool/quot/quotMaterialModel.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/tool/quot/quotMaterialModel.java new file mode 100644 index 0000000..3e08e26 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/tool/quot/quotMaterialModel.java @@ -0,0 +1,114 @@ +package com.ruoyi.web.controller.tool.quot; + +import java.math.BigDecimal; + +public class quotMaterialModel { + private String matXingh;//型号 + private String matGuig;//规格 + private String matDiany;//电压 + private String matStandard;//标准 + private BigDecimal matSl;//数量 + private String matDanw;//单位 + private String matRemark;//备注 + private BigDecimal matMatprice;//料价 + private BigDecimal matPrice;//红本价 + private BigDecimal matQuotPrice;//报价 + private BigDecimal matQuotAllPrice;//报价金额 + private String matMatpriceDiff;//料价价差率 + + public String getMatXingh() { + return matXingh; + } + + public void setMatXingh(String matXingh) { + this.matXingh = matXingh; + } + + public String getMatGuig() { + return matGuig; + } + + public void setMatGuig(String matGuig) { + this.matGuig = matGuig; + } + + public String getMatDiany() { + return matDiany; + } + + public void setMatDiany(String matDiany) { + this.matDiany = matDiany; + } + + public String getMatStandard() { + return matStandard; + } + + public void setMatStandard(String matStandard) { + this.matStandard = matStandard; + } + + public BigDecimal getMatSl() { + return matSl; + } + + public void setMatSl(BigDecimal matSl) { + this.matSl = matSl; + } + + public String getMatDanw() { + return matDanw; + } + + public void setMatDanw(String matDanw) { + this.matDanw = matDanw; + } + + public String getMatRemark() { + return matRemark; + } + + public void setMatRemark(String matRemark) { + this.matRemark = matRemark; + } + + public BigDecimal getMatMatprice() { + return matMatprice; + } + + public void setMatMatprice(BigDecimal matMatprice) { + this.matMatprice = matMatprice; + } + + public BigDecimal getMatPrice() { + return matPrice; + } + + public void setMatPrice(BigDecimal matPrice) { + this.matPrice = matPrice; + } + + public BigDecimal getMatQuotPrice() { + return matQuotPrice; + } + + public void setMatQuotPrice(BigDecimal matQuotPrice) { + this.matQuotPrice = matQuotPrice; + } + + public BigDecimal getMatQuotAllPrice() { + return matQuotAllPrice; + } + + public void setMatQuotAllPrice(BigDecimal matQuotAllPrice) { + this.matQuotAllPrice = matQuotAllPrice; + } + + public String getMatMatpriceDiff() { + return matMatpriceDiff; + } + + public void setMatMatpriceDiff(String matMatpriceDiff) { + this.matMatpriceDiff = matMatpriceDiff; + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/tool/quot/quotModel.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/tool/quot/quotModel.java new file mode 100644 index 0000000..3de920c --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/tool/quot/quotModel.java @@ -0,0 +1,61 @@ +package com.ruoyi.web.controller.tool.quot; + +import java.util.List; + +public class quotModel { + private String quotJswCode;//金思维报价单号 + private String quotCode;//报价单号 + private String quotTongPrice;//铜价 + private String quotLvPrice;//铝价 + private String quotMatpriceDiff;//整单料价价差率 + + private List quotMaterial;//明细 + + public String getQuotJswCode() { + return quotJswCode; + } + + public void setQuotJswCode(String quotJswCode) { + this.quotJswCode = quotJswCode; + } + + public String getQuotCode() { + return quotCode; + } + + public void setQuotCode(String quotCode) { + this.quotCode = quotCode; + } + + public String getQuotTongPrice() { + return quotTongPrice; + } + + public void setQuotTongPrice(String quotTongPrice) { + this.quotTongPrice = quotTongPrice; + } + + public String getQuotLvPrice() { + return quotLvPrice; + } + + public void setQuotLvPrice(String quotLvPrice) { + this.quotLvPrice = quotLvPrice; + } + + public String getQuotMatpriceDiff() { + return quotMatpriceDiff; + } + + public void setQuotMatpriceDiff(String quotMatpriceDiff) { + this.quotMatpriceDiff = quotMatpriceDiff; + } + + public List getQuotMaterial() { + return quotMaterial; + } + + public void setQuotMaterial(List quotMaterial) { + this.quotMaterial = quotMaterial; + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/utils/rbExcel/excelUtil.java b/ruoyi-admin/src/main/java/com/ruoyi/web/utils/rbExcel/excelUtil.java index cf76b66..9f10a16 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/utils/rbExcel/excelUtil.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/utils/rbExcel/excelUtil.java @@ -6,6 +6,7 @@ import com.ruoyi.quot.domain.Quot; import com.ruoyi.quot.domain.QuotMaterial; import com.ruoyi.redBook.domain.OAQuot; import com.ruoyi.redBook.domain.OAQuotProduct; +import com.ruoyi.web.utils.IdUtils; import jxl.HeaderFooter; import jxl.Workbook; import jxl.format.Alignment; @@ -15,10 +16,16 @@ import jxl.format.VerticalAlignment; import jxl.write.Number; import jxl.write.*; import jxl.write.biff.RowsExceededException; +import org.apache.commons.io.FileUtils; +import org.springframework.core.io.ClassPathResource; +import org.springframework.core.io.Resource; +import org.springframework.core.io.support.PathMatchingResourcePatternResolver; +import org.springframework.core.io.support.ResourcePatternResolver; import javax.servlet.http.HttpServletResponse; import java.io.File; import java.io.IOException; +import java.io.InputStream; import java.io.OutputStream; import java.math.BigDecimal; import java.net.URL; @@ -279,22 +286,22 @@ public class excelUtil { label = new Label(0, i-3, "备注",wff_merge); wsheet.addCell(label); - // 获取当前类加载器 - ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); - // 获取资源的URL - URL resourceUrl = classLoader.getResource("jnlogo.png"); - File file=new File(resourceUrl.getPath()); + InputStream fileInputStream = new ClassPathResource("/jnlogo.png").getInputStream(); + File file = new File("logon/"+IdUtils.createNo("jnlogo",3)+".png"); // 指定输出文件路径 + //转换 + FileUtils.copyInputStreamToFile(fileInputStream, file); + //设置图片位置,前两个参数为插入图片的单元格坐标,后面是设置从插入的单元格开始横向和纵向分别要占用的单元格个数,最后传入图片文件 WritableImage image=new WritableImage(0.3, 0.2, 1.25, 2.55,file); wsheet.addImage(image); - // 获取当前类加载器 - ClassLoader classLoader2 = Thread.currentThread().getContextClassLoader(); - // 获取资源的URL - URL resourceUrl2 = classLoader2.getResource("wc.png"); - file=new File(resourceUrl2.getPath()); + InputStream fileInputStream2 = new ClassPathResource("/wc.png").getInputStream(); + File file2 = new File("logon/"+IdUtils.createNo("wc",3)+".png"); // 指定输出文件路径 + //转换 + FileUtils.copyInputStreamToFile(fileInputStream2, file2); + //设置图片位置,前两个参数为插入图片的单元格坐标,后面是设置从插入的单元格开始横向和纵向分别要占用的单元格个数,最后传入图片文件 - image=new WritableImage(6.7, 0.2, 1.20, 2.65,file); + image=new WritableImage(6.7, 0.2, 1.20, 2.65,file2); wsheet.addImage(image); wsheet.getSettings().setBottomMargin(0.7d); @@ -312,11 +319,8 @@ public class excelUtil { footer.getCentre().setFontSize(13); wsheet.getSettings().setFooter(footer); - wsheet.getSettings().setPrintTitles(0, 8, 0, 7); - - wwb.write(); wwb.close(); @@ -590,22 +594,22 @@ public class excelUtil { label = new Label(0, i-3, "备注",wff_merge); wsheet.addCell(label); - // 获取当前类加载器 - ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); - // 获取资源的URL - URL resourceUrl = classLoader.getResource("jnlogo.png"); - File file=new File(resourceUrl.getPath()); + InputStream fileInputStream = new ClassPathResource("/jnlogo.png").getInputStream(); + File file = new File("logon/"+IdUtils.createNo("jnlogo",3)+".png"); // 指定输出文件路径 + //转换 + FileUtils.copyInputStreamToFile(fileInputStream, file); + //设置图片位置,前两个参数为插入图片的单元格坐标,后面是设置从插入的单元格开始横向和纵向分别要占用的单元格个数,最后传入图片文件 WritableImage image=new WritableImage(0.3, 0.2, 1.25, 2.55,file); wsheet.addImage(image); - // 获取当前类加载器 - ClassLoader classLoader2 = Thread.currentThread().getContextClassLoader(); - // 获取资源的URL - URL resourceUrl2 = classLoader2.getResource("wc.png"); - file=new File(resourceUrl2.getPath()); + InputStream fileInputStream2 = new ClassPathResource("/wc.png").getInputStream(); + File file2 = new File("logon/"+IdUtils.createNo("wc",3)+".png"); // 指定输出文件路径 + //转换 + FileUtils.copyInputStreamToFile(fileInputStream2, file2); + //设置图片位置,前两个参数为插入图片的单元格坐标,后面是设置从插入的单元格开始横向和纵向分别要占用的单元格个数,最后传入图片文件 - image=new WritableImage(6.7, 0.2, 1.20, 2.65,file); + image=new WritableImage(6.7, 0.2, 1.20, 2.65,file2); wsheet.addImage(image); wsheet.getSettings().setBottomMargin(0.7d); @@ -623,11 +627,8 @@ public class excelUtil { footer.getCentre().setFontSize(13); wsheet.getSettings().setFooter(footer); - wsheet.getSettings().setPrintTitles(0, 8, 0, 7); - - wwb.write(); wwb.close(); diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/webservice/config/WebServiceConfiguration.java b/ruoyi-admin/src/main/java/com/ruoyi/web/webservice/config/WebServiceConfiguration.java deleted file mode 100644 index 25c7d5e..0000000 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/webservice/config/WebServiceConfiguration.java +++ /dev/null @@ -1,40 +0,0 @@ -package com.ruoyi.web.webservice.config; -import com.ruoyi.web.webservice.service.QuotWebService; -import org.apache.cxf.bus.spring.SpringBus; -import org.apache.cxf.jaxws.EndpointImpl; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; - -import javax.xml.ws.Endpoint; - -@Configuration -public class WebServiceConfiguration { - - @Autowired - private QuotWebService quotWebService; - - @Autowired - private SpringBus spirngBus; - - - /** - * 发布服务 - * @return - */ - @Bean - public Endpoint quotWebServiceEndpoint(){ - - System.out.println("服务发布"); - //这里指定的端口不能跟应用的端口冲突, 单独指定 - String path = "http://127.0.0.1:9090/ws/quot"; - - EndpointImpl endpoint = new EndpointImpl(spirngBus, quotWebService); - endpoint.publish(path); - - System.out.println("服务成功,path: " + path); - System.out.println(String.format("在线的wsdl:%s?wsdl", path)); - - return endpoint ; - } -} \ No newline at end of file diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/webservice/domain/QuotEntity.java b/ruoyi-admin/src/main/java/com/ruoyi/web/webservice/domain/QuotEntity.java deleted file mode 100644 index b5b48db..0000000 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/webservice/domain/QuotEntity.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.ruoyi.web.webservice.domain; - -public class QuotEntity { - private String name; - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } -} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/webservice/service/QuotWebService.java b/ruoyi-admin/src/main/java/com/ruoyi/web/webservice/service/QuotWebService.java deleted file mode 100644 index 173571b..0000000 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/webservice/service/QuotWebService.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.ruoyi.web.webservice.service; -import com.ruoyi.web.webservice.domain.QuotEntity; - -import javax.jws.WebMethod; -import javax.jws.WebService; - -@WebService( - name = "QuotWebService", // 暴露服务名称 - targetNamespace = "http://QuotWebService.service.webservice.web.ruoyi.com"// 命名空间,一般是接口的包名倒序 -) -public interface QuotWebService { - - @WebMethod - QuotEntity getQuotInfo(); -} \ No newline at end of file diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/webservice/service/impl/QuotWebServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/web/webservice/service/impl/QuotWebServiceImpl.java deleted file mode 100644 index e0b1aea..0000000 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/webservice/service/impl/QuotWebServiceImpl.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.ruoyi.web.webservice.service.impl; -import com.ruoyi.web.webservice.domain.QuotEntity; -import com.ruoyi.web.webservice.service.QuotWebService; -import org.springframework.stereotype.Service; - -import javax.jws.WebService; - -@Service -@WebService(serviceName = "QuotWebService", // 与接口中指定的name一致, 都可以不写 - targetNamespace = "http://QuotWebService.service.webservice.web.ruoyi.com", // 与接口中的命名空间一致,一般是接口的包名倒,都可以不用写 - endpointInterface = "com.ruoyi.web.webservice.service.QuotWebService" // 接口类全路径 -) -public class QuotWebServiceImpl implements QuotWebService { - - @Override - public QuotEntity getQuotInfo() { - QuotEntity quot = new QuotEntity(); - quot.setName("测试"); - return quot; - } -} \ No newline at end of file diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/constant/CacheConstants.java b/ruoyi-common/src/main/java/com/ruoyi/common/constant/CacheConstants.java index d2b2a48..6b1df2d 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/constant/CacheConstants.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/constant/CacheConstants.java @@ -61,4 +61,9 @@ public class CacheConstants * 调价日期数据 redis key */ public static final String RB_VERSION_DATE = "rb_version_date:"; + + /** + * 企查查客户查询次数 + */ + public static final String QCC_CUS = "qcc_cus:"; } diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/DateUtils.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/DateUtils.java index fb2ae21..5905cb3 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/DateUtils.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/DateUtils.java @@ -3,17 +3,14 @@ package com.ruoyi.common.utils; import java.lang.management.ManagementFactory; import java.text.ParseException; import java.text.SimpleDateFormat; -import java.time.LocalDate; -import java.time.LocalDateTime; -import java.time.LocalTime; -import java.time.ZoneId; -import java.time.ZonedDateTime; +import java.time.*; +import java.time.temporal.ChronoUnit; import java.util.Date; import org.apache.commons.lang3.time.DateFormatUtils; /** * 时间工具类 - * + * * @author ruoyi */ public class DateUtils extends org.apache.commons.lang3.time.DateUtils @@ -29,13 +26,13 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils public static String YYYY_MM_DD_HH_MM_SS = "yyyy-MM-dd HH:mm:ss"; private static String[] parsePatterns = { - "yyyy-MM-dd", "yyyy-MM-dd HH:mm:ss", "yyyy-MM-dd HH:mm", "yyyy-MM", + "yyyy-MM-dd", "yyyy-MM-dd HH:mm:ss", "yyyy-MM-dd HH:mm", "yyyy-MM", "yyyy/MM/dd", "yyyy/MM/dd HH:mm:ss", "yyyy/MM/dd HH:mm", "yyyy/MM", "yyyy.MM.dd", "yyyy.MM.dd HH:mm:ss", "yyyy.MM.dd HH:mm", "yyyy.MM"}; /** * 获取当前Date型日期 - * + * * @return Date() 当前日期 */ public static Date getNowDate() @@ -45,7 +42,7 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils /** * 获取当前日期, 默认格式为yyyy-MM-dd - * + * * @return String */ public static String getDate() @@ -188,4 +185,27 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils ZonedDateTime zdt = localDateTime.atZone(ZoneId.systemDefault()); return Date.from(zdt.toInstant()); } + + /** + * 计算当前时间至晚上24点之前的秒数 + * @return + */ + public static Integer secondsUntilMidnight() + { + // 获取当前时间 + LocalDateTime now = LocalDateTime.now(); + + // 获取今天的结束时间(即明天的开始时间) + LocalDateTime endOfDay = now.toLocalDate().plusDays(1).atStartOfDay(); + + // 计算剩余秒数 + long secondsLeft = Duration.between(now, endOfDay).getSeconds(); + + return Integer.parseInt(String.valueOf(secondsLeft)); + } + + public static void main(String[] args) { + System.out.println(secondsUntilMidnight()); + } + } diff --git a/ruoyi-system/src/main/java/com/ruoyi/quot/domain/Quot.java b/ruoyi-system/src/main/java/com/ruoyi/quot/domain/Quot.java index 1d33e43..d7cdf51 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/quot/domain/Quot.java +++ b/ruoyi-system/src/main/java/com/ruoyi/quot/domain/Quot.java @@ -87,6 +87,9 @@ public class Quot extends BaseEntity /** 铜价 */ private String quotTongPrice; + /** 整单料价价差率 */ + private String quotMatpriceDiff; + /** 是否打印 */ private String quotPrint; /** 打印人 */ @@ -281,6 +284,9 @@ public class Quot extends BaseEntity public String getQuotTongPrice() { return quotTongPrice; } public void setQuotTongPrice(String quotTongPrice) { this.quotTongPrice = quotTongPrice; } + public String getQuotMatpriceDiff() { return quotMatpriceDiff; } + + public void setQuotMatpriceDiff(String quotMatpriceDiff) { this.quotMatpriceDiff = quotMatpriceDiff; } public String getQuotPrint() { return quotPrint; } public void setQuotPrint(String quotPrint) { this.quotPrint = quotPrint; } diff --git a/ruoyi-system/src/main/resources/mapper/quot/QuotMapper.xml b/ruoyi-system/src/main/resources/mapper/quot/QuotMapper.xml index c2d7402..b387982 100644 --- a/ruoyi-system/src/main/resources/mapper/quot/QuotMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/quot/QuotMapper.xml @@ -29,6 +29,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + @@ -93,7 +94,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" a.quot_phone, a.quot_inquiry_date, a.quot_project, a.quot_quotation_date, a.quot_quotation_from, a.quot_quotation_require, a.quot_feedback_explanation, a.quot_quantity, a.quot_total_price, a.quot_check_user_name, u2.nick_name quot_check_user_nickname, a.quot_approval_status, - a.quot_lv_price,a.quot_tong_price,a.quot_print,u3.nick_name quot_print_user_name, + a.quot_lv_price,a.quot_tong_price,a.quot_matprice_diff,a.quot_print,u3.nick_name quot_print_user_name, a.create_by, a.create_time, a.update_by, a.update_time, u.nick_name create_name, a.quot_jsxz_standard,a.quot_jsxz_approval_status,a.quot_jsxz_chapter, @@ -130,7 +131,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" a.quot_salesman_dept_id, a.quot_salesman_dept_name, a.quot_address, a.quot_phone, a.quot_inquiry_date, a.quot_project, a.quot_quotation_date, a.quot_quotation_from, a.quot_quotation_require, a.quot_feedback_explanation, a.quot_quantity, a.quot_total_price, a.quot_check_user_name, u2.nick_name quot_check_user_nickname, a.quot_approval_status, - a.quot_lv_price,a.quot_tong_price,a.quot_print,u3.nick_name quot_print_user_name, + a.quot_lv_price,a.quot_tong_price,a.quot_matprice_diff,a.quot_print,u3.nick_name quot_print_user_name, a.create_by, a.create_time, a.update_by, a.update_time, a.quot_jsxz_standard,a.quot_jsxz_approval_status,a.quot_jsxz_chapter, @@ -187,6 +188,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" quot_approval_status, quot_lv_price, quot_tong_price, + quot_matprice_diff, quot_print, quot_print_user_name, create_by, @@ -228,6 +230,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{quotApprovalStatus}, #{quotLvPrice}, #{quotTongPrice}, + #{quotMatpriceDiff}, #{quotPrint}, #{quotPrintUserName}, #{createBy}, @@ -272,6 +275,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" quot_approval_status = #{quotApprovalStatus}, quot_lv_price = #{quotLvPrice}, quot_tong_price = #{quotTongPrice}, + quot_matprice_diff = #{quotMatpriceDiff}, quot_print = #{quotPrint}, quot_print_user_name = #{quotPrintUserName}, create_by = #{createBy}, diff --git a/ruoyi-ui/src/api/customer/customer.js b/ruoyi-ui/src/api/customer/customer.js index 8068c07..07888b7 100644 --- a/ruoyi-ui/src/api/customer/customer.js +++ b/ruoyi-ui/src/api/customer/customer.js @@ -92,6 +92,14 @@ export function delCustomer(cusId) { } /******************************企查查模块***********************************/ +// 校验是否超过企查查接口查询次数 +export function checkQccCount() { + return request({ + url: '/customer/customer/checkQccCount', + method: 'post' + }) +} + // 查询企查查客户列表 export function qccListCustomer(query) { return request({ diff --git a/ruoyi-ui/src/views/customer/customer/index.vue b/ruoyi-ui/src/views/customer/customer/index.vue index 6e81669..dca6d3a 100644 --- a/ruoyi-ui/src/views/customer/customer/index.vue +++ b/ruoyi-ui/src/views/customer/customer/index.vue @@ -113,7 +113,9 @@ @@ -186,7 +188,7 @@ - + @@ -198,7 +200,7 @@ - + @@ -303,311 +305,13 @@ - + - 银行信息 @@ -622,8 +326,9 @@ - + +