Browse Source

[UPDATE] 修改客户报价信息,客户资料列表信息,bom信息列表,物料信息模块,仪表盘信息。

gsw
zhangsiqi 11 months ago
parent
commit
786e03b25c
  1. 51
      ruoyi-admin/src/main/java/com/ruoyi/erp/controller/ErpBomController.java
  2. 3
      ruoyi-admin/src/main/java/com/ruoyi/erp/mapper/ErpBomMapper.java
  3. 1
      ruoyi-admin/src/main/java/com/ruoyi/erp/service/IErpBomService.java
  4. 6
      ruoyi-admin/src/main/java/com/ruoyi/erp/service/impl/ErpBomServiceImpl.java
  5. 21
      ruoyi-admin/src/main/java/com/ruoyi/sales/service/impl/SalesOrderDetailServiceImpl.java
  6. 13
      ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysMakeOrderController.java
  7. 10
      ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysMakeOrderMapper.java
  8. 10
      ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysMakeOrderService.java
  9. 3
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysCustomerQuoteServiceImpl.java
  10. 6
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysCustomerServiceImpl.java
  11. 28
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysMakeOrderServiceImpl.java
  12. 6
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysPickingServiceImpl.java
  13. 6
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysProductModelServiceImpl.java
  14. 10
      ruoyi-admin/src/main/resources/mapper/erp/ErpBomMapper.xml
  15. 1
      ruoyi-admin/src/main/resources/mapper/system/SysCustomerQuoteChildMapper.xml
  16. 6
      ruoyi-admin/src/main/resources/mapper/system/SysMakeOrderMapper.xml
  17. 1982
      ruoyi-admin/src/main/resources/templates/dashboard2.html
  18. 12
      ruoyi-admin/src/main/resources/templates/erp/bom/add.html
  19. 2
      ruoyi-admin/src/main/resources/templates/erp/bom/bom.html
  20. 2
      ruoyi-admin/src/main/resources/templates/erp/bom/edit.html
  21. 160
      ruoyi-admin/src/main/resources/templates/erp/bom/equals.html
  22. 8
      ruoyi-admin/src/main/resources/templates/index.html
  23. 394
      ruoyi-admin/src/main/resources/templates/main.html
  24. 29
      ruoyi-common/src/main/java/com/ruoyi/common/core/redis/RedisCache.java

51
ruoyi-admin/src/main/java/com/ruoyi/erp/controller/ErpBomController.java

@ -5,6 +5,7 @@ import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.erp.domain.ErpBom; import com.ruoyi.erp.domain.ErpBom;
import com.ruoyi.erp.service.IErpBomService; import com.ruoyi.erp.service.IErpBomService;
@ -176,12 +177,22 @@ public class ErpBomController extends BaseController
{ {
return prefix + "/equals"; return prefix + "/equals";
} }
@RequiresPermissions("erp:bom:equals") @RequiresPermissions("erp:bom:equals")
@GetMapping("/euqalsBom") @PostMapping( "/equalsBomList")
public ModelMap equalsBom(@RequestBody String bomNo1,String bomNo2){ @ResponseBody
public TableDataInfo bomEqulasList()
{
startPage();
ErpBom erpBom = new ErpBom();
List<ErpBom> list = erpBomService.selectErpBomList(erpBom);
return getDataTable(list);
}
@RequiresPermissions("erp:bom:equals")
@PostMapping("/equalsBom")
@ResponseBody
public ModelMap equalsBom(@RequestParam("bomNo1") String bomNo1,@RequestParam("bomNo2") String bomNo2){
ModelMap map = new ModelMap(); ModelMap map = new ModelMap();
System.out.println("bomNo1:" + bomNo1+ " bomNo2:" +bomNo2); System.out.println("时间: "+ DateUtils.getTime() +" bomNo1:" + bomNo1+ " bomNo2:" +bomNo2);
//获取要比对的两个bom 获取下面的1物料信息 //获取要比对的两个bom 获取下面的1物料信息
ErpBom erpBom = erpBomService.selectBomByBomNo(bomNo1); ErpBom erpBom = erpBomService.selectBomByBomNo(bomNo1);
ErpBom erpbom1 = erpBomService.selectBomByBomNo(bomNo2); ErpBom erpbom1 = erpBomService.selectBomByBomNo(bomNo2);
@ -193,29 +204,37 @@ public class ErpBomController extends BaseController
List bom1list = new ArrayList<>(); List bom1list = new ArrayList<>();
List bom2list = new ArrayList<>(); List bom2list = new ArrayList<>();
for (ErpBom erpBom3:list){ for (ErpBom erpBom3:list){
Long useNum1 = erpBom3.getUseNum();
if (useNum1==null){
useNum1 = 0L;
}
String bom1 = erpBom3.getMaterialNo()+"-"+erpBom3.getMaterialName()+"-"+ useNum1;
for (ErpBom erpBom4:list1){ for (ErpBom erpBom4:list1){
String bom1 = erpBom3.getMaterialNo()+"-"+erpBom3.getMaterialName()+"-"+erpBom3.getUseNum(); Long useNum2 = erpBom4.getUseNum();
String bom2 = erpBom4.getMaterialNo()+"-"+erpBom4.getMaterialName()+"-"+erpBom4.getUseNum(); if (useNum2==null){
if (bom1 == bom2){ useNum2 = 0L;
boolean contains = tongList.stream().anyMatch(item-> item.equals(bom1)); }
if (!contains){ String bom2 = erpBom4.getMaterialNo()+"-"+erpBom4.getMaterialName()+"-"+ useNum2;
if (bom1.equals(bom2)){
boolean contains1 = tongList.stream().anyMatch(item-> item==(bom1));
if (!contains1){
tongList.add(bom1); tongList.add(bom1);
} }
}else{ }else{
boolean contains = bom1list.stream().anyMatch(item-> item.equals(bom1)); boolean contains2 = bom1list.stream().anyMatch(item-> item==(bom1));
if (!contains){ if (!contains2){
bom1list.add(bom1); bom1list.add(bom1);
} }
boolean contains1 = bom2list.stream().anyMatch(item-> item.equals(bom2)); boolean contains3 = bom2list.stream().anyMatch(item-> item==(bom2));
if (!contains1){ if (!contains3){
bom2list.add(bom1); bom2list.add(bom2);
} }
} }
} }
} }
map.put("tongList",tongList); map.put("tongList",tongList);
map.put("bom1list",bom1list); map.put("bom1List",bom1list);
map.put("bom2list",bom2list); map.put("bom2List",bom2list);
return map; return map;
} }

3
ruoyi-admin/src/main/java/com/ruoyi/erp/mapper/ErpBomMapper.java

@ -121,4 +121,7 @@ public interface ErpBomMapper
public ErpBom selectBomByBomNo(String bomNo); public ErpBom selectBomByBomNo(String bomNo);
public List<ErpBom> selectErpBomList1();
} }

