Browse Source

230612三种出库单

erp、
qianyu 1 year ago
parent
commit
d37ac3ee4f
  1. 84
      log.path_IS_UNDEFINED/sys-user.log
  2. 3
      ruoyi-admin/src/main/java/com/ruoyi/manufacture/controller/MaterialRequisitionDetailController.java
  3. 26
      ruoyi-admin/src/main/java/com/ruoyi/manufacture/controller/MaterialRequisitionInfoController.java
  4. 7
      ruoyi-admin/src/main/java/com/ruoyi/outsource/domain/OutsourceOrderMaterial.java
  5. 210
      ruoyi-admin/src/main/java/com/ruoyi/storehouse/controller/OutboundInfoController.java
  6. 6
      ruoyi-admin/src/main/java/com/ruoyi/storehouse/domain/OutboundDetail.java
  7. 19
      ruoyi-admin/src/main/java/com/ruoyi/storehouse/domain/exportDto/OutboundDetailDto.java
  8. 2
      ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysCustomer.java
  9. 2
      ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysCustomerMapper.java
  10. 2
      ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysCustomerService.java
  11. 5
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysCustomerServiceImpl.java
  12. 6
      ruoyi-admin/src/main/resources/mapper/system/SysCustomerMapper.xml
  13. 7
      ruoyi-admin/src/main/resources/templates/manufacture/workOrderInfo/add.html
  14. 81
      ruoyi-admin/src/main/resources/templates/storehouse/outboundInfoCP/add.html
  15. 42
      ruoyi-admin/src/main/resources/templates/storehouse/outboundInfoCP/outboundInfoCP.html
  16. 42
      ruoyi-admin/src/main/resources/templates/storehouse/outboundInfoFL/outboundInfoFL.html
  17. 5
      ruoyi-admin/src/main/resources/templates/storehouse/outboundInfoYL/add.html
  18. 38
      ruoyi-admin/src/main/resources/templates/storehouse/outboundInfoYL/outboundInfoYL.html
  19. BIN
      ruoyi-admin/target/classes/com/ruoyi/manufacture/controller/MaterialRequisitionDetailController.class
  20. BIN
      ruoyi-admin/target/classes/com/ruoyi/manufacture/controller/MaterialRequisitionInfoController.class
  21. BIN
      ruoyi-admin/target/classes/com/ruoyi/system/domain/SysCustomer.class
  22. BIN
      ruoyi-admin/target/classes/com/ruoyi/system/mapper/SysCustomerMapper.class
  23. BIN
      ruoyi-admin/target/classes/com/ruoyi/system/service/ISysCustomerService.class
  24. BIN
      ruoyi-admin/target/classes/com/ruoyi/system/service/impl/SysCustomerServiceImpl.class
  25. 6
      ruoyi-admin/target/classes/mapper/system/SysCustomerMapper.xml
  26. 7
      ruoyi-admin/target/classes/templates/manufacture/workOrderInfo/add.html

84
log.path_IS_UNDEFINED/sys-user.log

@ -1,34 +1,50 @@
08:40:00.067 [schedule-pool-2] INFO sys-user - [run,109] - [127.0.0.1]内网IP[admin][Success][登录成功] 00:43:32.512 [SpringContextShutdownHook] INFO sys-user - [shutdownAsyncManager,62] - ====关闭后台任务任务线程池====
08:41:51.918 [SpringContextShutdownHook] INFO sys-user - [shutdownSpringSessionValidationScheduler,45] - ====关闭会话验证任务==== 00:43:32.513 [SpringContextShutdownHook] INFO sys-user - [shutdownEhCacheManager,75] - ====关闭缓存====
08:41:51.919 [SpringContextShutdownHook] INFO sys-user - [shutdownAsyncManager,62] - ====关闭后台任务任务线程池==== 04:56:31.545 [schedule-pool-2] INFO sys-user - [run,109] - [127.0.0.1]内网IP[admin][Success][登录成功]
08:41:51.919 [SpringContextShutdownHook] INFO sys-user - [shutdownEhCacheManager,75] - ====关闭缓存==== 04:58:56.614 [SpringContextShutdownHook] INFO sys-user - [shutdownSpringSessionValidationScheduler,45] - ====关闭会话验证任务====
08:42:55.146 [schedule-pool-2] INFO sys-user - [run,109] - [127.0.0.1]内网IP[admin][Success][登录成功] 04:58:56.615 [SpringContextShutdownHook] INFO sys-user - [shutdownAsyncManager,62] - ====关闭后台任务任务线程池====
08:44:58.974 [SpringContextShutdownHook] INFO sys-user - [shutdownSpringSessionValidationScheduler,45] - ====关闭会话验证任务==== 04:58:56.615 [SpringContextShutdownHook] INFO sys-user - [shutdownEhCacheManager,75] - ====关闭缓存====
08:44:58.978 [SpringContextShutdownHook] INFO sys-user - [shutdownAsyncManager,62] - ====关闭后台任务任务线程池==== 04:59:24.024 [schedule-pool-2] INFO sys-user - [run,109] - [127.0.0.1]内网IP[admin][Success][登录成功]
08:44:58.978 [SpringContextShutdownHook] INFO sys-user - [shutdownEhCacheManager,75] - ====关闭缓存==== 05:11:40.804 [SpringContextShutdownHook] INFO sys-user - [shutdownSpringSessionValidationScheduler,45] - ====关闭会话验证任务====
08:45:24.466 [schedule-pool-2] INFO sys-user - [run,109] - [127.0.0.1]内网IP[admin][Success][登录成功] 05:11:40.805 [SpringContextShutdownHook] INFO sys-user - [shutdownAsyncManager,62] - ====关闭后台任务任务线程池====
08:46:25.297 [SpringContextShutdownHook] INFO sys-user - [shutdownSpringSessionValidationScheduler,45] - ====关闭会话验证任务==== 05:11:40.805 [SpringContextShutdownHook] INFO sys-user - [shutdownEhCacheManager,75] - ====关闭缓存====
08:46:25.333 [SpringContextShutdownHook] INFO sys-user - [shutdownAsyncManager,62] - ====关闭后台任务任务线程池==== 05:12:12.247 [schedule-pool-2] INFO sys-user - [run,109] - [127.0.0.1]内网IP[admin][Success][登录成功]
08:46:25.334 [SpringContextShutdownHook] INFO sys-user - [shutdownEhCacheManager,75] - ====关闭缓存==== 05:13:23.024 [SpringContextShutdownHook] INFO sys-user - [shutdownSpringSessionValidationScheduler,45] - ====关闭会话验证任务====
08:46:53.063 [schedule-pool-2] INFO sys-user - [run,109] - [127.0.0.1]内网IP[admin][Success][登录成功] 05:13:23.025 [SpringContextShutdownHook] INFO sys-user - [shutdownAsyncManager,62] - ====关闭后台任务任务线程池====
08:48:33.714 [SpringContextShutdownHook] INFO sys-user - [shutdownSpringSessionValidationScheduler,45] - ====关闭会话验证任务==== 05:13:23.025 [SpringContextShutdownHook] INFO sys-user - [shutdownEhCacheManager,75] - ====关闭缓存====
08:48:33.716 [SpringContextShutdownHook] INFO sys-user - [shutdownAsyncManager,62] - ====关闭后台任务任务线程池==== 05:13:47.704 [schedule-pool-2] INFO sys-user - [run,109] - [127.0.0.1]内网IP[admin][Success][登录成功]
08:48:33.716 [SpringContextShutdownHook] INFO sys-user - [shutdownEhCacheManager,75] - ====关闭缓存==== 05:26:01.408 [SpringContextShutdownHook] INFO sys-user - [shutdownSpringSessionValidationScheduler,45] - ====关闭会话验证任务====
08:52:57.243 [schedule-pool-1] INFO sys-user - [run,109] - [127.0.0.1]内网IP[admin][Success][登录成功] 05:26:01.409 [SpringContextShutdownHook] INFO sys-user - [shutdownAsyncManager,62] - ====关闭后台任务任务线程池====
08:58:26.763 [Thread-40] INFO sys-user - [shutdownSpringSessionValidationScheduler,45] - ====关闭会话验证任务==== 05:26:01.409 [SpringContextShutdownHook] INFO sys-user - [shutdownEhCacheManager,75] - ====关闭缓存====
08:58:26.764 [Thread-40] INFO sys-user - [shutdownAsyncManager,62] - ====关闭后台任务任务线程池==== 05:26:37.932 [schedule-pool-2] INFO sys-user - [run,109] - [127.0.0.1]内网IP[admin][Success][登录成功]
08:58:26.764 [Thread-40] INFO sys-user - [shutdownEhCacheManager,75] - ====关闭缓存==== 05:30:47.634 [SpringContextShutdownHook] INFO sys-user - [shutdownSpringSessionValidationScheduler,45] - ====关闭会话验证任务====
08:58:41.201 [SpringContextShutdownHook] INFO sys-user - [shutdownAsyncManager,62] - ====关闭后台任务任务线程池==== 05:30:47.635 [SpringContextShutdownHook] INFO sys-user - [shutdownAsyncManager,62] - ====关闭后台任务任务线程池====
08:58:41.203 [SpringContextShutdownHook] INFO sys-user - [shutdownEhCacheManager,75] - ====关闭缓存==== 05:30:47.635 [SpringContextShutdownHook] INFO sys-user - [shutdownEhCacheManager,75] - ====关闭缓存====
09:02:31.274 [schedule-pool-2] INFO sys-user - [run,109] - [127.0.0.1]内网IP[admin][Success][登录成功] 05:31:27.816 [schedule-pool-2] INFO sys-user - [run,109] - [127.0.0.1]内网IP[admin][Success][登录成功]
09:31:51.587 [SpringContextShutdownHook] INFO sys-user - [shutdownSpringSessionValidationScheduler,45] - ====关闭会话验证任务==== 05:36:53.398 [SpringContextShutdownHook] INFO sys-user - [shutdownSpringSessionValidationScheduler,45] - ====关闭会话验证任务====
09:31:51.594 [SpringContextShutdownHook] INFO sys-user - [shutdownAsyncManager,62] - ====关闭后台任务任务线程池==== 05:36:53.399 [SpringContextShutdownHook] INFO sys-user - [shutdownAsyncManager,62] - ====关闭后台任务任务线程池====
09:31:51.595 [SpringContextShutdownHook] INFO sys-user - [shutdownEhCacheManager,75] - ====关闭缓存==== 05:36:53.399 [SpringContextShutdownHook] INFO sys-user - [shutdownEhCacheManager,75] - ====关闭缓存====
09:33:05.393 [Thread-44] INFO sys-user - [shutdownAsyncManager,62] - ====关闭后台任务任务线程池==== 05:37:26.635 [schedule-pool-2] INFO sys-user - [run,109] - [127.0.0.1]内网IP[admin][Success][登录成功]
09:33:44.536 [Thread-57] INFO sys-user - [shutdownAsyncManager,62] - ====关闭后台任务任务线程池==== 05:40:44.839 [SpringContextShutdownHook] INFO sys-user - [shutdownSpringSessionValidationScheduler,45] - ====关闭会话验证任务====
09:33:44.538 [Thread-57] INFO sys-user - [shutdownEhCacheManager,75] - ====关闭缓存==== 05:40:44.840 [SpringContextShutdownHook] INFO sys-user - [shutdownAsyncManager,62] - ====关闭后台任务任务线程池====
09:39:23.490 [schedule-pool-2] INFO sys-user - [run,109] - [127.0.0.1]内网IP[admin][Success][登录成功] 05:40:44.840 [SpringContextShutdownHook] INFO sys-user - [shutdownEhCacheManager,75] - ====关闭缓存====
17:10:08.054 [SpringContextShutdownHook] INFO sys-user - [shutdownSpringSessionValidationScheduler,45] - ====关闭会话验证任务==== 05:41:12.920 [schedule-pool-2] INFO sys-user - [run,109] - [127.0.0.1]内网IP[admin][Success][登录成功]
17:10:08.062 [SpringContextShutdownHook] INFO sys-user - [shutdownAsyncManager,62] - ====关闭后台任务任务线程池==== 05:51:11.441 [SpringContextShutdownHook] INFO sys-user - [shutdownSpringSessionValidationScheduler,45] - ====关闭会话验证任务====
17:10:08.063 [SpringContextShutdownHook] INFO sys-user - [shutdownEhCacheManager,75] - ====关闭缓存==== 05:51:11.442 [SpringContextShutdownHook] INFO sys-user - [shutdownAsyncManager,62] - ====关闭后台任务任务线程池====
17:33:02.129 [schedule-pool-2] INFO sys-user - [run,109] - [127.0.0.1]内网IP[admin][Success][登录成功] 05:51:11.442 [SpringContextShutdownHook] INFO sys-user - [shutdownEhCacheManager,75] - ====关闭缓存====
05:51:47.118 [schedule-pool-2] INFO sys-user - [run,109] - [127.0.0.1]内网IP[admin][Success][登录成功]
05:52:46.147 [SpringContextShutdownHook] INFO sys-user - [shutdownSpringSessionValidationScheduler,45] - ====关闭会话验证任务====
05:52:46.148 [SpringContextShutdownHook] INFO sys-user - [shutdownAsyncManager,62] - ====关闭后台任务任务线程池====
05:52:46.148 [SpringContextShutdownHook] INFO sys-user - [shutdownEhCacheManager,75] - ====关闭缓存====
05:53:48.400 [schedule-pool-2] INFO sys-user - [run,109] - [127.0.0.1]内网IP[admin][Success][登录成功]
06:02:43.632 [SpringContextShutdownHook] INFO sys-user - [shutdownSpringSessionValidationScheduler,45] - ====关闭会话验证任务====
06:02:43.634 [SpringContextShutdownHook] INFO sys-user - [shutdownAsyncManager,62] - ====关闭后台任务任务线程池====
06:02:43.634 [SpringContextShutdownHook] INFO sys-user - [shutdownEhCacheManager,75] - ====关闭缓存====
06:03:12.945 [schedule-pool-2] INFO sys-user - [run,109] - [127.0.0.1]内网IP[admin][Success][登录成功]
06:18:53.327 [SpringContextShutdownHook] INFO sys-user - [shutdownSpringSessionValidationScheduler,45] - ====关闭会话验证任务====
06:18:53.328 [SpringContextShutdownHook] INFO sys-user - [shutdownAsyncManager,62] - ====关闭后台任务任务线程池====
06:18:53.328 [SpringContextShutdownHook] INFO sys-user - [shutdownEhCacheManager,75] - ====关闭缓存====
06:19:21.279 [schedule-pool-2] INFO sys-user - [run,109] - [127.0.0.1]内网IP[admin][Success][登录成功]
06:35:17.463 [SpringContextShutdownHook] INFO sys-user - [shutdownSpringSessionValidationScheduler,45] - ====关闭会话验证任务====
06:35:17.464 [SpringContextShutdownHook] INFO sys-user - [shutdownAsyncManager,62] - ====关闭后台任务任务线程池====
06:35:17.464 [SpringContextShutdownHook] INFO sys-user - [shutdownEhCacheManager,75] - ====关闭缓存====