1
ruoyi-admin/src/main/java/com/ruoyi/erp/service/IErpBomService.java

@ -96,4 +96,5 @@ public interface IErpBomService
* bom对象查询以bomNo作为条件 * bom对象查询以bomNo作为条件
*/ */
public ErpBom selectBomByBomNo(String bomNo); public ErpBom selectBomByBomNo(String bomNo);
} }

6
ruoyi-admin/src/main/java/com/ruoyi/erp/service/impl/ErpBomServiceImpl.java

@ -23,7 +23,7 @@ import java.util.List;
* @author ruoyi * @author ruoyi
* @date 2023-11-21 * @date 2023-11-21
*/ */
@Service @Service("erpBomL")
public class ErpBomServiceImpl implements IErpBomService public class ErpBomServiceImpl implements IErpBomService
{ {
@Autowired @Autowired
@ -239,4 +239,8 @@ public class ErpBomServiceImpl implements IErpBomService
// } // }
} }
} }
public List<ErpBom> selectErpBomList1(){
List<ErpBom> bomList = erpBomMapper.selectErpBomList1();
return bomList;
}
} }

21
ruoyi-admin/src/main/java/com/ruoyi/sales/service/impl/SalesOrderDetailServiceImpl.java

@ -1,12 +1,16 @@
package com.ruoyi.sales.service.impl; package com.ruoyi.sales.service.impl;
import java.util.List; import com.ruoyi.common.core.redis.RedisCache;
import org.springframework.beans.factory.annotation.Autowired; import com.ruoyi.common.core.text.Convert;
import org.springframework.stereotype.Service; import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.sales.mapper.SalesOrderDetailMapper; import com.ruoyi.common.utils.ShiroUtils;
import com.ruoyi.sales.domain.SalesOrderDetail; import com.ruoyi.sales.domain.SalesOrderDetail;
import com.ruoyi.sales.mapper.SalesOrderDetailMapper;
import com.ruoyi.sales.service.ISalesOrderDetailService; import com.ruoyi.sales.service.ISalesOrderDetailService;
import com.ruoyi.common.core.text.Convert; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/** /**
* 销售订单查询Service业务层处理 * 销售订单查询Service业务层处理
@ -19,6 +23,8 @@ public class SalesOrderDetailServiceImpl implements ISalesOrderDetailService
{ {
@Autowired @Autowired
private SalesOrderDetailMapper salesOrderDetailMapper; private SalesOrderDetailMapper salesOrderDetailMapper;
@Autowired
private RedisCache redisCache;
/** /**
* 查询销售订单查询 * 查询销售订单查询
@ -53,6 +59,11 @@ public class SalesOrderDetailServiceImpl implements ISalesOrderDetailService
@Override @Override
public int insertSalesOrderDetail(SalesOrderDetail salesOrderDetail) public int insertSalesOrderDetail(SalesOrderDetail salesOrderDetail)
{ {
String loginName = ShiroUtils.getLoginName();
salesOrderDetail.setUpdateBy(loginName);
salesOrderDetail.setUpdateTime(DateUtils.getNowDate());
String saleNo = redisCache.generateBillNo("XS");
salesOrderDetail.setSalesOrderCode(saleNo);
return salesOrderDetailMapper.insertSalesOrderDetail(salesOrderDetail); return salesOrderDetailMapper.insertSalesOrderDetail(salesOrderDetail);
} }

13
ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysMakeOrderController.java

@ -144,5 +144,16 @@ public class SysMakeOrderController extends BaseController
return toAjax(sysMakeOrderService.restoreSysMakeOrderById(id)); return toAjax(sysMakeOrderService.restoreSysMakeOrderById(id));
} }
@GetMapping( "/ByNoFinsh")
@ResponseBody
public AjaxResult ByNOFinsh()
{
return toAjax(sysMakeOrderService.selectSysMakeOrderByNOFinsh());
}
@GetMapping( "/ByFinsh")
@ResponseBody
public AjaxResult ByFinsh()
{
return toAjax(sysMakeOrderService.selectSysMakeOrderByFinsh());
}
} }

10
ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysMakeOrderMapper.java

@ -75,4 +75,14 @@ public interface SysMakeOrderMapper
* @return 结果 * @return 结果
*/ */
public int restoreSysMakeOrderById(Long id); public int restoreSysMakeOrderById(Long id);
/**
* 生产订单进行中的订单
*/
public Integer selectSysMakeOrderByNOFinsh();
/**
* 生产订单完成的订单
*/
public Integer selectSysMakeOrderByFinsh();
} }

10
ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysMakeOrderService.java

@ -73,4 +73,14 @@ public interface ISysMakeOrderService
* @return * @return
*/ */
int restoreSysMakeOrderById(Long id); int restoreSysMakeOrderById(Long id);
/**
* 生产订单进行中的订单
*/
public Integer selectSysMakeOrderByNOFinsh();
/**
* 生产订单完成的订单
*/
public Integer selectSysMakeOrderByFinsh();
} }

3
ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysCustomerQuoteServiceImpl.java

@ -1,5 +1,6 @@
package com.ruoyi.system.service.impl; package com.ruoyi.system.service.impl;
import com.ruoyi.common.utils.ShiroUtils;
import com.ruoyi.system.domain.SysCustomerQuote; import com.ruoyi.system.domain.SysCustomerQuote;
import com.ruoyi.system.mapper.SysCustomerQuoteMapper; import com.ruoyi.system.mapper.SysCustomerQuoteMapper;
import com.ruoyi.system.service.ISysCustomerQuoteService; import com.ruoyi.system.service.ISysCustomerQuoteService;
@ -25,6 +26,8 @@ public class SysCustomerQuoteServiceImpl implements ISysCustomerQuoteService {
@Override @Override
public int insertSysCustomerQuote(SysCustomerQuote sysCustomerQuote) { public int insertSysCustomerQuote(SysCustomerQuote sysCustomerQuote) {
String loginName = ShiroUtils.getLoginName();
sysCustomerQuote.setCreateBy(loginName);
return sysCustomerQuoteMapper.insertSysCustomerQuote(sysCustomerQuote); return sysCustomerQuoteMapper.insertSysCustomerQuote(sysCustomerQuote);
} }

6
ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysCustomerServiceImpl.java

@ -1,6 +1,8 @@
package com.ruoyi.system.service.impl; package com.ruoyi.system.service.impl;
import com.ruoyi.common.core.text.Convert; import com.ruoyi.common.core.text.Convert;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.ShiroUtils;
import com.ruoyi.system.domain.SysCustomer; import com.ruoyi.system.domain.SysCustomer;
import com.ruoyi.system.mapper.SysCustomerMapper; import com.ruoyi.system.mapper.SysCustomerMapper;
import com.ruoyi.system.service.ISysCustomerService; import com.ruoyi.system.service.ISysCustomerService;
@ -22,6 +24,7 @@ public class SysCustomerServiceImpl implements ISysCustomerService
@Autowired @Autowired
private SysCustomerMapper sysCustomerMapper; private SysCustomerMapper sysCustomerMapper;
@Override @Override
public SysCustomer selectSysCustomerById(Long customerId) { public SysCustomer selectSysCustomerById(Long customerId) {
return sysCustomerMapper.selectSysCustomerById(customerId); return sysCustomerMapper.selectSysCustomerById(customerId);
@ -48,6 +51,9 @@ public class SysCustomerServiceImpl implements ISysCustomerService
@Override @Override
public int insertSysCustomer(SysCustomer sysCustomer) public int insertSysCustomer(SysCustomer sysCustomer)
{ {
String loginName = ShiroUtils.getLoginName();
sysCustomer.setCreateBy(loginName);
sysCustomer.setCreateTime(DateUtils.getNowDate());
return sysCustomerMapper.insertSysCustomer(sysCustomer); return sysCustomerMapper.insertSysCustomer(sysCustomer);
} }

28
ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysMakeOrderServiceImpl.java

@ -1,5 +1,6 @@
package com.ruoyi.system.service.impl; package com.ruoyi.system.service.impl;
import com.ruoyi.common.core.redis.RedisCache;
import com.ruoyi.common.core.text.Convert; import com.ruoyi.common.core.text.Convert;
import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.ShiroUtils; import com.ruoyi.common.utils.ShiroUtils;
@ -23,6 +24,9 @@ public class SysMakeOrderServiceImpl implements ISysMakeOrderService
@Autowired @Autowired
private SysMakeOrderMapper sysMakeOrderMapper; private SysMakeOrderMapper sysMakeOrderMapper;
@Autowired
private RedisCache redisCache;
/** /**
* 查询生产订单 * 查询生产订单
* *
@ -59,6 +63,12 @@ public class SysMakeOrderServiceImpl implements ISysMakeOrderService
String loginName = ShiroUtils.getLoginName(); String loginName = ShiroUtils.getLoginName();
sysMakeOrder.setCreateBy(loginName); sysMakeOrder.setCreateBy(loginName);
sysMakeOrder.setCreateTime(DateUtils.getNowDate()); sysMakeOrder.setCreateTime(DateUtils.getNowDate());
String makeNo = redisCache.generateBillNo("PO");
sysMakeOrder.setMakeNo(makeNo);
sysMakeOrder.setUseStatus("0");
sysMakeOrder.setMakeStatus("0");
sysMakeOrder.setEceiptStatus("0");
sysMakeOrder.setQualityStatus("0");
return sysMakeOrderMapper.insertSysMakeOrder(sysMakeOrder); return sysMakeOrderMapper.insertSysMakeOrder(sysMakeOrder);
} }
@ -124,4 +134,22 @@ public class SysMakeOrderServiceImpl implements ISysMakeOrderService
{ {
return sysMakeOrderMapper.restoreSysMakeOrderById(id); return sysMakeOrderMapper.restoreSysMakeOrderById(id);
} }
/**
* 生产订单进行中的订单
*/
@Override
public Integer selectSysMakeOrderByNOFinsh() {
return sysMakeOrderMapper.selectSysMakeOrderByNOFinsh();
}
/**
* 生产订单完成的订单
*/
@Override
public Integer selectSysMakeOrderByFinsh() {
return sysMakeOrderMapper.selectSysMakeOrderByFinsh();
}
} }

6
ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysPickingServiceImpl.java

@ -1,5 +1,6 @@
package com.ruoyi.system.service.impl; package com.ruoyi.system.service.impl;
import com.ruoyi.common.core.redis.RedisCache;
import com.ruoyi.common.core.text.Convert; import com.ruoyi.common.core.text.Convert;
import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.ShiroUtils; import com.ruoyi.common.utils.ShiroUtils;
@ -22,7 +23,8 @@ public class SysPickingServiceImpl implements ISysPickingService
{ {
@Autowired @Autowired
private SysPickingMapper sysPickingMapper; private SysPickingMapper sysPickingMapper;
@Autowired
private RedisCache redisCache;
/** /**
* 查询开发修改单领料列表 * 查询开发修改单领料列表
* *
@ -74,6 +76,8 @@ public class SysPickingServiceImpl implements ISysPickingService
String loginName = ShiroUtils.getLoginName(); String loginName = ShiroUtils.getLoginName();
sysPicking.setUpdateBy(loginName); sysPicking.setUpdateBy(loginName);
sysPicking.setUpdateTime(DateUtils.getNowDate()); sysPicking.setUpdateTime(DateUtils.getNowDate());
String scllNo = redisCache.generateBillNo("SCLL");
sysPicking.setPickNo(scllNo);
return sysPickingMapper.updateSysPicking(sysPicking); return sysPickingMapper.updateSysPicking(sysPicking);
} }

6
ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysProductModelServiceImpl.java

@ -1,5 +1,6 @@
package com.ruoyi.system.service.impl; package com.ruoyi.system.service.impl;
import com.ruoyi.common.core.redis.RedisCache;
import com.ruoyi.common.core.text.Convert; import com.ruoyi.common.core.text.Convert;
import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.ShiroUtils; import com.ruoyi.common.utils.ShiroUtils;
@ -22,7 +23,8 @@ public class SysProductModelServiceImpl implements ISysProductModelService
{ {
@Autowired @Autowired
private SysProductModelMapper sysProductModelMapper; private SysProductModelMapper sysProductModelMapper;
@Autowired
private RedisCache redisCache;
/** /**
* 查询产品型号管理 * 查询产品型号管理
* *
@ -58,6 +60,8 @@ public class SysProductModelServiceImpl implements ISysProductModelService
{ {
String loginName = ShiroUtils.getLoginName(); String loginName = ShiroUtils.getLoginName();
sysProductModel.setCreateBy(loginName); sysProductModel.setCreateBy(loginName);
String cpxh = redisCache.generateNo("CPXH");
sysProductModel.setPcode(cpxh);
sysProductModel.setCreateTime(DateUtils.getNowDate()); sysProductModel.setCreateTime(DateUtils.getNowDate());
return sysProductModelMapper.insertSysProductModel(sysProductModel); return sysProductModelMapper.insertSysProductModel(sysProductModel);
} }

10
ruoyi-admin/src/main/resources/mapper/erp/ErpBomMapper.xml

@ -90,7 +90,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="useStatus != null and useStatus != ''"> and use_status = #{useStatus}</if> <if test="useStatus != null and useStatus != ''"> and use_status = #{useStatus}</if>
</where> </where>
</select> </select>
<select id="selectErpBomList1" resultMap="ErpBomResult">
select distinct bom_no, id, create_by, create_time, update_by, update_time, remark,
material_no, material_name, material_type, process_method, unit,
brand, `describe`, use_num, loss_rate, parent_id, `level`,
sort_no, audit_status, use_status from erp_bom
where bom_no != "" and del_flag = '0' ORDER BY id DESC;
</select>
<select id="selectErpBomById" parameterType="Long" resultMap="ErpBomResult"> <select id="selectErpBomById" parameterType="Long" resultMap="ErpBomResult">
<include refid="selectErpBomVo"/> <include refid="selectErpBomVo"/>
where id = #{id} where id = #{id}
@ -261,7 +267,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach> </foreach>
</select> </select>
<select id="selectBomByBomNo" resultMap="ErpBomResult"> <select id="selectBomByBomNo" resultMap="ErpBomResult">
select * from erp_bom where bomNo = #{bomNo} select * from erp_bom where bom_no = #{bomNo}
</select> </select>
</mapper> </mapper>

1
ruoyi-admin/src/main/resources/mapper/system/SysCustomerQuoteChildMapper.xml

@ -39,6 +39,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select id, quoteId, materialId, materialCode, materialName, materialType, processMethod, brand, photoUrl, `describe`, countTax, usdTax, materialNum, materialRmb, materialNoRmb, materialNoUsd, materialUsd, materialUsdSum, materialNoUsdSum, materialNoRmbSum, materialRmbSum, create_by, create_time, update_by, update_time, remark, degin_flag, del_flag from sys_customer_quotechild select id, quoteId, materialId, materialCode, materialName, materialType, processMethod, brand, photoUrl, `describe`, countTax, usdTax, materialNum, materialRmb, materialNoRmb, materialNoUsd, materialUsd, materialUsdSum, materialNoUsdSum, materialNoRmbSum, materialRmbSum, create_by, create_time, update_by, update_time, remark, degin_flag, del_flag from sys_customer_quotechild
</sql> </sql>
<select id="selectSysCustomerQuoteChildList" parameterType="SysCustomerQuoteChild" resultMap="SysCustomerQuoteChildResult"> <select id="selectSysCustomerQuoteChildList" parameterType="SysCustomerQuoteChild" resultMap="SysCustomerQuoteChildResult">
<include refid="selectSysCustomerQuoteChildVo"/> <include refid="selectSysCustomerQuoteChildVo"/>
<where> <where>

6
ruoyi-admin/src/main/resources/mapper/system/SysMakeOrderMapper.xml

@ -155,5 +155,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<update id="restoreSysMakeOrderById" parameterType="Long"> <update id="restoreSysMakeOrderById" parameterType="Long">
update sys_makeorder set del_flag = '0' where id = #{id} update sys_makeorder set del_flag = '0' where id = #{id}
</update> </update>
<select id="selectSysMakeOrderByFinsh">
select * from sys_makeorder where makeStatus = '5' and useStatus = 0
</select>
<select id="selectSysMakeOrderByNOFinsh">
select * from sys_makeorder from where makeStatus != '5' useStatus = 0
</select>
</mapper> </mapper>

1982
ruoyi-admin/src/main/resources/templates/dashboard2.html

File diff suppressed because it is too large

12
ruoyi-admin/src/main/resources/templates/erp/bom/add.html

@ -30,6 +30,7 @@
<div class="col-sm-8"> <div class="col-sm-8">
<!-- <input name="materialType" class="form-control" readonly />--> <!-- <input name="materialType" class="form-control" readonly />-->
<select disabled id="selectMaterialType" class="form-control m-b select2-multiple" th:with="childList=${@category.getChildByCode('materialType')}" readonly> <select disabled id="selectMaterialType" class="form-control m-b select2-multiple" th:with="childList=${@category.getChildByCode('materialType')}" readonly>
<optgroup>
<option value=""></option> <option value=""></option>
</optgroup> </optgroup>
<optgroup th:each="child: ${childList}" th:label="${child.name}" readonly> <optgroup th:each="child: ${childList}" th:label="${child.name}" readonly>
@ -99,7 +100,7 @@
$("#form-bom-add").validate({ $("#form-bom-add").validate({
focusCleanup: true focusCleanup: true
}); });
$(function() {; $(function() {
$("#materialNo").select2({ $("#materialNo").select2({
theme: "bootstrap", theme: "bootstrap",
allowClear: true, allowClear: true,
@ -250,7 +251,15 @@
} }
if (isNaN(value)) { if (isNaN(value)) {
return '用量必须为数字'; return '用量必须为数字';
}else if(value >100){
return "输入数值不能大100"
}else if(value < 0){
return "输入数值不能小于0";
}else {
new Number(value).toFixed(4)*100 +"%";
} }
} }
} }
}, },
@ -380,7 +389,6 @@
}) })
} }
</script> </script>
</body> </body>
</html> </html>

2
ruoyi-admin/src/main/resources/templates/erp/bom/bom.html

@ -603,7 +603,7 @@
function bomEqulas(){ function bomEqulas(){
var url = ctx + "erp/bom/equals"; var url = ctx + "erp/bom/equals";
var options = { var options = {
title: '打开bom对比', title: 'bom对比(只对比一阶物料)',
url: url url: url
}; };
$.modal.openOptions(options); $.modal.openOptions(options);

2
ruoyi-admin/src/main/resources/templates/erp/bom/edit.html

@ -137,7 +137,7 @@
$(function() { $(function() {
$("#selMaterialNo").select2({ $("#selMaterialNo").select2({
theme: "bootstrap", theme: "select2",
allowClear: true, allowClear: true,
placeholder: "请选择一个料号", placeholder: "请选择一个料号",
ajax:{ ajax:{

160
ruoyi-admin/src/main/resources/templates/erp/bom/equals.html

@ -3,140 +3,132 @@
<head> <head>
<th:block th:include="include :: header('bom对比')" /> <th:block th:include="include :: header('bom对比')" />
<th:block th:include="include :: select2-css" /> <th:block th:include="include :: select2-css" />
<th:block th:include="include :: bootstrap-editable-css" />
</head> </head>
<body class="white-bg"> <body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> <div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-bom-add"> <form class="form-horizontal m" id="form-bom-equlas">
<div class="form-group"> <div class="form-group">
<label class="col-sm-4 control-label is-required">第一项 bom号:</label> <label class="col-sm-6 control-label is-required">第一项 bom号:</label>
<div class="col-sm-4"> <div class="col-sm-6">
<select class="form-control m-b select2-multiple" id="bomNo1" name="bomNo" required> <select class="form-control" th:with="bomList=${@erpBomL.selectErpBomList1()}" id="bomNo1" name="bomNo1" required>
<option value=""></option>
<option th:each="bomss : ${bomList}" th:value="${bomss.bomNo}" th:text="${bomss.bomNo}"></option>
</select> </select>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-4 control-label is-required">第二项 bom号</label> <label class="col-sm-4 control-label is-required">第二项 bom号</label>
<div class="col-sm-4"> <div class="col-sm-6">
<select class="form-control m-b select2-multiple" id="bomNo2" name="bomNo" required> <select class="form-control m-b" th:with="bomList=${@erpBomL.selectErpBomList1()}" id="bomNo2" name="bomNo2" required>
<option value=""></option>
<option th:each="bomss : ${bomList}" th:value="${bomss.bomNo}" th:text="${bomss.bomNo}"></option>
</select> </select>
</div> </div>
<div class="btn-group-sm" id="toolbar" role="row"> <div class="btn-group-sm">
<a class="btn btn-success" onclick="seacher()"> <a class="btn btn-primary" onclick="searchBom()" >
<i class="fa fa-plus"></i> 搜索 <i class="fa fa-plus"></i> 搜索
</a> </a>
<a class="btn btn-danger multiple disabled" onclick="refresh()"> <button class="btn btn-danger multiple" onclick="refreshBom()">
<i class="fa fa-remove"></i> 重置 <i class="fa fa-remove"></i> 重置
</a> </button>
</div> </div>
</div> </div>
</form>
<div>
<div class="col-sm-12"> <div class="col-sm-12">
<div class="row"> <div class="col-xs-5" style="text-align: center;margin: 0px 0px;padding: 0px 0px;">
<div class="col-xs-6"> <input class="form-control" readonly name="bomNo" id="bom1-t">
<input class="form-control" name="bomNo" id="bom1-t">
</div> </div>
<div class="col-xs-6"> <div class="col-xs-5" style="text-align: center;margin: 0px 0px;padding: 0px 0px;">
<input class="form-control" name="bomNo" id="bom2-t"> <input class="form-control" readonly name="bomNo" id="bom2-t">
</div> </div>
</div>
<div class="col-xs-12" id="bom-to">
</div> </div>
</div>
<div class="col-sm-12">
<h5 class="form-control">相同项</h5>
<div class="row"> <div class="row">
<div class="col-xs-6" id="bom-ton"> <input class="form-control" style="text-align: center" disabled value="对比项为:料号-物料名称-用量">
<div class="col-sm-10">
<h3 class="left" style="text-align: left;height: auto">相同项</h3>
<div class="col-xs-10">
<div class="col-sm-12" id="bom-ton">
</div> </div>
</div> </div>
</div> </div>
</div>
<div class="col-sm-12"> <div class="col-sm-12">
<h5 class="form-control">不同项</h5>
<div class="row"> <div class="row">
<h3 class="el-form--label-left" style="text-align: left;height: auto">不同项</h3>
<div class="col-xs-10">
<div class="col-xs-6" id="bom1-dif"> <div class="col-xs-6" id="bom1-dif">
左列内容
</div> </div>
<div class="col-xs-6" id="bom2-dif"> <div class="col-xs-6" id="bom2-dif">
右列内容
</div>
</div> </div>
</div> </div>
</form> </div>
</div>
</div>
</div> </div>
<th:block th:include="include :: footer" /> <th:block th:include="include :: footer" />
<th:block th:include="include :: bootstrap-table-editable-js" />
<th:block th:include="include :: select2-js" /> <th:block th:include="include :: select2-js" />
<script th:inline="javascript"> <script th:inline="javascript">
var prefix = ctx + "erp/bom" var prefix = ctx + "erp/bom"
var sysUnitClassDatas = [[${@dict.getType('sys_unit_class')}]]; var sysUnitClassDatas = [[${@dict.getType('sys_unit_class')}]];
var materialTypeDatas = [[${@category.getChildByCode('materialType')}]]; var materialTypeDatas = [[${@category.getChildByCode('materialType')}]];
var bomLevelSelectDatas = [[${@dict.getTypeSelect('bomLevel')}]]; function searchBom(){
var processMethodDatas = [[${@dict.getType('processMethod')}]]; var bomNo1 = $("#bomNo1").val();
$("#form-bom-add").validate({ var bomNo2 = $("#bomNo2").val();
focusCleanup: true $("#bom-ton").html("");
}); $("#bom1-dif").html("");
$("#bom2-dif").html("");
$("#bomNo1","#bomNo2").select2({
allowClear: true,
placeholder: "请选择bom",
ajax:{
type: "post",
url:ctx + "erp/bom/list",
dataType:"json",
delay:250,
cache:true,
processResults: function (res, params) {
var resultList = res.rows;
console.log("传输的数值");
console.log(resultList);
var options = [];
for(var i= 0, len=resultList.length;i<len;i++){
var option = resultList[i];
option.id = resultList[i]["bomNo"];
option.text = resultList[i]["bomNo"];
options.push(option);
}
return {
results: options,
pagination: {
// more:res["data"]["more"]
}
};
},
escapeMarkup: function (markup) { return markup; },
// minimumInputLength: 1
}
});
function seacher(){
$.ajax({ $.ajax({
url: ctx + "equalsBom", url: prefix + "/equalsBom",
method:'post', async:true, //true所有请求均为异步请求
contentType:"application/x-www-form-urlencoded",
dataType: "json", //请求返回数据的格式
type:"post", //请求方式
data:{ data:{
bomNo1:$("bomNo1").val(), "bomNo1": bomNo1,
bomNo2:$("bomNo2").val() "bomNo2": bomNo2
}, },
success:function (res){ success:function (data) {
console.log(res); console.log(data);
for (let i = 0; i < res.data.bomList; i++) { console.log(data.tongList);
$('#bom-ton').join(''); var action = [];
var action1 = [];
var action2 = [];
for (let i = 0; i < data.tongList.length; i++) {
action.push("<input readonly class=\"form-control\" text=\"" + data.tongList[i] + "\" value=\" " + data.tongList[i] +" \" \/> ");
} }
for (let i = 0; i < data.bom1List.length; i++){
action1.push("<input readonly class=\"form-control\" text=\"" + data.bom1List[i] + "\" value=\" " + data.bom1List[i] +" \" \/> ");
}
for(let i = 0; i < data.bom2List.length; i++){
action2.push("<input readonly class=\"form-control\" text=\"" + data.bom2List[i] + "\" value=\" " + data.bom2List[i] +" \" \/> ");
}
$("#bom1-t").val(bomNo1);
$("#bom2-t").val(bomNo2);
console.log("action: " + action );
console.log("action1: " + action1 );
console.log("action2: " + action2 );
$("#bom-ton").html(action.join());
$("#bom1-dif").html(action1.join());
$("#bom2-dif").html(action2.join());
}, },
error:function (res){ error:function (res){
console.log(res);
}, },
}) })
} }
function refresh(){ function refreshBom(){
$("bomNo1").val(''); $("#bomNo1").val("");
$("bomNo2").val(''); $("#bomNo2").val("");
$("#bom-ton").html("");
$("#bom1-dif").html("");
$("#bom2-dif").html("");
} }
</script> </script>
</body> </body>

8
ruoyi-admin/src/main/resources/templates/index.html

@ -57,12 +57,12 @@
<div class="sidebar-collapse navbar-content scroll-div"> <div class="sidebar-collapse navbar-content scroll-div">
<ul class="nav pcoded-inner-navbar" id="side-menu" style="position: relative;"> <ul class="nav pcoded-inner-navbar" id="side-menu" style="position: relative;">
<li class="nav-item active"> <!-- <li class="nav-item active">
<a class="menuItem" th:href="@{/system/main}" onclick=" return false; "> <a class="menuItem" th:href="@{/system/main}" onclick=" return false; ">
<span class="pcoded-micon"> <span class="pcoded-micon">
<i class="fa fa-home icon-box feather"></i> <i class="fa fa-home icon-box feather"></i>
</span> </span>
<span class="pcoded-mtext nav-label">Dashboard1</span> <span class="pcoded-mtext nav-label">公共数据报表</span>
</a> </a>
</li> </li>
<li class="nav-item"> <li class="nav-item">
@ -70,9 +70,9 @@
<span class="pcoded-micon"> <span class="pcoded-micon">
<i class="fa fa-home icon-box feather"></i> <i class="fa fa-home icon-box feather"></i>
</span> </span>
<span class="pcoded-mtext nav-label">Dashboard2</span> <span class="pcoded-mtext nav-label">品质数据列表</span>
</a> </a>
</li> </li> -->
<li class="nav-item pcoded-hasmenu" th:each="menu : ${menus}"> <li class="nav-item pcoded-hasmenu" th:each="menu : ${menus}">
<a th:class="@{${!#strings.isEmpty(menu.url) && menu.url != '#'} ? ${menu.target}}" <a th:class="@{${!#strings.isEmpty(menu.url) && menu.url != '#'} ? ${menu.target}}"
th:href="@{${#strings.isEmpty(menu.url)} ? |#| : ${menu.url}}" onclick=" return false; " th:href="@{${#strings.isEmpty(menu.url)} ? |#| : ${menu.url}}" onclick=" return false; "

394
ruoyi-admin/src/main/resources/templates/main.html

@ -23,7 +23,13 @@
<link rel="stylesheet" href="../static/css/jquery.scrollbar.min.css" th:href="@{/css/jquery.scrollbar.min.css}"> <link rel="stylesheet" href="../static/css/jquery.scrollbar.min.css" th:href="@{/css/jquery.scrollbar.min.css}">
<link rel="stylesheet" href="../static/css/feather.css" th:href="@{/css/feather.css}"> <link rel="stylesheet" href="../static/css/feather.css" th:href="@{/css/feather.css}">
<link href="https://cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet"> <link href="https://cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
<th:block th:include="include :: header('仪表盘')"/>
<th:block th:include="include :: datetimepicker-css"/>
<script type="text/javascript" th:src="@{/js/axios.min.js}"></script>
<style> <style>
.body{
background-color: #F9F9F9;
}
i{ i{
padding-top: 6px; padding-top: 6px;
padding-left: 9px; padding-left: 9px;
@ -37,23 +43,25 @@
color: #000000; color: #000000;
} }
.container{ .container{
background-color: #F0F0F0; width: 100%;
margin: 2% 3%; background-color: #F9F9F9;
} }
.style1{ .style1{
margin: 10px; margin: 10px;
height: 200px; height: 300px;
border-radius:5%; border-radius:5%;
background-color: #FFFFFF; background-color: #FFFFFF;
} }
.style2 { .style2 {
display: inline-block; display: inline-block;
height: 30%;
border-radius: 50%; border-radius: 50%;
background-color: #F0F0F0; background-color: #F0F0F0;
} }
.style3{ .style3{
display: inline-block; display: inline-block;
width: 70px; width: 70px;
height: 30%;
font-size: 10px; font-size: 10px;
text-align: center; text-align: center;
vertical-align: middle; vertical-align: middle;
@ -74,55 +82,103 @@
color: #a0a7e6; color: #a0a7e6;
font-size: 20px; font-size: 20px;
} }
.inputss{
width: 100px;
height: 15px;
font-size: 10px;
}
th{
border: 0.5px solid silver;
}
.row{
margin: 1% 2%;
border: 0.5px solid #0a2730;
}
.table-scrollable .table-scrollable-borderless{
height: 40%;
}
p{
margin: 2%
}
</style> </style>
</head> </head>
<body class="gray-bg"> <body class="gray-bg body scroll-content">
<div class="container"> <div class="container">
<div class="container form-control-sm">
<div class="row"> <div class="row">
<div class="col-xs-6 col-sm-3 p-0" style="display: flex;">
<div class="style1">
<div class="row" style="padding-top: 60px">
<div class="col-xs-12 col-sm-6 p-0"> <div class="col-xs-12 col-sm-6 p-0">
<div style="padding-left: 40px"> <div style="border:1px solid darkgrey; text-align: center ">
<div class="style2"><i class="fa fa-file-text-o icon1"></i></div> <h2 style="font-size: 30px" id="oderNolist">10</h2>
<div class="style3" style="color: #3fb1e3;"> <!-- <div class="style2"><i class="fa fa-file-text-o icon1"></i></div>-->
生产订单数<br> <div style="color: #3fb1e3;">
10 <p style="font-size: 20px;">进行中 - 生产订单数</p><br>
</div> </div>
</div> </div>
</div> </div>
<div class="col-xs-12 col-sm-6 p-0"> <div class="col-xs-12 col-sm-6 p-0">
<div style="padding-left: 10px"> <div style="border:1px solid darkgrey; text-align: center ">
<div class="style2"><i class="fa fa-file-text-o icon2"></i></div> <h2 style="font-size: 30px" id="oderlist">15</h2>
<div class="style3" style="color: #6be6c1;"> <!-- <div class="style2"><i class="fa fa-file-text-o icon2"></i></div>-->
生产工单数<br> <div >
15 <p style="color: #6be6c1;font-size: 20px">已完成 - 生产订单数</p><br>
</div>
</div> </div>
</div> </div>
<div class="col-xs-12 col-sm-6 p-0">
<div style="padding-left: 40px">
<div class="style2"><i class="fa fa-file-text-o icon3"></i></div>
<div class="style3" style="color: #626c91;">
开工工单数<br>
15
</div>
</div> </div>
</div> </div>
<div class="col-xs-12 col-sm-6 p-0"> <div class="row">
<div style="padding-left: 10px"> <div class="col-xs-6 col-sm-6 p-0">
<div class="style2"><i class="fa fa-file-text-o icon4"></i></div> <div class="table-scrollable table-scrollable-borderless">
<div class="style3" style="color: #a0a7e6;"> <div class="style1">
完工工单数<br> <p>成品料号分析统计</p>
15 <p>
<input class="inputss" type="date" value="2023-11-11"/> - <input class="inputss" type="date" value="2023-11-12"/>
<button class="inputss" >top10</button><button class="inputss">top50</button>
</p>
<table class="table table-hover table-light" style="width: 100%;font-size: 16px">
<thead>
<tr class="uppercase">
<th style="width: 33%">料号</th>
<th style="width: 33%;">物料名称</th>
<th style="width: 25%">占比</th>
</tr>
</thead>
<tr>
<td><a href="javascript:;" class="primary-link">3325454555</a></td>
<td>yk测试-原材料</td>
<td><span class="bold theme-font">80%</span></td>
</tr>
<tr>
<td><a href="javascript:;" class="primary-link">1000000000</a></td>
<td>yk测试-原材料2</td>
<td><span class="bold theme-font">67%</span></td>
</tr>
<tr>
<td><a href="javascript:;" class="primary-link">3325454564</a></td>
<td>yk测试-原材料3</td>
<td><span class="bold theme-font">98%</span></td>
</tr>
<tr>
<td><a href="javascript:;" class="primary-link">3325454554</a></td>
<td>yk测试-原材料4</td>
<td><span class="bold theme-font">58%</span></td>
</tr>
</table>
</div> </div>
</div> </div>
</div> </div>
<div class="col-xs-6 col-sm-6 p-0">
<div class="style1">
<p>周产量</p>
<p>
<input class="inputss" type="date" value="2023-11-11"/> - <input class="inputss" type="date" value="2023-11-12"/>
</p>
<div id="classificationPassRate" style="width:100%;text-align: center;height: 80%"></div>
</div> </div>
</div> </div>
</div> </div>
<div class="col-xs-6 col-sm-3 p-0" style="display: flex;"> <!-- <div class="col-xs-6 col-sm-3 p-0" style="display: flex;">
<div class="style1"> <div class="style1">
<div class="row" style="padding-top: 60px"> <div class="row" style="padding-top: 60px">
<div class="col-xs-12 col-sm-6 p-0"> <div class="col-xs-12 col-sm-6 p-0">
@ -163,12 +219,84 @@
</div> </div>
</div> </div>
</div> </div>
</div> -->
</div> </div>
<div class="col-xs-6 col-sm-3 p-0"> <div class="col-sm-12 p-0" style="height: 40%">
<div class="row">
<p>生产订单周期</p>
<p>
<input class="inputss" type="date" value="2023-11-11"/> - <input class="inputss" type="date" value="2023-11-12"/>
<label class="col-form-label">生产订单号:</label> <input class="form-control-sm" type="text" />
</p>
<table class=" table table-hover table-light" id="qualitlist">
<thead>
<tr class="uppercase">
<th style="width: 12%;">生产订单</th>
<th style="width: 12%;">料号</th>
<th style="width: 12%">物业名称</th>
<th style="width: 12%">业务部</th>
<th style="width: 12%;">工程部</th>
<th style="width: 12%">采购部</th>
<th style="width: 12%">品质部(来料)</th>
<th style="width: 12%">生产部</th>
<th style="width: 12%">品质(生产)</th>
</tr>
</thead>
<tr>
<td rowspan="2" style="border-right:0.5px solid #f0f0f0 ;">PO122242342</td>
<td><a href="javascript:;" class="primary-link">3325454555</a></td>
<td>yk测试-原材料</td>
<td><span class="bold theme-font">/</span></td>
<td><span class="bold theme-font">/</span></td>
<td><span class="bold theme-font">/</span></td>
<td><span class="bold theme-font">/</span></td>
<td><span class="bold theme-font">/</span></td>
<td><span class="bold theme-font">/</span></td>
</tr>
<tr>
<td><a href="javascript:;" class="primary-link">1000000000</a></td>
<td>yk测试-原材料2</td>
<td><span class="bold theme-font">/</span></td>
<td><span class="bold theme-font">/</span></td>
<td><span class="bold theme-font">/</span></td>
<td><span class="bold theme-font">/</span></td>
<td><span class="bold theme-font">/</span></td>
<td><span class="bold theme-font">/</span></td>
</tr>
<tr>
<td rowspan="2" style="border-right:0.5px solid #f0f0f0 ;">PO122242342</td>
<td><a href="javascript:;" class="primary-link">3325454235</a></td>
<td>yk测试-原材料3</td>
<td><span class="bold theme-font">/</span></td>
<td><span class="bold theme-font">/</span></td>
<td><span class="bold theme-font">/</span></td>
<td><span class="bold theme-font">/</span></td>
<td><span class="bold theme-font">/</span></td>
<td><span class="bold theme-font">/</span></td>
</tr>
<tr>
<td><a href="javascript:;" class="primary-link">3325454554</a></td>
<td>yk测试-原材料4</td>
<td><span class="bold theme-font">/</span></td>
<td><span class="bold theme-font">/</span></td>
<td><span class="bold theme-font">/</span></td>
<td><span class="bold theme-font">/</span></td>
<td><span class="bold theme-font">/</span></td>
<td><span class="bold theme-font">/</span></td>
</tr>
</table>
</div>
</div>
<div class="col-sm-12 p-0" style="height:100px">
</div>
<!-- <div class="col-xs-12 col-sm-6 p-0">
<div class="style1"> <div class="style1">
<p>产品产量分布统计</p> <div id="dailyGrowthTrend" style="width: 100%;height: 200px;">Daily growth trend</div>
<div id="productYield" style="width: 100%;height: 200px;">productYield</div> </div>
</div> </div>
<div class="table-scrollable table-scrollable-borderless">
<table id="qualitylist" class="table table-hover table-light"></table>
</div> </div>
<div class="col-xs-6 col-sm-3 p-0"> <div class="col-xs-6 col-sm-3 p-0">
<div class="style1"> <div class="style1">
@ -203,14 +331,7 @@
<p>产品合格率统计</p> <p>产品合格率统计</p>
<div id="passRate" style="width: 100%;height: 200px;">Pass rate</div> <div id="passRate" style="width: 100%;height: 200px;">Pass rate</div>
</div> </div>
</div> </div> -->
<div class="col-xs-6 col-sm-3 p-0">
<div class="style1">
<p>产品分类合格率统计</p>
<div id="classificationPassRate" style="width: 100%;height: 200px;">Classification pass rate</div>
</div>
</div>
</div>
</div> </div>
<script th:src="@{/js/jquery.min.js}"></script> <script th:src="@{/js/jquery.min.js}"></script>
@ -218,6 +339,43 @@
<script th:src="@{/ajax/libs/layer/layer.min.js}"></script> <script th:src="@{/ajax/libs/layer/layer.min.js}"></script>
<script type="text/javascript" src="https://fastly.jsdelivr.net/npm/echarts@5.4.2/dist/echarts.min.js"></script> <script type="text/javascript" src="https://fastly.jsdelivr.net/npm/echarts@5.4.2/dist/echarts.min.js"></script>
<script th:src="@{/js/walden.js}"></script> <script th:src="@{/js/walden.js}"></script>
<script th:src="@{/js/pcoded.min.js}"></script>
<th:block th:include="include :: footer"/>
<th:block th:include="include :: datetimepicker-js"/>
<!-- 进行中订单数量-->
<script type="text/javascript">
var oderprefix = ctx + "system/makeorder";
$.ajax({
url: oderprefix + "/ByNoFinsh",
method:'get',
contentType:'application/json;charset=utf-8',
dataType:'json',
success:function (data){
console.log(data);
$("#oderNolist").val(data);
},
error:function (){
$.modal.error("服务器出错,请联系管理员");
}
})
</script>
<!-- 已完成订单数量-->
<script type="text/javascript">
var oderprefix = ctx + "system/makeorder";
$.ajax({
url: oderprefix + "/ByFinsh",
type:'get',
contentType:'application/json;charset=utf-8',
dataType:'json',
success:function (data){
console.log(data);
$("#oderNolist").val(data);
},
error:function (){
$.modal.error("服务器出错,请联系管理员");
}
});
</script>
<!-- 产品产量分布统计--> <!-- 产品产量分布统计-->
<script type="text/javascript"> <script type="text/javascript">
var productYieldDom = document.getElementById('productYield'); var productYieldDom = document.getElementById('productYield');
@ -713,30 +871,100 @@
useDirtyRect: false useDirtyRect: false
}); });
var classificationPassRateOption = { var classificationPassRateOption = {
title: {
textStyle: {
align: 'center',
color: '#fff',
fontSize: 20,
},
top: '5%',
left: '5%',
},
tooltip: {
trigger: "axis",
axisPointer: {
type: "shadow",
label: {
show: true
}
}
},
xAxis: { xAxis: {
name:'时间',
type: 'category', type: 'category',
data: ['分类1 ','分类2','分类3','分类4'], data: ['11.13~11-19','11.20~11-26','11-27~12-03','12.04~12-10'],
axisTick: {show:false}, axisTick: {show:true},
axisLabel: { axisLabel: {
fontSize: 8 //设置坐标轴文本标签的字体大小 show: true,
fontSize: 10, //设置坐标轴文本标签的字体大小
},
axisLine: {
symbol: ['none','arrow'],
symbolSize: [4, 4],
show: true, //隐藏X轴轴线
lineStyle: {
color: 'blue'
} }
}, },
},
yAxis: { yAxis: {
name:'数量',
top: "1%",
axisTick: {
show: true //隐藏X轴刻度
},
type: 'value', type: 'value',
axisLabel: { axisLabel: {
fontSize: 8 //设置坐标轴文本标签的字体大小 show: false,
},
axisLine: {
symbol: ['none','arrow'],
symbolSize: [4, 4],
show: true, //隐藏X轴轴线
lineStyle: {
color: 'blue'
}
},
},
legend: {
data: ["折线图", "柱状图"],
right:"1%",
top: "1%",
textStyle: {
color: "black"
} }
}, },
grid: { grid: {
top:'10%', bottom:'15%',
left:'15%',
right: '10%',
bottom:'20%',
}, },
series: [ series: [
{ {
data: [120, 200, 150, 80], name: "折线图",
type: 'bar', type: "line",
barWidth: '20%',
"itemStyle": {
"normal": {
"color": "blue",
"barBorderRadius": 20,
"label": {
"show": true,
"position": "top",
formatter: function(p) {
return p.value > 0 ? (p.value) : '';
}
}
}
},
data: [441, 453, 486, 534]
},
{
name: "柱状图",
type: "bar",
barWidth: '20%',
areaStyle:{
color: "black"
},
data: [441, 453, 486, 534]
} }
] ]
}; };
@ -745,5 +973,65 @@
} }
window.addEventListener('resize', classificationPassRate.resize); window.addEventListener('resize', classificationPassRate.resize);
</script> </script>
<!-- <script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('system:makeorder:edit')}]];
var removeFlag = [[${@permission.hasPermi('system:makeorder:remove')}]];
var cancelFlag = [[${@permission.hasPermi('system:makeorder:cancel')}]];
var restoreFlag = [[${@permission.hasPermi('system:makeorder:restore')}]];
var makeStatusDatas = [[${@dict.getType('sys_erp_makeStatus')}]];
var eceiptStatusDatas = [[${@dict.getType('eceiptStatus')}]];
var qualityStatusDatas = [[${@dict.getType('qualityStatus')}]];
var useStatusDatas = [[${@dict.getType('useStatus')}]];
var prefix = ctx + "system/makeorder";
$(function() {
var options = {
url: prefix + "/list",
exportUrl: prefix + "/export",
modalName: "生产订单周期",
columns: [{
checkbox: true
},
{
field: 'id',
title: '生产订单id',
visible: false
},
{
field: 'makeNo',
title: '生产单号'
},
{
field: 'materialNo',
title: '料号'
},
{
field: '',
title: '业务部'
},
{
field: '',
title: '工程部'
},
{
field: '',
title: '采购部'
},
{
field: '',
title: '品质部(来料)'
},
{
field: '',
title: '生产部'
},
{
field: '',
title: '品质部(生产)'
}
]
};
$.table("#qualitlist").init(options);
});
</script> -->
</body> </body>
</html> </html>

29
ruoyi-common/src/main/java/com/ruoyi/common/core/redis/RedisCache.java

@ -1,8 +1,5 @@
package com.ruoyi.common.core.redis; package com.ruoyi.common.core.redis;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.concurrent.TimeUnit;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.BoundSetOperations; import org.springframework.data.redis.core.BoundSetOperations;
import org.springframework.data.redis.core.HashOperations; import org.springframework.data.redis.core.HashOperations;
@ -10,6 +7,10 @@ import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.core.ValueOperations; import org.springframework.data.redis.core.ValueOperations;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.concurrent.TimeUnit;
/** /**
* spring redis 工具类 * spring redis 工具类
* *
@ -313,4 +314,26 @@ public class RedisCache
String serialNum = String.format("%03d",no); String serialNum = String.format("%03d",no);
return codeKey+serialNum; return codeKey+serialNum;
} }
public String generateNo(String prefix) {
String codeKey = prefix;
Long no = 0L;
//获取每日流水
if (hasKey(codeKey)) {
no = Long.valueOf(get(codeKey).toString());
}
//新增每日流水
else{
//每日流水设置3天过期,避免生成过多
if(!set(codeKey,0,60*60*24*3)){
throw new RuntimeException("Redis新增单据编号流水失败");
}
}
no = incr(codeKey, 1);
if (no == null) {
throw new RuntimeException("Redis单据编号流水递增失败");
}
String serialNum = String.format("%03d",no);
return codeKey+serialNum;
}
} }

Loading…
Cancel
Save