3
ruoyi-admin/src/main/java/com/ruoyi/manufacture/controller/MaterialRequisitionDetailController.java

@ -113,7 +113,8 @@ public class MaterialRequisitionDetailController extends BaseController
materialRequisitionDetailService.updateMaterialRequisitionDetail(materialRequisitionDetailList.get(i)); materialRequisitionDetailService.updateMaterialRequisitionDetail(materialRequisitionDetailList.get(i));
} }
} }
return new AjaxResult(SUCCESS, "test done"); } return new AjaxResult(SUCCESS, "test done");
}
/** /**
* 修改领料物料 * 修改领料物料

26
ruoyi-admin/src/main/java/com/ruoyi/manufacture/controller/MaterialRequisitionInfoController.java

@ -21,6 +21,9 @@ import com.ruoyi.manufacture.domain.exportDto.MaterialRequisitionDetailDto;
import com.ruoyi.manufacture.domain.exportDto.MaterialRequisitionInfoDto; import com.ruoyi.manufacture.domain.exportDto.MaterialRequisitionInfoDto;
import com.ruoyi.manufacture.service.IMaterialRequisitionDetailService; import com.ruoyi.manufacture.service.IMaterialRequisitionDetailService;
import com.ruoyi.manufacture.service.IMaterialRequisitionInfoService; import com.ruoyi.manufacture.service.IMaterialRequisitionInfoService;
import com.ruoyi.outsource.domain.OutsourceOrderMaterial;
import com.ruoyi.outsource.service.IOutsourceOrderMaterialService;
import com.ruoyi.outsource.service.impl.OutsourceOrderMaterialServiceImpl;
import com.ruoyi.system.service.ISysDictTypeService; import com.ruoyi.system.service.ISysDictTypeService;
import com.ruoyi.system.utils.ExcelFillCellMergePrevColUtils; import com.ruoyi.system.utils.ExcelFillCellMergePrevColUtils;
import org.apache.poi.ss.usermodel.BorderStyle; import org.apache.poi.ss.usermodel.BorderStyle;
@ -501,4 +504,27 @@ public class MaterialRequisitionInfoController extends BaseController
return new HorizontalCellStyleStrategy(headWriteCellStyle, contentWriteCellStyle); return new HorizontalCellStyleStrategy(headWriteCellStyle, contentWriteCellStyle);
} }
/**
* 查询委外领料单物料明细List
*/
@RequiresPermissions("manufacture:materialRequisitionInfo:listOutsource")
@PostMapping("/selectOutsourceDetail")
@ResponseBody
public void selectOutsourceDetail(MaterialRequisitionInfo materialRequisitionInfo){
//委外订单
IOutsourceOrderMaterialService outsourceOrderMaterialService = new OutsourceOrderMaterialServiceImpl();
List<OutsourceOrderMaterial> orderMaterialList = outsourceOrderMaterialService.selectOutsourceOrderMaterialList(new OutsourceOrderMaterial(materialRequisitionInfo.getSalesOrderNumber()));
//委外明细
List<MaterialRequisitionDetail> materialRequisitionDetailList = new ArrayList<>();
//bom阶
int bomRank = 1;
for (OutsourceOrderMaterial outsourceOrderMaterial : orderMaterialList) {
}
}
} }

7
ruoyi-admin/src/main/java/com/ruoyi/outsource/domain/OutsourceOrderMaterial.java

@ -68,6 +68,13 @@ public class OutsourceOrderMaterial extends BaseEntity
/** 备用二 */ /** 备用二 */
private String standbyTwo; private String standbyTwo;
public OutsourceOrderMaterial() {
}
public OutsourceOrderMaterial(String outsourceOrderNumber) {
this.outsourceOrderNumber = outsourceOrderNumber;
}
public void setOutsourceOrderMaterialId(Long outsourceOrderMaterialId) public void setOutsourceOrderMaterialId(Long outsourceOrderMaterialId)
{ {
this.outsourceOrderMaterialId = outsourceOrderMaterialId; this.outsourceOrderMaterialId = outsourceOrderMaterialId;

210
ruoyi-admin/src/main/java/com/ruoyi/storehouse/controller/OutboundInfoController.java

@ -1,12 +1,39 @@
package com.ruoyi.storehouse.controller; package com.ruoyi.storehouse.controller;
import java.io.IOException;
import java.net.URLEncoder;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.Map;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.util.MapUtils;
import com.alibaba.excel.write.metadata.WriteSheet;
import com.alibaba.excel.write.metadata.fill.FillConfig;
import com.alibaba.excel.write.metadata.style.WriteCellStyle;
import com.alibaba.excel.write.metadata.style.WriteFont;
import com.alibaba.excel.write.style.HorizontalCellStyleStrategy;
import com.ruoyi.ck.utils.Result; import com.ruoyi.ck.utils.Result;
import com.ruoyi.common.config.datasource.DynamicDataSourceContextHolder;
import com.ruoyi.storehouse.domain.OutboundDetail; import com.ruoyi.storehouse.domain.OutboundDetail;
import com.ruoyi.storehouse.domain.exportDto.OutboundDetailDto;
import com.ruoyi.storehouse.domain.exportDto.OutboundInfoDto;
import com.ruoyi.storehouse.service.IOutboundDetailService; import com.ruoyi.storehouse.service.IOutboundDetailService;
import com.ruoyi.system.domain.SysCustomer;
import com.ruoyi.system.service.ISysCustomerService;
import com.ruoyi.system.service.impl.SysCustomerServiceImpl;
import com.ruoyi.system.utils.ExcelFillCellMergePrevColUtils;
import org.apache.poi.ss.usermodel.BorderStyle;
import org.apache.poi.ss.usermodel.HorizontalAlignment;
import org.apache.poi.ss.usermodel.VerticalAlignment;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap; import org.springframework.ui.ModelMap;
@ -20,6 +47,8 @@ import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.core.page.TableDataInfo;
import javax.servlet.http.HttpServletResponse;
/** /**
* outboundInfoController * outboundInfoController
* *
@ -30,6 +59,8 @@ import com.ruoyi.common.core.page.TableDataInfo;
@RequestMapping("/storehouse/outboundInfo") @RequestMapping("/storehouse/outboundInfo")
public class OutboundInfoController extends BaseController public class OutboundInfoController extends BaseController
{ {
public static final Logger log = LoggerFactory.getLogger(DynamicDataSourceContextHolder.class);
private String prefix = "storehouse/outboundInfo"; private String prefix = "storehouse/outboundInfo";
private String prefixYL="storehouse/outboundInfoYL"; private String prefixYL="storehouse/outboundInfoYL";
private String prefixFL="storehouse/outboundInfoFL"; private String prefixFL="storehouse/outboundInfoFL";
@ -47,6 +78,9 @@ public class OutboundInfoController extends BaseController
@Autowired @Autowired
private IOutboundDetailService outboundDetailService; private IOutboundDetailService outboundDetailService;
@Autowired
ISysCustomerService sysCustomerService;
/** /**
* 画面迁移 * 画面迁移
* @return * @return
@ -135,6 +169,178 @@ public class OutboundInfoController extends BaseController
return util.exportExcel(list, "outboundInfo数据"); return util.exportExcel(list, "outboundInfo数据");
} }
/**
* 导出原料出库单
*/
@RequiresPermissions("storehouse:outboundInfo:export")
@Log(title = "outboundInfo", businessType = BusinessType.EXPORT)
@PostMapping("/exportYL/{outboundId}")
@ResponseBody
public void exportYL(@PathVariable("outboundId") Long outboundId , HttpServletResponse response) throws IOException {
outboundInfo=outboundInfoService.selectOutboundInfoById(outboundId);
OutboundInfoDto outboundInfoDto = new OutboundInfoDto();
BeanUtils.copyProperties(outboundInfo,outboundInfoDto);
outboundDetail.setOutboundNo(outboundInfo.getOutboundNo());
ExcelFillCellMergePrevColUtils mergePrevColUtils = new ExcelFillCellMergePrevColUtils();
List<OutboundDetail> outboundDetailList = outboundDetailService.selectOutboundDetailList(outboundDetail);
List<OutboundDetailDto> outboundDetailDtoList = new ArrayList<>();
try{
int number=0;
Iterator outboundDetailValues = outboundDetailList.iterator();
while (outboundDetailValues.hasNext()){
Object detailValues = outboundDetailValues.next();
OutboundDetailDto detailDto = new OutboundDetailDto();
BeanUtils.copyProperties(detailValues,detailDto);
detailDto.setNumber(++number);
outboundDetailDtoList.add(detailDto);
}
}catch (Exception e){
log.error(">>>>>>异常OutboundDetailDto<<<<<<", e);
}
response.setCharacterEncoding("utf-8");
String fileName = URLEncoder.encode("原料出库单", "UTF-8").replaceAll("\\+", "%20");
response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx");
String templateFileName = "C:\\exportTemplates\\exportOutboundInfoYL.xlsx";
try (ExcelWriter excelWriter = EasyExcel
.write(response.getOutputStream(), OutboundDetailDto.class)
.withTemplate(templateFileName)
.registerWriteHandler(mergePrevColUtils)
.build()) {
WriteSheet writeSheet = EasyExcel.writerSheet().build();
FillConfig fillConfig = FillConfig.builder().forceNewRow(Boolean.TRUE).build();
excelWriter.fill(outboundDetailDtoList, fillConfig, writeSheet);
Map<String, Object> map = MapUtils.newHashMap();
SimpleDateFormat format = new SimpleDateFormat("yyyy年MM月dd日");
map.put("workOrderNumber", outboundInfoDto.getWorkOrderNumber());
map.put("outboundDate", format.format(outboundInfoDto.getOutboundDate()));
excelWriter.fill(map,writeSheet);
}
}
/**
* 导出辅料出库单
*/
@RequiresPermissions("storehouse:outboundInfo:export")
@Log(title = "outboundInfo", businessType = BusinessType.EXPORT)
@PostMapping("/exportFL/{outboundId}")
@ResponseBody
public void exportFL(@PathVariable("outboundId") Long outboundId , HttpServletResponse response) throws IOException {
outboundInfo=outboundInfoService.selectOutboundInfoById(outboundId);
OutboundInfoDto outboundInfoDto = new OutboundInfoDto();
BeanUtils.copyProperties(outboundInfo,outboundInfoDto);
outboundDetail.setOutboundNo(outboundInfo.getOutboundNo());
ExcelFillCellMergePrevColUtils mergePrevColUtils = new ExcelFillCellMergePrevColUtils();
List<OutboundDetail> outboundDetailList = outboundDetailService.selectOutboundDetailList(outboundDetail);
List<OutboundDetailDto> outboundDetailDtoList = new ArrayList<>();
try{
int number=0;
Iterator outboundDetailValues = outboundDetailList.iterator();
while (outboundDetailValues.hasNext()){
Object detailValues = outboundDetailValues.next();
OutboundDetailDto detailDto = new OutboundDetailDto();
BeanUtils.copyProperties(detailValues,detailDto);
detailDto.setNumber(++number);
outboundDetailDtoList.add(detailDto);
}
}catch (Exception e){
log.error(">>>>>>异常OutboundDetailDto<<<<<<", e);
}
response.setCharacterEncoding("utf-8");
String fileName = URLEncoder.encode("辅料出库单", "UTF-8").replaceAll("\\+", "%20");
response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx");
String templateFileName = "C:\\exportTemplates\\exportOutboundInfoFL.xlsx";
try (ExcelWriter excelWriter = EasyExcel
.write(response.getOutputStream(), OutboundDetailDto.class)
.withTemplate(templateFileName)
.registerWriteHandler(mergePrevColUtils)
.build()) {
WriteSheet writeSheet = EasyExcel.writerSheet().build();
FillConfig fillConfig = FillConfig.builder().forceNewRow(Boolean.TRUE).build();
excelWriter.fill(outboundDetailDtoList, fillConfig, writeSheet);
Map<String, Object> map = MapUtils.newHashMap();
SimpleDateFormat format = new SimpleDateFormat("yyyy年MM月dd日");
map.put("workOrderNumber", outboundInfoDto.getWorkOrderNumber());
map.put("outboundDate", format.format(outboundInfoDto.getOutboundDate()));
excelWriter.fill(map,writeSheet);
}
}
/**
* 导出成品出库单
*/
@RequiresPermissions("storehouse:outboundInfo:export")
@Log(title = "outboundInfo", businessType = BusinessType.EXPORT)
@PostMapping("/exportCP/{outboundId}")
@ResponseBody
public void exportCP(@PathVariable("outboundId") Long outboundId , HttpServletResponse response) throws IOException {
outboundInfo=outboundInfoService.selectOutboundInfoById(outboundId);
OutboundInfoDto outboundInfoDto = new OutboundInfoDto();
BeanUtils.copyProperties(outboundInfo,outboundInfoDto);
outboundDetail.setOutboundNo(outboundInfo.getOutboundNo());
//客户信息
SysCustomer sysCustomer = sysCustomerService.selectSysCustomerByEnterpriseCode(outboundInfo.getEnterpriseCode());
ExcelFillCellMergePrevColUtils mergePrevColUtils = new ExcelFillCellMergePrevColUtils();
List<OutboundDetail> outboundDetailList = outboundDetailService.selectOutboundDetailList(outboundDetail);
List<OutboundDetailDto> outboundDetailDtoList = new ArrayList<>();
try{
int number=0;
Iterator outboundDetailValues = outboundDetailList.iterator();
while (outboundDetailValues.hasNext()){
Object detailValues = outboundDetailValues.next();
OutboundDetailDto detailDto = new OutboundDetailDto();
BeanUtils.copyProperties(detailValues,detailDto);
detailDto.setNumber(++number);
outboundDetailDtoList.add(detailDto);
}
}catch (Exception e){
log.error(">>>>>>异常OutboundDetailDto<<<<<<", e);
}
response.setCharacterEncoding("utf-8");
String fileName = URLEncoder.encode("成品出库单", "UTF-8").replaceAll("\\+", "%20");
response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx");
String templateFileName = "C:\\exportTemplates\\exportOutboundInfoCP.xlsx";
try (ExcelWriter excelWriter = EasyExcel
.write(response.getOutputStream(), OutboundDetailDto.class)
.withTemplate(templateFileName)
.registerWriteHandler(mergePrevColUtils)
.build()) {
WriteSheet writeSheet = EasyExcel.writerSheet().build();
FillConfig fillConfig = FillConfig.builder().forceNewRow(Boolean.TRUE).build();
excelWriter.fill(outboundDetailDtoList, fillConfig, writeSheet);
Map<String, Object> map = MapUtils.newHashMap();
SimpleDateFormat format = new SimpleDateFormat("yyyy年MM月dd日");
map.put("contactNumber", "TEL:"+sysCustomer.getContactNumber());
map.put("customerFax", "FAX:"+sysCustomer.getCustomerFax());
map.put("deliveryAddress", "地址:"+sysCustomer.getDeliveryAddress());
map.put("enterpriseName", sysCustomer.getEnterpriseName());
map.put("outboundDate", format.format(outboundInfoDto.getOutboundDate()));
excelWriter.fill(map,writeSheet);
}
}
// public static HorizontalCellStyleStrategy horizontalCellStyleStrategyBuilderCP() {
// WriteCellStyle headWriteCellStyle = new WriteCellStyle();
// //内容策略
// WriteCellStyle contentWriteCellStyle = new WriteCellStyle();
// //设置 水平居中
// contentWriteCellStyle.setHorizontalAlignment(HorizontalAlignment.RIGHT);
// //垂直居中
// contentWriteCellStyle.setVerticalAlignment(VerticalAlignment.CENTER);
// return new HorizontalCellStyleStrategy(headWriteCellStyle, contentWriteCellStyle);
// }
/** /**
* 新增outboundInfo * 新增outboundInfo
*/ */
@ -245,8 +451,6 @@ public class OutboundInfoController extends BaseController
return "操作成功"; return "操作成功";
} }
@RequiresPermissions("storehouse:outboundInfo:remove") @RequiresPermissions("storehouse:outboundInfo:remove")
@Log(title = "outboundInfo", businessType = BusinessType.DELETE) @Log(title = "outboundInfo", businessType = BusinessType.DELETE)
@PostMapping( "/removeOutbound") @PostMapping( "/removeOutbound")

6
ruoyi-admin/src/main/java/com/ruoyi/storehouse/domain/OutboundDetail.java

@ -70,7 +70,7 @@ public class OutboundDetail extends BaseEntity
/** 实发数量 */ /** 实发数量 */
@Excel(name = "实发数量") @Excel(name = "实发数量")
private String sendCount; private double sendCount;
/** 订单号 */ /** 订单号 */
@Excel(name = "订单号") @Excel(name = "订单号")
@ -221,12 +221,12 @@ public class OutboundDetail extends BaseEntity
{ {
return weight; return weight;
} }
public void setSendCount(String sendCount) public void setSendCount(double sendCount)
{ {
this.sendCount = sendCount; this.sendCount = sendCount;
} }
public String getSendCount() public double getSendCount()
{ {
return sendCount; return sendCount;
} }

19
ruoyi-admin/src/main/java/com/ruoyi/storehouse/domain/exportDto/OutboundDetailDto.java

@ -16,6 +16,8 @@ public class OutboundDetailDto extends BaseEntity
{ {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private Integer number;
/** */ /** */
private Long outboundDetailId; private Long outboundDetailId;
@ -69,7 +71,7 @@ public class OutboundDetailDto extends BaseEntity
/** 实发数量 */ /** 实发数量 */
@ExcelProperty("实发数量") @ExcelProperty("实发数量")
private String sendCount; private double sendCount;
/** 订单号 */ /** 订单号 */
@ExcelProperty("订单号") @ExcelProperty("订单号")
@ -103,6 +105,14 @@ public class OutboundDetailDto extends BaseEntity
@ExcelProperty("抵扣说明") @ExcelProperty("抵扣说明")
private String deductionReason; private String deductionReason;
public Integer getNumber() {
return number;
}
public void setNumber(Integer number) {
this.number = number;
}
public void setOutboundDetailId(Long outboundDetailId) public void setOutboundDetailId(Long outboundDetailId)
{ {
this.outboundDetailId = outboundDetailId; this.outboundDetailId = outboundDetailId;
@ -219,12 +229,12 @@ public class OutboundDetailDto extends BaseEntity
{ {
return weight; return weight;
} }
public void setSendCount(String sendCount) public void setSendCount(double sendCount)
{ {
this.sendCount = sendCount; this.sendCount = sendCount;
} }
public String getSendCount() public double getSendCount()
{ {
return sendCount; return sendCount;
} }
@ -304,7 +314,8 @@ public class OutboundDetailDto extends BaseEntity
@Override @Override
public String toString() { public String toString() {
return "OutboundDetailDto{" + return "OutboundDetailDto{" +
"outboundDetailId=" + outboundDetailId + "number=" + number +
", outboundDetailId=" + outboundDetailId +
", materialCode='" + materialCode + '\'' + ", materialCode='" + materialCode + '\'' +
", outboundNo='" + outboundNo + '\'' + ", outboundNo='" + outboundNo + '\'' +
", materialName='" + materialName + '\'' + ", materialName='" + materialName + '\'' +

2
ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysCustomer.java

@ -4,6 +4,7 @@ import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle; import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel; import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity; import com.ruoyi.common.core.domain.BaseEntity;
import org.springframework.stereotype.Repository;
/** /**
* 客户基本信息对象 sys_customer * 客户基本信息对象 sys_customer
@ -11,6 +12,7 @@ import com.ruoyi.common.core.domain.BaseEntity;
* @author ruoyi * @author ruoyi
* @date 2022-11-02 * @date 2022-11-02
*/ */
@Repository
public class SysCustomer extends BaseEntity public class SysCustomer extends BaseEntity
{ {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;

2
ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysCustomerMapper.java

@ -62,4 +62,6 @@ public interface SysCustomerMapper
public List selectSysCustomerBycode(); public List selectSysCustomerBycode();
public SysCustomer selectSysCustomerByEnterpriseCode(String enterpriseCode);
} }

2
ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysCustomerService.java

@ -61,4 +61,6 @@ public interface ISysCustomerService
public int deleteSysCustomerById(Long customerId); public int deleteSysCustomerById(Long customerId);
public List selectSysCustomerBycode(); public List selectSysCustomerBycode();
public SysCustomer selectSysCustomerByEnterpriseCode(String enterpriseCode);
} }

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

@ -97,4 +97,9 @@ public class SysCustomerServiceImpl implements ISysCustomerService
public List selectSysCustomerBycode() { public List selectSysCustomerBycode() {
return sysCustomerMapper.selectSysCustomerBycode(); return sysCustomerMapper.selectSysCustomerBycode();
} }
@Override
public SysCustomer selectSysCustomerByEnterpriseCode(String enterpriseCode) {
return sysCustomerMapper.selectSysCustomerByEnterpriseCode(enterpriseCode);
}
} }

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

@ -77,6 +77,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select enterprise_code,enterprise_name from sys_customer select enterprise_code,enterprise_name from sys_customer
</select> </select>
<select id="selectSysCustomerByEnterpriseCode" parameterType="String" resultMap="SysCustomerResult">
<include refid="selectSysCustomerVo"/>
where enterprise_code = #{enterpriseCode}
</select>
<insert id="insertSysCustomer" parameterType="SysCustomer" useGeneratedKeys="true" keyProperty="customerId"> <insert id="insertSysCustomer" parameterType="SysCustomer" useGeneratedKeys="true" keyProperty="customerId">
insert into sys_customer insert into sys_customer
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">

7
ruoyi-admin/src/main/resources/templates/manufacture/workOrderInfo/add.html

@ -919,6 +919,13 @@
$("#bomMaterialModal").modal("hide"); $("#bomMaterialModal").modal("hide");
} }
//半成品二阶bom
function bcpList(){
$.ajax({
url:ctx+
})
}
//添加BOM材料信息 //添加BOM材料信息
function addBomDetailToTable() { function addBomDetailToTable() {
var dataRaw = $("#rawMaterialBomTable").bootstrapTable("getSelections"); var dataRaw = $("#rawMaterialBomTable").bootstrapTable("getSelections");

81
ruoyi-admin/src/main/resources/templates/storehouse/outboundInfoCP/add.html

@ -43,43 +43,45 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">出货单号:</label> <label class="col-sm-3 control-label">出货单号:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="noticeOrderNumber" class="form-control" type="text"> <select name="noticeOrderNumber" class="form-control m-b" required>
<option value="">所有</option>
</select>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">送货地址:</label> <label class="col-sm-3 control-label">送货地址:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="outboundAddress" class="form-control" type="text"> <input name="outboundAddress" class="form-control" type="text" id="outboundAddress">
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">客户编号:</label> <label class="col-sm-3 control-label">客户编号:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="enterpriseCode" class="form-control" type="text"> <input name="enterpriseCode" class="form-control" type="text" id="enterpriseCode">
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">客户名称:</label> <label class="col-sm-3 control-label">客户名称:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="enterpriseName" class="form-control" type="text"> <input name="enterpriseName" class="form-control" type="text" id="enterpriseName">
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">联系人:</label> <label class="col-sm-3 control-label">联系人:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="outboundTel" class="form-control" type="text"> <input name="outboundTel" class="form-control" type="text" id="outboundTel">
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">仓库编号:</label> <label class="col-sm-3 control-label">仓库编号:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="stockNo" class="form-control" type="text"> <input name="stockNo" class="form-control" type="text" id="stockNo">
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">仓库名称:</label> <label class="col-sm-3 control-label">仓库名称:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="stockName" class="form-control" type="text"> <input name="stockName" class="form-control" type="text" id="stockName">
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
@ -120,6 +122,15 @@
</select> </select>
</div> </div>
</div> </div>
<div class="other-container">
<div class="other">
<br><hr>
<h4>材料信息</h4>
<div class="col-sm-12 select-table table-striped">
<table id="addDetailTable" style="white-space:nowrap"></table>
</div>
</div>
</div>
</form> </form>
</div> </div>
<th:block th:include="include :: footer" /> <th:block th:include="include :: footer" />
@ -129,8 +140,8 @@
<script th:inline="javascript"> <script th:inline="javascript">
var prefix = ctx + "storehouse/outboundInfo" var prefix = ctx + "storehouse/outboundInfo"
var prefixDetail = ctx + "storehouse/outboundDetail" var prefixDetail = ctx + "storehouse/outboundDetail"
var prefixWorkOrderInfo = ctx + "manufacture/workOrderInfo" var prefixDeliveryGoodsNotice = ctx + "manufacture/deliveryGoodsNotice"
var prefixWorkOrderDetail = ctx + "manufacture/workOrderDetail" var prefixDeliveryGoodsDetail = ctx + "manufacture/deliveryGoodsDetail"
var inventoryUnit = [[${@dict.getType('sys_unit_class')}]]; var inventoryUnit = [[${@dict.getType('sys_unit_class')}]];
$("#form-outboundInfo-add").validate({ $("#form-outboundInfo-add").validate({
@ -190,22 +201,27 @@
} }
}); });
//(单)出库明细列表 //(发货通知单)出库明细列表
$.ajax({ $.ajax({
url: prefixWorkOrderInfo + "/list", url: prefixDeliveryGoodsNotice + "/list",
type: "post", type: "post",
dateType: "json", dateType: "json",
success: function (res) { success: function (res) {
if (res.rows.length > 0) { if (res.rows.length > 0) {
var orderData = res.rows; var orderData = res.rows;
for(let i in orderData){ for(let i in orderData){
$("#form-outboundInfo-add select[name='workOrderNumber']").append("<option value='" + orderData[i].workOrderNumber + "'>" + orderData[i].workOrderNumber + "</option>"); $("#form-outboundInfo-add select[name='noticeOrderNumber']").append("<option value='" + orderData[i].noticeOrderNumber + "'>" + orderData[i].noticeOrderNumber + "</option>");
} }
$("#form-outboundInfo-add select[name='workOrderNumber']").change(function () { $("#form-outboundInfo-add select[name='noticeOrderNumber']").change(function () {
var workOrderNumber = $(this).val(); var noticeOrderNumber = $(this).val();
for (let i=0;i<orderData.length;i++) { for (let i=0;i<orderData.length;i++) {
if (orderData[i].workOrderNumber == workOrderNumber) { if (orderData[i].noticeOrderNumber == noticeOrderNumber) {
$("#form-outboundInfo-add input[name='finishProductCode]").val(orderData[i].finishProductCode); $("#outboundAddress").val(orderData[i].deliveryAddress);
$("#enterpriseCode").val(orderData[i].enterpriseCode);
$("#enterpriseName").val(orderData[i].enterpriseName);
$("#outboundTel").val(orderData[i].customerContact);
$("#stockNo").val(orderData[i].stockNumber);
$("#stockName").val(orderData[i].stockName);
showDetailMaterial(); showDetailMaterial();
} }
} }
@ -223,12 +239,12 @@
//显示表内订单信息 //显示表内订单信息
function showDetailMaterial() { function showDetailMaterial() {
$('#addDetailTable').bootstrapTable("removeAll") $('#addDetailTable').bootstrapTable("removeAll")
var workOrderNumber = $("select[name='workOrderNumber']").val(); var noticeOrderNumber = $("select[name='noticeOrderNumber']").val();
$.ajax({ $.ajax({
url: prefixWorkOrderDetail + '/list', url: prefixDeliveryGoodsDetail + '/list',
type: 'post', type: 'post',
data: { data: {
workOrderNumber: workOrderNumber noticeOrderNumber: noticeOrderNumber
}, },
success: function (res) { success: function (res) {
console.log(res) console.log(res)
@ -238,20 +254,19 @@
for (i = 0; i < res.rows.length; i++) { for (i = 0; i < res.rows.length; i++) {
$("#addDetailTable").bootstrapTable('insertRow', { $("#addDetailTable").bootstrapTable('insertRow', {
index: count + i, index: count + i,
row: { row: {outboundNo:outboundNo,
outboundNo: outboundNo, materialCode:data[i].finishProductCode,
materialCode: data[i].materialCode, materialName:data[i].finishProductName,
materialName: data[i].materialName, specificationModel:data[i].specificationModel,
specificationModel: data[i].specificationModel, typeMachine:data[i].typeMachine,
typeMachine:'', inventoryUnit:data[i].inventoryUnit,
inventoryUnit: data[i].inventoryUnit, planCount:data[i].productQuantity,
planCount:data[i].materialConsumption, sendCount:'',
actualCount:'', reason:data[i].salesExplain,
reason:'', salesOrderNumber:data[i].salesOrderNumber,
salesOrderNumber:'',
batchNumber:'', batchNumber:'',
orderNumber:'', orderNumber:data[i].line,
storageLocation:'', storageLocation:''
} }
}); });
} }
@ -278,9 +293,7 @@
// 传递参数查询参数 // 传递参数查询参数
pageSize: params.limit, pageSize: params.limit,
pageNum: params.offset / params.limit + 1, pageNum: params.offset / params.limit + 1,
// enterpriseCode: data[0].enterpriseCode
}; };
// console.log(data[0].enterpriseCode)
return curParams return curParams
}, },
columns: [ columns: [

42
ruoyi-admin/src/main/resources/templates/storehouse/outboundInfoCP/outboundInfoCP.html

@ -81,9 +81,9 @@
<a class="btn btn-danger multiple disabled" onclick="removeAll()" shiro:hasPermission="storehouse:outboundInfo:remove"> <a class="btn btn-danger multiple disabled" onclick="removeAll()" shiro:hasPermission="storehouse:outboundInfo:remove">
<i class="fa fa-remove"></i> 删除 <i class="fa fa-remove"></i> 删除
</a> </a>
<!-- <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="storehouse:outboundInfo:export">--> <a class="btn btn-warning" onclick="exportSelectedRaw()" shiro:hasPermission="storehouse:outboundInfo:export">
<!-- <i class="fa fa-download"></i> 导出--> <i class="fa fa-download"></i> 导出
<!-- </a>--> </a>
</div> </div>
<div class="col-sm-12 select-table table-striped"> <div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table" style="white-space: nowrap"></table> <table id="bootstrap-table" style="white-space: nowrap"></table>
@ -175,7 +175,7 @@
if (rows.length > 0) { if (rows.length > 0) {
$.modal.confirm("是否删除选中的"+ rows.length +"条出库单?", function () { $.modal.confirm("是否删除选中的"+ rows.length +"条出库单?", function () {
$.ajax({ $.ajax({
url: prefix + '/removeAll', url: prefix + '/removeOutbound',
type: 'post', type: 'post',
data: { data: {
ids : rows.join() ids : rows.join()
@ -194,6 +194,40 @@
$.modal.msgWarning("请选择一条数据") $.modal.msgWarning("请选择一条数据")
} }
} }
//导出
function exportSelectedRaw() {
var rows = $.common.isEmpty(table.options.uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns(table.options.uniqueId);
var data = $("#bootstrap-table").bootstrapTable("getSelections")
if (rows.length !== 1) {
$.modal.alert("请选择一条记录");
return;
} else {
$.modal.confirm("是否确认要导出本条出库单?", function (){
axios({
url: prefix + '/exportCP/'+data[0].outboundId,
method: 'POST',
responseType: 'blob'
}).then(response => {
// console.log(response)
const URL = window.URL.createObjectURL(response.data)
// 创建隐藏<a>标签进行下载
const tempLink = document.createElement('a')
tempLink.style.display = 'none'
tempLink.href = URL
let time = new Date().toLocaleString()
tempLink.setAttribute('download', time + "成品出库单.xlsx")
if (typeof tempLink.download === 'undefined') {
tempLink.setAttribute('target', '_blank')
}
document.body.appendChild(tempLink)
tempLink.click()
document.body.removeChild(tempLink)// 移除dom元素
window.URL.revokeObjectURL(URL)//释放内存
})
});
}
}
</script> </script>
</body> </body>
</html> </html>

42
ruoyi-admin/src/main/resources/templates/storehouse/outboundInfoFL/outboundInfoFL.html

@ -85,9 +85,9 @@
<a class="btn btn-danger multiple disabled" onclick="removeAll()" shiro:hasPermission="storehouse:outboundInfo:remove"> <a class="btn btn-danger multiple disabled" onclick="removeAll()" shiro:hasPermission="storehouse:outboundInfo:remove">
<i class="fa fa-remove"></i> 删除 <i class="fa fa-remove"></i> 删除
</a> </a>
<!-- <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="storehouse:outboundInfo:export">--> <a class="btn btn-warning" onclick="exportSelectedRaw()" shiro:hasPermission="storehouse:outboundInfo:export">
<!-- <i class="fa fa-download"></i> 导出--> <i class="fa fa-download"></i> 导出
<!-- </a>--> </a>
</div> </div>
<div class="col-sm-12 select-table table-striped"> <div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table" style="white-space: nowrap"></table> <table id="bootstrap-table" style="white-space: nowrap"></table>
@ -191,7 +191,7 @@
if (rows.length > 0) { if (rows.length > 0) {
$.modal.confirm("是否删除选中的"+ rows.length +"条出库单?", function () { $.modal.confirm("是否删除选中的"+ rows.length +"条出库单?", function () {
$.ajax({ $.ajax({
url: prefix + '/removeAll', url: prefix + '/removeOutbound',
type: 'post', type: 'post',
data: { data: {
ids : rows.join() ids : rows.join()
@ -210,6 +210,40 @@
$.modal.msgWarning("请选择一条数据") $.modal.msgWarning("请选择一条数据")
} }
} }
//导出
function exportSelectedRaw() {
var rows = $.common.isEmpty(table.options.uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns(table.options.uniqueId);
var data = $("#bootstrap-table").bootstrapTable("getSelections")
if (rows.length !== 1) {
$.modal.alert("请选择一条记录");
return;
} else {
$.modal.confirm("是否确认要导出本条出库单?", function (){
axios({
url: prefix + '/exportFL/'+data[0].outboundId,
method: 'POST',
responseType: 'blob'
}).then(response => {
// console.log(response)
const URL = window.URL.createObjectURL(response.data)
// 创建隐藏<a>标签进行下载
const tempLink = document.createElement('a')
tempLink.style.display = 'none'
tempLink.href = URL
let time = new Date().toLocaleString()
tempLink.setAttribute('download', time + "辅料出库单.xlsx")
if (typeof tempLink.download === 'undefined') {
tempLink.setAttribute('target', '_blank')
}
document.body.appendChild(tempLink)
tempLink.click()
document.body.removeChild(tempLink)// 移除dom元素
window.URL.revokeObjectURL(URL)//释放内存
})
});
}
}
</script> </script>
</body> </body>
</html> </html>

5
ruoyi-admin/src/main/resources/templates/storehouse/outboundInfoYL/add.html

@ -57,7 +57,7 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">成品代码:</label> <label class="col-sm-3 control-label">成品代码:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="finishProductCode" class="form-control" type="text"> <input name="finishProductCode" class="form-control" type="text" id = "finishProductCode">
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
@ -214,6 +214,7 @@
type: "post", type: "post",
dateType: "json", dateType: "json",
success: function (res) { success: function (res) {
console.log(res)
if (res.rows.length > 0) { if (res.rows.length > 0) {
var orderData = res.rows; var orderData = res.rows;
for(let i in orderData){ for(let i in orderData){
@ -223,7 +224,7 @@
var workOrderNumber = $(this).val(); var workOrderNumber = $(this).val();
for (let i=0;i<orderData.length;i++) { for (let i=0;i<orderData.length;i++) {
if (orderData[i].workOrderNumber == workOrderNumber) { if (orderData[i].workOrderNumber == workOrderNumber) {
$("#form-outboundInfo-add input[name='finishProductCode]").val(orderData[i].finishProductCode); $("#finishProductCode").val(orderData[i].finishProductCode);
showDetailMaterial(); showDetailMaterial();
} }
} }

38
ruoyi-admin/src/main/resources/templates/storehouse/outboundInfoYL/outboundInfoYL.html

@ -86,7 +86,7 @@
<a class="btn btn-danger multiple disabled" onclick="removeAll()" shiro:hasPermission="storehouse:outboundInfo:remove"> <a class="btn btn-danger multiple disabled" onclick="removeAll()" shiro:hasPermission="storehouse:outboundInfo:remove">
<i class="fa fa-remove"></i> 删除 <i class="fa fa-remove"></i> 删除
</a> </a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="storehouse:outboundInfo:export"> <a class="btn btn-warning" onclick="exportSelectedRaw()" shiro:hasPermission="storehouse:outboundInfo:export">
<i class="fa fa-download"></i> 导出 <i class="fa fa-download"></i> 导出
</a> </a>
</div> </div>
@ -192,7 +192,7 @@
if (rows.length > 0) { if (rows.length > 0) {
$.modal.confirm("是否删除选中的"+ rows.length +"条出库单?", function () { $.modal.confirm("是否删除选中的"+ rows.length +"条出库单?", function () {
$.ajax({ $.ajax({
url: prefix + '/removeAll', url: prefix + '/removeOutbound',
type: 'post', type: 'post',
data: { data: {
ids : rows.join() ids : rows.join()
@ -211,6 +211,40 @@
$.modal.msgWarning("请选择一条数据") $.modal.msgWarning("请选择一条数据")
} }
} }
//导出
function exportSelectedRaw() {
var rows = $.common.isEmpty(table.options.uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns(table.options.uniqueId);
var data = $("#bootstrap-table").bootstrapTable("getSelections")
if (rows.length !== 1) {
$.modal.alert("请选择一条记录");
return;
} else {
$.modal.confirm("是否确认要导出本条出库单?", function (){
axios({
url: prefix + '/exportYL/'+data[0].outboundId,
method: 'POST',
responseType: 'blob'
}).then(response => {
// console.log(response)
const URL = window.URL.createObjectURL(response.data)
// 创建隐藏<a>标签进行下载
const tempLink = document.createElement('a')
tempLink.style.display = 'none'
tempLink.href = URL
let time = new Date().toLocaleString()
tempLink.setAttribute('download', time + "原料出库单.xlsx")
if (typeof tempLink.download === 'undefined') {
tempLink.setAttribute('target', '_blank')
}
document.body.appendChild(tempLink)
tempLink.click()
document.body.removeChild(tempLink)// 移除dom元素
window.URL.revokeObjectURL(URL)//释放内存
})
});
}
}
</script> </script>
</body> </body>
</html> </html>

BIN
ruoyi-admin/target/classes/com/ruoyi/manufacture/controller/MaterialRequisitionDetailController.class

Binary file not shown.

BIN
ruoyi-admin/target/classes/com/ruoyi/manufacture/controller/MaterialRequisitionInfoController.class

Binary file not shown.

BIN
ruoyi-admin/target/classes/com/ruoyi/system/domain/SysCustomer.class

Binary file not shown.

BIN
ruoyi-admin/target/classes/com/ruoyi/system/mapper/SysCustomerMapper.class

Binary file not shown.

BIN
ruoyi-admin/target/classes/com/ruoyi/system/service/ISysCustomerService.class

Binary file not shown.

BIN
ruoyi-admin/target/classes/com/ruoyi/system/service/impl/SysCustomerServiceImpl.class

Binary file not shown.

6
ruoyi-admin/target/classes/mapper/system/SysCustomerMapper.xml

@ -77,6 +77,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select enterprise_code,enterprise_name from sys_customer select enterprise_code,enterprise_name from sys_customer
</select> </select>
<select id="selectSysCustomerByEnterpriseCode" parameterType="String" resultMap="SysCustomerResult">
<include refid="selectSysCustomerVo"/>
where enterprise_code = #{enterpriseCode}
</select>
<insert id="insertSysCustomer" parameterType="SysCustomer" useGeneratedKeys="true" keyProperty="customerId"> <insert id="insertSysCustomer" parameterType="SysCustomer" useGeneratedKeys="true" keyProperty="customerId">
insert into sys_customer insert into sys_customer
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">

7
ruoyi-admin/target/classes/templates/manufacture/workOrderInfo/add.html

@ -919,6 +919,13 @@
$("#bomMaterialModal").modal("hide"); $("#bomMaterialModal").modal("hide");
} }
//半成品二阶bom
function bcpList(){
$.ajax({
url:ctx+
})
}
//添加BOM材料信息 //添加BOM材料信息
function addBomDetailToTable() { function addBomDetailToTable() {
var dataRaw = $("#rawMaterialBomTable").bootstrapTable("getSelections"); var dataRaw = $("#rawMaterialBomTable").bootstrapTable("getSelections");

Loading…
Cancel
Save