Sfoglia il codice sorgente

成本分配初始化

wanfa99 2 anni fa
parent
commit
54262886a2
32 ha cambiato i file con 1801 aggiunte e 0 eliminazioni
  1. 366 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/controller/SyCostAllocationController.java
  2. 176 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/entity/SyCostAllocation.java
  3. 74 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/entity/SyCostAllocationAccident.java
  4. 90 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/entity/SyCostAllocationCostpay.java
  5. 102 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/entity/SyCostAllocationFabric.java
  6. 114 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/entity/SyCostAllocationIngredient.java
  7. 112 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/entity/SyCostAllocationShipdetail.java
  8. 18 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/mapper/SyCostAllocationAccidentMapper.java
  9. 18 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/mapper/SyCostAllocationCostpayMapper.java
  10. 18 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/mapper/SyCostAllocationFabricMapper.java
  11. 18 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/mapper/SyCostAllocationIngredientMapper.java
  12. 17 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/mapper/SyCostAllocationMapper.java
  13. 18 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/mapper/SyCostAllocationShipdetailMapper.java
  14. 18 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/mapper/xml/SyCostAllocationAccidentMapper.xml
  15. 18 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/mapper/xml/SyCostAllocationCostpayMapper.xml
  16. 18 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/mapper/xml/SyCostAllocationFabricMapper.xml
  17. 18 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/mapper/xml/SyCostAllocationIngredientMapper.xml
  18. 5 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/mapper/xml/SyCostAllocationMapper.xml
  19. 18 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/mapper/xml/SyCostAllocationShipdetailMapper.xml
  20. 16 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/service/ISyCostAllocationAccidentService.java
  21. 16 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/service/ISyCostAllocationCostpayService.java
  22. 16 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/service/ISyCostAllocationFabricService.java
  23. 16 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/service/ISyCostAllocationIngredientService.java
  24. 44 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/service/ISyCostAllocationService.java
  25. 16 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/service/ISyCostAllocationShipdetailService.java
  26. 27 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/service/impl/SyCostAllocationAccidentServiceImpl.java
  27. 27 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/service/impl/SyCostAllocationCostpayServiceImpl.java
  28. 27 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/service/impl/SyCostAllocationFabricServiceImpl.java
  29. 27 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/service/impl/SyCostAllocationIngredientServiceImpl.java
  30. 141 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/service/impl/SyCostAllocationServiceImpl.java
  31. 27 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/service/impl/SyCostAllocationShipdetailServiceImpl.java
  32. 165 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/vo/SyCostAllocationPage.java

+ 366 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/controller/SyCostAllocationController.java

@@ -0,0 +1,366 @@
+package org.jeecg.modules.cost.controller;
+
+import java.io.UnsupportedEncodingException;
+import java.io.IOException;
+import java.net.URLDecoder;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import org.jeecg.common.system.vo.LoginUser;
+import org.apache.shiro.SecurityUtils;
+import org.jeecgframework.poi.excel.ExcelImportUtil;
+import org.jeecgframework.poi.excel.def.NormalExcelConstants;
+import org.jeecgframework.poi.excel.entity.ExportParams;
+import org.jeecgframework.poi.excel.entity.ImportParams;
+import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
+
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.common.system.query.QueryGenerator;
+import org.jeecg.common.util.oConvertUtils;
+import org.jeecg.modules.cost.entity.SyCostAllocationAccident;
+import org.jeecg.modules.cost.entity.SyCostAllocationCostpay;
+import org.jeecg.modules.cost.entity.SyCostAllocationFabric;
+import org.jeecg.modules.cost.entity.SyCostAllocationIngredient;
+import org.jeecg.modules.cost.entity.SyCostAllocationShipdetail;
+import org.jeecg.modules.cost.entity.SyCostAllocation;
+import org.jeecg.modules.cost.vo.SyCostAllocationPage;
+import org.jeecg.modules.cost.service.ISyCostAllocationService;
+import org.jeecg.modules.cost.service.ISyCostAllocationAccidentService;
+import org.jeecg.modules.cost.service.ISyCostAllocationCostpayService;
+import org.jeecg.modules.cost.service.ISyCostAllocationFabricService;
+import org.jeecg.modules.cost.service.ISyCostAllocationIngredientService;
+import org.jeecg.modules.cost.service.ISyCostAllocationShipdetailService;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.servlet.ModelAndView;
+import org.springframework.web.multipart.MultipartFile;
+import org.springframework.web.multipart.MultipartHttpServletRequest;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import lombok.extern.slf4j.Slf4j;
+import com.alibaba.fastjson.JSON;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.jeecg.common.aspect.annotation.AutoLog;
+
+ /**
+ * @Description: 成本分配主表
+ * @Author: jeecg-boot
+ * @Date:   2022-06-21
+ * @Version: V1.0
+ */
+@Api(tags="成本分配主表")
+@RestController
+@RequestMapping("/cost/syCostAllocation")
+@Slf4j
+public class SyCostAllocationController {
+	@Autowired
+	private ISyCostAllocationService syCostAllocationService;
+	@Autowired
+	private ISyCostAllocationAccidentService syCostAllocationAccidentService;
+	@Autowired
+	private ISyCostAllocationCostpayService syCostAllocationCostpayService;
+	@Autowired
+	private ISyCostAllocationFabricService syCostAllocationFabricService;
+	@Autowired
+	private ISyCostAllocationIngredientService syCostAllocationIngredientService;
+	@Autowired
+	private ISyCostAllocationShipdetailService syCostAllocationShipdetailService;
+	
+	/**
+	 * 分页列表查询
+	 *
+	 * @param syCostAllocation
+	 * @param pageNo
+	 * @param pageSize
+	 * @param req
+	 * @return
+	 */
+	@AutoLog(value = "成本分配主表-分页列表查询")
+	@ApiOperation(value="成本分配主表-分页列表查询", notes="成本分配主表-分页列表查询")
+	@GetMapping(value = "/list")
+	public Result<?> queryPageList(SyCostAllocation syCostAllocation,
+								   @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
+								   @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
+								   HttpServletRequest req) {
+		QueryWrapper<SyCostAllocation> queryWrapper = QueryGenerator.initQueryWrapper(syCostAllocation, req.getParameterMap());
+		Page<SyCostAllocation> page = new Page<SyCostAllocation>(pageNo, pageSize);
+		IPage<SyCostAllocation> pageList = syCostAllocationService.page(page, queryWrapper);
+        List<SyCostAllocation> records = pageList.getRecords();
+        List<String> collect = records.stream().map(i -> i.getId()).collect(Collectors.toList());
+        //获取5子表数据并赋值
+        if(collect!=null && !collect.isEmpty()) {
+            //事故单
+            QueryWrapper<SyCostAllocationAccident> list1QueryWrapper = new QueryWrapper<>();
+            list1QueryWrapper.in("sy_cost_allocation_id", collect).eq("del_flag", 0);
+            List<SyCostAllocationAccident> list1 = syCostAllocationAccidentService.list(list1QueryWrapper);
+
+            //费用支出
+            QueryWrapper<SyCostAllocationCostpay> list2QueryWrapper = new QueryWrapper<>();
+            list2QueryWrapper.in("sy_cost_allocation_id", collect).eq("del_flag", 0);
+            List<SyCostAllocationCostpay> list2 = syCostAllocationCostpayService.list(list2QueryWrapper);
+
+            QueryWrapper<SyCostAllocationFabric> list3QueryWrapper = new QueryWrapper<>();
+            list3QueryWrapper.in("sy_cost_allocation_id", collect).eq("del_flag", 0);
+            List<SyCostAllocationFabric> list3 = syCostAllocationFabricService.list(list3QueryWrapper);
+
+            QueryWrapper<SyCostAllocationIngredient>  list4QueryWrapper = new QueryWrapper<>();
+            list4QueryWrapper.in("sy_cost_allocation_id", collect).eq("del_flag", 0);
+            List<SyCostAllocationIngredient> list4 = syCostAllocationIngredientService.list(list4QueryWrapper);
+
+            QueryWrapper<SyCostAllocationShipdetail> list5QueryWrapper = new QueryWrapper<>();
+            list5QueryWrapper.in("sy_cost_allocation_id", collect).eq("del_flag", 0);
+            List<SyCostAllocationShipdetail> list5 = syCostAllocationShipdetailService.list(list5QueryWrapper);
+            for (SyCostAllocation record : records) {
+                String id = record.getId();
+                List<SyCostAllocationAccident> collect1 = list1.stream().filter(i -> i.getSyCostAllocationId().equals(id)).collect(Collectors.toList());
+            }
+
+
+        }
+
+
+
+		return Result.OK(pageList);
+	}
+
+     /**
+      * 通过计划号-销售订单号查询
+      *
+      * @param plannum
+      * @return
+      */
+     @AutoLog(value = "成本分配主表-通过id查询")
+     @ApiOperation(value="成本分配主表-通过id查询", notes="成本分配主表-通过id查询")
+     @GetMapping(value = "/queryByPlanNum")
+     public Result<?> queryByPlanNum(@RequestParam(name="plannum",required=true) String plannum) {
+         SyCostAllocation syCostAllocation = syCostAllocationService.getById(plannum);
+         return Result.OK(syCostAllocation);
+     }
+
+	/**
+	 * 添加
+	 *
+	 * @param syCostAllocationPage
+	 * @return
+	 */
+	@AutoLog(value = "成本分配主表-添加")
+	@ApiOperation(value="成本分配主表-添加", notes="成本分配主表-添加")
+	@PostMapping(value = "/add")
+	public Result<?> add(@RequestBody SyCostAllocationPage syCostAllocationPage) {
+		SyCostAllocation syCostAllocation = new SyCostAllocation();
+		BeanUtils.copyProperties(syCostAllocationPage, syCostAllocation);
+		syCostAllocationService.saveMain(syCostAllocation, syCostAllocationPage.getSyCostAllocationAccidentList(),syCostAllocationPage.getSyCostAllocationCostpayList(),syCostAllocationPage.getSyCostAllocationFabricList(),syCostAllocationPage.getSyCostAllocationIngredientList(),syCostAllocationPage.getSyCostAllocationShipdetailList());
+		return Result.OK("添加成功!");
+	}
+	
+	/**
+	 * 编辑
+	 *
+	 * @param syCostAllocationPage
+	 * @return
+	 */
+	@AutoLog(value = "成本分配主表-编辑")
+	@ApiOperation(value="成本分配主表-编辑", notes="成本分配主表-编辑")
+	@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
+	public Result<?> edit(@RequestBody SyCostAllocationPage syCostAllocationPage) {
+		SyCostAllocation syCostAllocation = new SyCostAllocation();
+		BeanUtils.copyProperties(syCostAllocationPage, syCostAllocation);
+		syCostAllocationService.updateMain(syCostAllocation, syCostAllocationPage.getSyCostAllocationAccidentList(),syCostAllocationPage.getSyCostAllocationCostpayList(),syCostAllocationPage.getSyCostAllocationFabricList(),syCostAllocationPage.getSyCostAllocationIngredientList(),syCostAllocationPage.getSyCostAllocationShipdetailList());
+		return Result.OK("编辑成功!");
+	}
+	
+	/**
+	 * 通过id删除
+	 *
+	 * @param id
+	 * @return
+	 */
+	@AutoLog(value = "成本分配主表-通过id删除")
+	@ApiOperation(value="成本分配主表-通过id删除", notes="成本分配主表-通过id删除")
+	@DeleteMapping(value = "/delete")
+	public Result<?> delete(@RequestParam(name="id",required=true) String id) {
+	    syCostAllocationService.delMain(id);
+		return Result.OK("删除成功!");
+	}
+	
+	/**
+	 * 批量删除
+	 *
+	 * @param ids
+	 * @return
+	 */
+	@AutoLog(value = "成本分配主表-批量删除")
+	@ApiOperation(value="成本分配主表-批量删除", notes="成本分配主表-批量删除")
+	@DeleteMapping(value = "/deleteBatch")
+	public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
+		this.syCostAllocationService.delBatchMain(Arrays.asList(ids.split(",")));
+		return Result.OK("批量删除成功!");
+	}
+	
+	/**
+	 * 通过id查询
+     *
+	 * @param id
+	 * @return
+	 */
+	@AutoLog(value = "成本分配主表-通过id查询")
+	@ApiOperation(value="成本分配主表-通过id查询", notes="成本分配主表-通过id查询")
+	@GetMapping(value = "/queryById")
+	public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
+		SyCostAllocation syCostAllocation = syCostAllocationService.getById(id);
+		return Result.OK(syCostAllocation);
+	}
+
+	/**
+	 * 通过id查询
+     *
+	 * @param id
+	 * @return
+	 */
+	@AutoLog(value = "成本分配子表_事故单-通过主表ID查询")
+	@ApiOperation(value="成本分配子表_事故单-通过主表ID查询", notes="成本分配主表-通过主表ID查询")
+	@GetMapping(value = "/querySyCostAllocationAccidentByMainId")
+	public Result<?> querySyCostAllocationAccidentListByMainId(@RequestParam(name="id",required=true) String id) {
+		List<SyCostAllocationAccident> syCostAllocationAccidentList = syCostAllocationAccidentService.selectByMainId(id);
+		return Result.OK(syCostAllocationAccidentList);
+	}
+	/**
+	 * 通过id查询
+     *
+	 * @param id
+	 * @return
+	 */
+	@AutoLog(value = "成本分配子表_费用支出-通过主表ID查询")
+	@ApiOperation(value="成本分配子表_费用支出-通过主表ID查询", notes="成本分配主表-通过主表ID查询")
+	@GetMapping(value = "/querySyCostAllocationCostpayByMainId")
+	public Result<?> querySyCostAllocationCostpayListByMainId(@RequestParam(name="id",required=true) String id) {
+		List<SyCostAllocationCostpay> syCostAllocationCostpayList = syCostAllocationCostpayService.selectByMainId(id);
+		return Result.OK(syCostAllocationCostpayList);
+	}
+	/**
+	 * 通过id查询
+     *
+	 * @param id
+	 * @return
+	 */
+	@AutoLog(value = "成本分配子表_面料-通过主表ID查询")
+	@ApiOperation(value="成本分配子表_面料-通过主表ID查询", notes="成本分配主表-通过主表ID查询")
+	@GetMapping(value = "/querySyCostAllocationFabricByMainId")
+	public Result<?> querySyCostAllocationFabricListByMainId(@RequestParam(name="id",required=true) String id) {
+		List<SyCostAllocationFabric> syCostAllocationFabricList = syCostAllocationFabricService.selectByMainId(id);
+		return Result.OK(syCostAllocationFabricList);
+	}
+	/**
+	 * 通过id查询
+     *
+	 * @param id
+	 * @return
+	 */
+	@AutoLog(value = "成本分配子表_辅料-通过主表ID查询")
+	@ApiOperation(value="成本分配子表_辅料-通过主表ID查询", notes="成本分配主表-通过主表ID查询")
+	@GetMapping(value = "/querySyCostAllocationIngredientByMainId")
+	public Result<?> querySyCostAllocationIngredientListByMainId(@RequestParam(name="id",required=true) String id) {
+		List<SyCostAllocationIngredient> syCostAllocationIngredientList = syCostAllocationIngredientService.selectByMainId(id);
+		return Result.OK(syCostAllocationIngredientList);
+	}
+	/**
+	 * 通过id查询
+     *
+	 * @param id
+	 * @return
+	 */
+	@AutoLog(value = "成本分配子表_发运明细-通过主表ID查询")
+	@ApiOperation(value="成本分配子表_发运明细-通过主表ID查询", notes="成本分配主表-通过主表ID查询")
+	@GetMapping(value = "/querySyCostAllocationShipdetailByMainId")
+	public Result<?> querySyCostAllocationShipdetailListByMainId(@RequestParam(name="id",required=true) String id) {
+		List<SyCostAllocationShipdetail> syCostAllocationShipdetailList = syCostAllocationShipdetailService.selectByMainId(id);
+		return Result.OK(syCostAllocationShipdetailList);
+	}
+
+  /**
+   * 导出excel
+   *
+   * @param request
+   * @param syCostAllocation
+   */
+  @RequestMapping(value = "/exportXls")
+  public ModelAndView exportXls(HttpServletRequest request, SyCostAllocation syCostAllocation) {
+      // Step.1 组装查询条件
+      QueryWrapper<SyCostAllocation> queryWrapper = QueryGenerator.initQueryWrapper(syCostAllocation, request.getParameterMap());
+      LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
+
+      //Step.2 获取导出数据
+      List<SyCostAllocationPage> pageList = new ArrayList<SyCostAllocationPage>();
+      List<SyCostAllocation> syCostAllocationList = syCostAllocationService.list(queryWrapper);
+      for (SyCostAllocation temp : syCostAllocationList) {
+          SyCostAllocationPage vo = new SyCostAllocationPage();
+          BeanUtils.copyProperties(temp, vo);
+          List<SyCostAllocationAccident> syCostAllocationAccidentList = syCostAllocationAccidentService.selectByMainId(temp.getId());
+          vo.setSyCostAllocationAccidentList(syCostAllocationAccidentList);
+          List<SyCostAllocationCostpay> syCostAllocationCostpayList = syCostAllocationCostpayService.selectByMainId(temp.getId());
+          vo.setSyCostAllocationCostpayList(syCostAllocationCostpayList);
+          List<SyCostAllocationFabric> syCostAllocationFabricList = syCostAllocationFabricService.selectByMainId(temp.getId());
+          vo.setSyCostAllocationFabricList(syCostAllocationFabricList);
+          List<SyCostAllocationIngredient> syCostAllocationIngredientList = syCostAllocationIngredientService.selectByMainId(temp.getId());
+          vo.setSyCostAllocationIngredientList(syCostAllocationIngredientList);
+          List<SyCostAllocationShipdetail> syCostAllocationShipdetailList = syCostAllocationShipdetailService.selectByMainId(temp.getId());
+          vo.setSyCostAllocationShipdetailList(syCostAllocationShipdetailList);
+          pageList.add(vo);
+      }
+      //Step.3 调用AutoPoi导出Excel
+      ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
+      mv.addObject(NormalExcelConstants.FILE_NAME, "成本分配主表");
+      mv.addObject(NormalExcelConstants.CLASS, SyCostAllocationPage.class);
+      mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("成本分配主表数据", "导出人:"+sysUser.getRealname(), "成本分配主表"));
+      mv.addObject(NormalExcelConstants.DATA_LIST, pageList);
+      return mv;
+  }
+
+  /**
+   * 通过excel导入数据
+   *
+   * @param request
+   * @param response
+   * @return
+   */
+  @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
+  public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
+      MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
+      Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
+      for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
+          MultipartFile file = entity.getValue();// 获取上传文件对象
+          ImportParams params = new ImportParams();
+          params.setTitleRows(2);
+          params.setHeadRows(1);
+          params.setNeedSave(true);
+          try {
+              List<SyCostAllocationPage> list = ExcelImportUtil.importExcel(file.getInputStream(), SyCostAllocationPage.class, params);
+              for (SyCostAllocationPage page : list) {
+                  SyCostAllocation po = new SyCostAllocation();
+                  BeanUtils.copyProperties(page, po);
+                  syCostAllocationService.saveMain(po, page.getSyCostAllocationAccidentList(),page.getSyCostAllocationCostpayList(),page.getSyCostAllocationFabricList(),page.getSyCostAllocationIngredientList(),page.getSyCostAllocationShipdetailList());
+              }
+              return Result.OK("文件导入成功!数据行数:" + list.size());
+          } catch (Exception e) {
+              log.error(e.getMessage(),e);
+              return Result.error("文件导入失败:"+e.getMessage());
+          } finally {
+              try {
+                  file.getInputStream().close();
+              } catch (IOException e) {
+                  e.printStackTrace();
+              }
+          }
+      }
+      return Result.OK("文件导入失败!");
+  }
+
+}

+ 176 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/entity/SyCostAllocation.java

@@ -0,0 +1,176 @@
+package org.jeecg.modules.cost.entity;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.util.List;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.jeecgframework.poi.excel.annotation.ExcelCollection;
+import org.springframework.format.annotation.DateTimeFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * @Description: 成本分配主表
+ * @Author: jeecg-boot
+ * @Date:   2022-06-21
+ * @Version: V1.0
+ */
+@Data
+@TableName("sy_cost_allocation")
+@ApiModel(value="sy_cost_allocation对象", description="成本分配主表")
+public class SyCostAllocation implements Serializable {
+    private static final long serialVersionUID = 1L;
+    
+	/**id*/
+	@TableId(type = IdType.ASSIGN_ID)
+	@ApiModelProperty(value = "id")
+	private String id;
+	/**创建人*/
+	@ApiModelProperty(value = "创建人")
+	private String createBy;
+	/**创建日期*/
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+	@ApiModelProperty(value = "创建日期")
+	private Date createTime;
+	/**修改人*/
+	@ApiModelProperty(value = "修改人")
+	private String updateBy;
+	/**修改日期*/
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+	@ApiModelProperty(value = "修改日期")
+	private Date updateTime;
+	/**组织*/
+	@ApiModelProperty(value = "组织")
+	private String pkOrg;
+	/**删除状态*/
+	@ApiModelProperty(value = "删除状态")
+	private String delFlag;
+	/**计划单号*/
+	@ApiModelProperty(value = "计划单号")
+	private String planNum;
+	/**款号*/
+	@ApiModelProperty(value = "款号")
+	private String poStyleNum;
+	/**业务员*/
+	@ApiModelProperty(value = "业务员")
+	private String exportSales;
+	/**成衣合同号*/
+	@ApiModelProperty(value = "成衣合同号")
+	private String garmentContractno;
+	/**部门*/
+	@ApiModelProperty(value = "部门")
+	private String department;
+	/**客户简称*/
+	@ApiModelProperty(value = "客户简称")
+	private String customerShortame;
+	/**加工单位*/
+	@ApiModelProperty(value = "加工单位")
+	private String processUnit;
+	/**出运日期*/
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+	@ApiModelProperty(value = "出运日期")
+	private Date outdata;
+	/**计划数量*/
+	@ApiModelProperty(value = "计划数量")
+	private java.math.BigDecimal planQuantity;
+	/**美元外销总价*/
+	@ApiModelProperty(value = "美元外销总价")
+	private java.math.BigDecimal usdTotalexportprice;
+	/**人民币费用支出*/
+	@ApiModelProperty(value = "人民币费用支出")
+	private java.math.BigDecimal rmbExpense;
+	/**税率*/
+	@ApiModelProperty(value = "税率")
+	private java.math.BigDecimal taxrate;
+	/**成衣件数-实际出货数量*/
+	@ApiModelProperty(value = "成衣件数-实际出货数量")
+	private java.math.BigDecimal actualShipquantity;
+	/**人民币外销金额*/
+	@ApiModelProperty(value = "人民币外销金额")
+	private java.math.BigDecimal rmbExportamount;
+	/**美元费用支出*/
+	@ApiModelProperty(value = "美元费用支出")
+	private java.math.BigDecimal usdExpense;
+	/**人民币加工费*/
+	@ApiModelProperty(value = "人民币加工费")
+	private java.math.BigDecimal rmbProcesscost;
+	/**美元加工费*/
+	@ApiModelProperty(value = "美元加工费")
+	private java.math.BigDecimal usdProcesscost;
+	/**短出数:计划数量和实际出货数量的差额*/
+	@ApiModelProperty(value = "短出数:计划数量和实际出货数量的差额")
+	private java.math.BigDecimal shortseveral;
+	/**短出货值*/
+	@ApiModelProperty(value = "短出货值")
+	private java.math.BigDecimal shortvalue;
+	/**短出面料成本:单件成本*短出数量*/
+	@ApiModelProperty(value = "短出面料成本:单件成本*短出数量")
+	private java.math.BigDecimal fabricshortcost;
+	/**事故单美金金额*/
+	@ApiModelProperty(value = "事故单美金金额")
+	private java.math.BigDecimal accidentUsdamount;
+	/**面料含税成本*/
+	@ApiModelProperty(value = "面料含税成本")
+	private java.math.BigDecimal fabriccostIncludestax;
+	/**辅料含税成本*/
+	@ApiModelProperty(value = "辅料含税成本")
+	private java.math.BigDecimal excipiencostIncludestax;
+	/**销售订单本币总额*/
+	@ApiModelProperty(value = "销售订单本币总额")
+	private java.math.BigDecimal salesordersLocaltotal;
+	/**事故单人民币金额*/
+	@ApiModelProperty(value = "事故单人民币金额")
+	private java.math.BigDecimal accidentcnyAmount;
+	/**面料不含税成本*/
+	@ApiModelProperty(value = "面料不含税成本")
+	private java.math.BigDecimal fabriccostNotincludestax;
+	/**辅料不含税成本*/
+	@ApiModelProperty(value = "辅料不含税成本")
+	private java.math.BigDecimal excipiencostNotincludestax;
+	/**销售订单原币总额*/
+	@ApiModelProperty(value = "销售订单原币总额")
+	private java.math.BigDecimal salesrrdersOriginaltotal;
+	/**制单人*/
+	@ApiModelProperty(value = "制单人")
+	private String preparedBy;
+	/**单据状态:0未保存,1已保存,2已审批*/
+	@ApiModelProperty(value = "单据状态:0未保存,1已保存,2已审批")
+	private Integer billstatus;
+	/**备注*/
+	@ApiModelProperty(value = "备注")
+	private Object remarks;
+
+    @TableField(exist = false)
+    @ExcelCollection(name="成本分配子表_事故单")
+    @ApiModelProperty(value = "成本分配子表_事故单")
+    private List<SyCostAllocationAccident> syCostAllocationAccidentList;
+
+    @TableField(exist = false)
+    @ExcelCollection(name="成本分配子表_费用支出")
+    @ApiModelProperty(value = "成本分配子表_费用支出")
+    private List<SyCostAllocationCostpay> syCostAllocationCostpayList;
+
+    @TableField(exist = false)
+    @ExcelCollection(name="成本分配子表_面料")
+    @ApiModelProperty(value = "成本分配子表_面料")
+    private List<SyCostAllocationFabric> syCostAllocationFabricList;
+
+    @TableField(exist = false)
+    @ExcelCollection(name="成本分配子表_辅料")
+    @ApiModelProperty(value = "成本分配子表_辅料")
+    private List<SyCostAllocationIngredient> syCostAllocationIngredientList;
+
+    @TableField(exist = false)
+    @ExcelCollection(name="成本分配子表_发运明细")
+    @ApiModelProperty(value = "成本分配子表_发运明细")
+    private List<SyCostAllocationShipdetail> syCostAllocationShipdetailList;
+}

+ 74 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/entity/SyCostAllocationAccident.java

@@ -0,0 +1,74 @@
+package org.jeecg.modules.cost.entity;
+
+import java.io.Serializable;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.springframework.format.annotation.DateTimeFormat;
+import org.jeecgframework.poi.excel.annotation.Excel;
+import java.util.Date;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * @Description: 成本分配子表_事故单
+ * @Author: jeecg-boot
+ * @Date:   2022-06-21
+ * @Version: V1.0
+ */
+@Data
+@TableName("sy_cost_allocation_accident")
+@ApiModel(value="sy_cost_allocation对象", description="成本分配主表")
+public class SyCostAllocationAccident implements Serializable {
+    private static final long serialVersionUID = 1L;
+    
+	/**id*/
+	@TableId(type = IdType.ASSIGN_ID)
+	@ApiModelProperty(value = "id")
+	private String id;
+	/**主表id*/
+	@ApiModelProperty(value = "主表id")
+	private String syCostAllocationId;
+	/**创建人*/
+    @Excel(name = "创建人", width = 15)
+	@ApiModelProperty(value = "创建人")
+	private String createBy;
+	/**创建日期*/
+	@Excel(name = "创建日期", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+	@ApiModelProperty(value = "创建日期")
+	private Date createTime;
+	/**修改人*/
+    @Excel(name = "修改人", width = 15)
+	@ApiModelProperty(value = "修改人")
+	private String updateBy;
+	/**修改日期*/
+	@Excel(name = "修改日期", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+	@ApiModelProperty(value = "修改日期")
+	private Date updateTime;
+	/**组织*/
+    @Excel(name = "组织", width = 15)
+	@ApiModelProperty(value = "组织")
+	private String pkOrg;
+	/**删除状态*/
+    @Excel(name = "删除状态", width = 15)
+	@ApiModelProperty(value = "删除状态")
+	private String delFlag;
+	/**单号*/
+    @Excel(name = "单号", width = 15)
+	@ApiModelProperty(value = "单号")
+	private String accidentNum;
+	/**事故承担方*/
+    @Excel(name = "事故承担方", width = 15)
+	@ApiModelProperty(value = "事故承担方")
+	private String accidentUndertaker;
+	/**金额*/
+    @Excel(name = "金额", width = 15)
+	@ApiModelProperty(value = "金额")
+	private java.math.BigDecimal amount;
+}

+ 90 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/entity/SyCostAllocationCostpay.java

@@ -0,0 +1,90 @@
+package org.jeecg.modules.cost.entity;
+
+import java.io.Serializable;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.springframework.format.annotation.DateTimeFormat;
+import org.jeecgframework.poi.excel.annotation.Excel;
+import java.util.Date;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * @Description: 成本分配子表_费用支出
+ * @Author: jeecg-boot
+ * @Date:   2022-06-21
+ * @Version: V1.0
+ */
+@Data
+@TableName("sy_cost_allocation_costpay")
+@ApiModel(value="sy_cost_allocation对象", description="成本分配主表")
+public class SyCostAllocationCostpay implements Serializable {
+    private static final long serialVersionUID = 1L;
+    
+	/**id*/
+	@TableId(type = IdType.ASSIGN_ID)
+	@ApiModelProperty(value = "id")
+	private String id;
+	/**主表id*/
+	@ApiModelProperty(value = "主表id")
+	private String syCostAllocationId;
+	/**创建人*/
+    @Excel(name = "创建人", width = 15)
+	@ApiModelProperty(value = "创建人")
+	private String createBy;
+	/**创建日期*/
+	@Excel(name = "创建日期", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+	@ApiModelProperty(value = "创建日期")
+	private Date createTime;
+	/**修改人*/
+    @Excel(name = "修改人", width = 15)
+	@ApiModelProperty(value = "修改人")
+	private String updateBy;
+	/**修改日期*/
+	@Excel(name = "修改日期", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+	@ApiModelProperty(value = "修改日期")
+	private Date updateTime;
+	/**组织*/
+    @Excel(name = "组织", width = 15)
+	@ApiModelProperty(value = "组织")
+	private String pkOrg;
+	/**删除状态*/
+    @Excel(name = "删除状态", width = 15)
+	@ApiModelProperty(value = "删除状态")
+	private String delFlag;
+	/**单号*/
+    @Excel(name = "单号", width = 15)
+	@ApiModelProperty(value = "单号")
+	private String setNo;
+	/**支出单号*/
+    @Excel(name = "支出单号", width = 15)
+	@ApiModelProperty(value = "支出单号")
+	private String disbursementSlipNo;
+	/**费用项目*/
+    @Excel(name = "费用项目", width = 15)
+	@ApiModelProperty(value = "费用项目")
+	private String expenseItem;
+	/**支出本币金额*/
+    @Excel(name = "支出本币金额", width = 15)
+	@ApiModelProperty(value = "支出本币金额")
+	private java.math.BigDecimal disbursedLocalmoney;
+	/**支出原币金额*/
+    @Excel(name = "支出原币金额", width = 15)
+	@ApiModelProperty(value = "支出原币金额")
+	private java.math.BigDecimal disbursedOriginalmoney;
+	/**发票号*/
+    @Excel(name = "发票号", width = 15)
+	@ApiModelProperty(value = "发票号")
+	private String invoicenum;
+	/**制单人*/
+    @Excel(name = "制单人", width = 15)
+	@ApiModelProperty(value = "制单人")
+	private String preparedBy;
+}

+ 102 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/entity/SyCostAllocationFabric.java

@@ -0,0 +1,102 @@
+package org.jeecg.modules.cost.entity;
+
+import java.io.Serializable;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.springframework.format.annotation.DateTimeFormat;
+import org.jeecgframework.poi.excel.annotation.Excel;
+import java.util.Date;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * @Description: 成本分配子表_面料
+ * @Author: jeecg-boot
+ * @Date:   2022-06-21
+ * @Version: V1.0
+ */
+@Data
+@TableName("sy_cost_allocation_fabric")
+@ApiModel(value="sy_cost_allocation对象", description="成本分配主表")
+public class SyCostAllocationFabric implements Serializable {
+    private static final long serialVersionUID = 1L;
+    
+	/**id*/
+	@TableId(type = IdType.ASSIGN_ID)
+	@ApiModelProperty(value = "id")
+	private String id;
+	/**主表id*/
+	@ApiModelProperty(value = "主表id")
+	private String syCostAllocationId;
+	/**创建人*/
+    @Excel(name = "创建人", width = 15)
+	@ApiModelProperty(value = "创建人")
+	private String createBy;
+	/**创建日期*/
+	@Excel(name = "创建日期", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+	@ApiModelProperty(value = "创建日期")
+	private Date createTime;
+	/**修改人*/
+    @Excel(name = "修改人", width = 15)
+	@ApiModelProperty(value = "修改人")
+	private String updateBy;
+	/**修改日期*/
+	@Excel(name = "修改日期", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+	@ApiModelProperty(value = "修改日期")
+	private Date updateTime;
+	/**组织*/
+    @Excel(name = "组织", width = 15)
+	@ApiModelProperty(value = "组织")
+	private String pkOrg;
+	/**删除状态*/
+    @Excel(name = "删除状态", width = 15)
+	@ApiModelProperty(value = "删除状态")
+	private String delFlag;
+	/**货物名称*/
+    @Excel(name = "货物名称", width = 15)
+	@ApiModelProperty(value = "货物名称")
+	private String goodsName;
+	/**转入数量*/
+    @Excel(name = "转入数量", width = 15)
+	@ApiModelProperty(value = "转入数量")
+	private java.math.BigDecimal fabrictransferQuantity;
+	/**转入成本*/
+    @Excel(name = "转入成本", width = 15)
+	@ApiModelProperty(value = "转入成本")
+	private java.math.BigDecimal transferCost;
+	/**单耗/件*/
+    @Excel(name = "单耗/件", width = 15)
+	@ApiModelProperty(value = "单耗/件")
+	private java.math.BigDecimal unitConsumption;
+	/**使用数量*/
+    @Excel(name = "使用数量", width = 15)
+	@ApiModelProperty(value = "使用数量")
+	private java.math.BigDecimal usageQuantity;
+	/**计划数量*/
+    @Excel(name = "计划数量", width = 15)
+	@ApiModelProperty(value = "计划数量")
+	private java.math.BigDecimal planQuantity;
+	/**购入数量*/
+    @Excel(name = "购入数量", width = 15)
+	@ApiModelProperty(value = "购入数量")
+	private java.math.BigDecimal purchaseQuantity;
+	/**余下数量*/
+    @Excel(name = "余下数量", width = 15)
+	@ApiModelProperty(value = "余下数量")
+	private java.math.BigDecimal fabricremainingQuantity;
+	/**损耗*/
+    @Excel(name = "损耗", width = 15)
+	@ApiModelProperty(value = "损耗")
+	private java.math.BigDecimal loss;
+	/**余下数量的成本*/
+    @Excel(name = "余下数量的成本", width = 15)
+	@ApiModelProperty(value = "余下数量的成本")
+	private java.math.BigDecimal remainingQuantitycost;
+}

+ 114 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/entity/SyCostAllocationIngredient.java

@@ -0,0 +1,114 @@
+package org.jeecg.modules.cost.entity;
+
+import java.io.Serializable;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.springframework.format.annotation.DateTimeFormat;
+import org.jeecgframework.poi.excel.annotation.Excel;
+import java.util.Date;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * @Description: 成本分配子表_辅料
+ * @Author: jeecg-boot
+ * @Date:   2022-06-21
+ * @Version: V1.0
+ */
+@Data
+@TableName("sy_cost_allocation_ingredient")
+@ApiModel(value="sy_cost_allocation对象", description="成本分配主表")
+public class SyCostAllocationIngredient implements Serializable {
+    private static final long serialVersionUID = 1L;
+    
+	/**id*/
+	@TableId(type = IdType.ASSIGN_ID)
+	@ApiModelProperty(value = "id")
+	private String id;
+	/**主表id*/
+	@ApiModelProperty(value = "主表id")
+	private String syCostAllocationId;
+	/**创建人*/
+    @Excel(name = "创建人", width = 15)
+	@ApiModelProperty(value = "创建人")
+	private String createBy;
+	/**创建日期*/
+	@Excel(name = "创建日期", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+	@ApiModelProperty(value = "创建日期")
+	private Date createTime;
+	/**修改人*/
+    @Excel(name = "修改人", width = 15)
+	@ApiModelProperty(value = "修改人")
+	private String updateBy;
+	/**修改日期*/
+	@Excel(name = "修改日期", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+	@ApiModelProperty(value = "修改日期")
+	private Date updateTime;
+	/**组织*/
+    @Excel(name = "组织", width = 15)
+	@ApiModelProperty(value = "组织")
+	private String pkOrg;
+	/**删除状态*/
+    @Excel(name = "删除状态", width = 15)
+	@ApiModelProperty(value = "删除状态")
+	private String delFlag;
+	/**货物名称*/
+    @Excel(name = "货物名称", width = 15)
+	@ApiModelProperty(value = "货物名称")
+	private String goodsName;
+	/**转入数量*/
+    @Excel(name = "转入数量", width = 15)
+	@ApiModelProperty(value = "转入数量")
+	private java.math.BigDecimal ingredientsTransferQuantity;
+	/**转入成本*/
+    @Excel(name = "转入成本", width = 15)
+	@ApiModelProperty(value = "转入成本")
+	private java.math.BigDecimal transferCost;
+	/**使用数量*/
+    @Excel(name = "使用数量", width = 15)
+	@ApiModelProperty(value = "使用数量")
+	private java.math.BigDecimal usageQuantity;
+	/**购入数量*/
+    @Excel(name = "购入数量", width = 15)
+	@ApiModelProperty(value = "购入数量")
+	private java.math.BigDecimal purchaseQuantity;
+	/**余下数量*/
+    @Excel(name = "余下数量", width = 15)
+	@ApiModelProperty(value = "余下数量")
+	private java.math.BigDecimal ingredientsRemainingQuantity;
+	/**损耗*/
+    @Excel(name = "损耗", width = 15)
+	@ApiModelProperty(value = "损耗")
+	private java.math.BigDecimal loss;
+	/**人民币金额*/
+    @Excel(name = "人民币金额", width = 15)
+	@ApiModelProperty(value = "人民币金额")
+	private java.math.BigDecimal rmbAmount;
+	/**美元金额*/
+    @Excel(name = "美元金额", width = 15)
+	@ApiModelProperty(value = "美元金额")
+	private java.math.BigDecimal usdAmount;
+	/**不含税金额*/
+    @Excel(name = "不含税金额", width = 15)
+	@ApiModelProperty(value = "不含税金额")
+	private java.math.BigDecimal priceExcludingtax;
+	/**转出率*/
+    @Excel(name = "转出率", width = 15)
+	@ApiModelProperty(value = "转出率")
+	private java.math.BigDecimal transferOutrate;
+	/**进项税转出*/
+    @Excel(name = "进项税转出", width = 15)
+	@ApiModelProperty(value = "进项税转出")
+	private java.math.BigDecimal inputtaxTransferout;
+	/**用量*/
+    @Excel(name = "用量", width = 15)
+	@ApiModelProperty(value = "用量")
+	private java.math.BigDecimal dosage;
+}

+ 112 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/entity/SyCostAllocationShipdetail.java

@@ -0,0 +1,112 @@
+package org.jeecg.modules.cost.entity;
+
+import java.io.Serializable;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.springframework.format.annotation.DateTimeFormat;
+import org.jeecgframework.poi.excel.annotation.Excel;
+import java.util.Date;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * @Description: 成本分配子表_发运明细
+ * @Author: jeecg-boot
+ * @Date:   2022-06-21
+ * @Version: V1.0
+ */
+@Data
+@TableName("sy_cost_allocation_shipdetail")
+@ApiModel(value="sy_cost_allocation对象", description="成本分配主表")
+public class SyCostAllocationShipdetail implements Serializable {
+    private static final long serialVersionUID = 1L;
+    
+	/**id*/
+	@TableId(type = IdType.ASSIGN_ID)
+	@ApiModelProperty(value = "id")
+	private String id;
+	/**主表id*/
+	@ApiModelProperty(value = "主表id")
+	private String syCostAllocationId;
+	/**创建人*/
+    @Excel(name = "创建人", width = 15)
+	@ApiModelProperty(value = "创建人")
+	private String createBy;
+	/**创建日期*/
+	@Excel(name = "创建日期", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+	@ApiModelProperty(value = "创建日期")
+	private Date createTime;
+	/**修改人*/
+    @Excel(name = "修改人", width = 15)
+	@ApiModelProperty(value = "修改人")
+	private String updateBy;
+	/**修改日期*/
+	@Excel(name = "修改日期", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+	@ApiModelProperty(value = "修改日期")
+	private Date updateTime;
+	/**组织*/
+    @Excel(name = "组织", width = 15)
+	@ApiModelProperty(value = "组织")
+	private String pkOrg;
+	/**删除状态*/
+    @Excel(name = "删除状态", width = 15)
+	@ApiModelProperty(value = "删除状态")
+	private String delFlag;
+	/**发票号码*/
+    @Excel(name = "发票号码", width = 15)
+	@ApiModelProperty(value = "发票号码")
+	private String invoiceNum;
+	/**出运日期*/
+	@Excel(name = "出运日期", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+	@ApiModelProperty(value = "出运日期")
+	private Date outData;
+	/**汇率*/
+    @Excel(name = "汇率", width = 15)
+	@ApiModelProperty(value = "汇率")
+	private java.math.BigDecimal exchangeRate;
+	/**订单号*/
+    @Excel(name = "订单号", width = 15)
+	@ApiModelProperty(value = "订单号")
+	private String orderNum;
+	/**产品款号*/
+    @Excel(name = "产品款号", width = 15)
+	@ApiModelProperty(value = "产品款号")
+	private String poStyleNum;
+	/**出货数量*/
+    @Excel(name = "出货数量", width = 15)
+	@ApiModelProperty(value = "出货数量")
+	private java.math.BigDecimal shipQuantity;
+	/**外销单价*/
+    @Excel(name = "外销单价", width = 15)
+	@ApiModelProperty(value = "外销单价")
+	private java.math.BigDecimal exportUnitPrice;
+	/**外销总价*/
+    @Excel(name = "外销总价", width = 15)
+	@ApiModelProperty(value = "外销总价")
+	private java.math.BigDecimal exportPrice;
+	/**人民币金额*/
+    @Excel(name = "人民币金额", width = 15)
+	@ApiModelProperty(value = "人民币金额")
+	private java.math.BigDecimal rmbAmount;
+	/**加工单价(人民币)*/
+    @Excel(name = "加工单价(人民币)", width = 15)
+	@ApiModelProperty(value = "加工单价(人民币)")
+	private java.math.BigDecimal procesUnitPricermb;
+	/**加工单价(美元)*/
+    @Excel(name = "加工单价(美元)", width = 15)
+	@ApiModelProperty(value = "加工单价(美元)")
+	private java.math.BigDecimal procesUnitPriceusd;
+	/**加工费*/
+    @Excel(name = "加工费", width = 15)
+	@ApiModelProperty(value = "加工费")
+	private java.math.BigDecimal processCost;
+}

+ 18 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/mapper/SyCostAllocationAccidentMapper.java

@@ -0,0 +1,18 @@
+package org.jeecg.modules.cost.mapper;
+
+import java.util.List;
+import org.jeecg.modules.cost.entity.SyCostAllocationAccident;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * @Description: 成本分配子表_事故单
+ * @Author: jeecg-boot
+ * @Date:   2022-06-21
+ * @Version: V1.0
+ */
+public interface SyCostAllocationAccidentMapper extends BaseMapper<SyCostAllocationAccident> {
+
+	public boolean deleteByMainId(String mainId);
+    
+	public List<SyCostAllocationAccident> selectByMainId(String mainId);
+}

+ 18 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/mapper/SyCostAllocationCostpayMapper.java

@@ -0,0 +1,18 @@
+package org.jeecg.modules.cost.mapper;
+
+import java.util.List;
+import org.jeecg.modules.cost.entity.SyCostAllocationCostpay;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * @Description: 成本分配子表_费用支出
+ * @Author: jeecg-boot
+ * @Date:   2022-06-21
+ * @Version: V1.0
+ */
+public interface SyCostAllocationCostpayMapper extends BaseMapper<SyCostAllocationCostpay> {
+
+	public boolean deleteByMainId(String mainId);
+    
+	public List<SyCostAllocationCostpay> selectByMainId(String mainId);
+}

+ 18 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/mapper/SyCostAllocationFabricMapper.java

@@ -0,0 +1,18 @@
+package org.jeecg.modules.cost.mapper;
+
+import java.util.List;
+import org.jeecg.modules.cost.entity.SyCostAllocationFabric;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * @Description: 成本分配子表_面料
+ * @Author: jeecg-boot
+ * @Date:   2022-06-21
+ * @Version: V1.0
+ */
+public interface SyCostAllocationFabricMapper extends BaseMapper<SyCostAllocationFabric> {
+
+	public boolean deleteByMainId(String mainId);
+    
+	public List<SyCostAllocationFabric> selectByMainId(String mainId);
+}

+ 18 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/mapper/SyCostAllocationIngredientMapper.java

@@ -0,0 +1,18 @@
+package org.jeecg.modules.cost.mapper;
+
+import java.util.List;
+import org.jeecg.modules.cost.entity.SyCostAllocationIngredient;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * @Description: 成本分配子表_辅料
+ * @Author: jeecg-boot
+ * @Date:   2022-06-21
+ * @Version: V1.0
+ */
+public interface SyCostAllocationIngredientMapper extends BaseMapper<SyCostAllocationIngredient> {
+
+	public boolean deleteByMainId(String mainId);
+    
+	public List<SyCostAllocationIngredient> selectByMainId(String mainId);
+}

+ 17 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/mapper/SyCostAllocationMapper.java

@@ -0,0 +1,17 @@
+package org.jeecg.modules.cost.mapper;
+
+import java.util.List;
+
+import org.apache.ibatis.annotations.Param;
+import org.jeecg.modules.cost.entity.SyCostAllocation;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * @Description: 成本分配主表
+ * @Author: jeecg-boot
+ * @Date:   2022-06-21
+ * @Version: V1.0
+ */
+public interface SyCostAllocationMapper extends BaseMapper<SyCostAllocation> {
+
+}

+ 18 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/mapper/SyCostAllocationShipdetailMapper.java

@@ -0,0 +1,18 @@
+package org.jeecg.modules.cost.mapper;
+
+import java.util.List;
+import org.jeecg.modules.cost.entity.SyCostAllocationShipdetail;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * @Description: 成本分配子表_发运明细
+ * @Author: jeecg-boot
+ * @Date:   2022-06-21
+ * @Version: V1.0
+ */
+public interface SyCostAllocationShipdetailMapper extends BaseMapper<SyCostAllocationShipdetail> {
+
+	public boolean deleteByMainId(String mainId);
+    
+	public List<SyCostAllocationShipdetail> selectByMainId(String mainId);
+}

+ 18 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/mapper/xml/SyCostAllocationAccidentMapper.xml

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.jeecg.modules.cost.mapper.SyCostAllocationAccidentMapper">
+
+	<delete id="deleteByMainId" parameterType="java.lang.String">
+		DELETE 
+		FROM  sy_cost_allocation_accident 
+		WHERE
+			 sy_cost_allocation_id = #{id} 		
+	</delete>
+	
+	<select id="selectByMainId" parameterType="java.lang.String" resultType="org.jeecg.modules.cost.entity.SyCostAllocationAccident">
+		SELECT * 
+		FROM  sy_cost_allocation_accident
+		WHERE
+			 sy_cost_allocation_id = #{id} 		
+	</select>
+</mapper>

+ 18 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/mapper/xml/SyCostAllocationCostpayMapper.xml

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.jeecg.modules.cost.mapper.SyCostAllocationCostpayMapper">
+
+	<delete id="deleteByMainId" parameterType="java.lang.String">
+		DELETE 
+		FROM  sy_cost_allocation_costpay 
+		WHERE
+			 sy_cost_allocation_id = #{id} 		
+	</delete>
+	
+	<select id="selectByMainId" parameterType="java.lang.String" resultType="org.jeecg.modules.cost.entity.SyCostAllocationCostpay">
+		SELECT * 
+		FROM  sy_cost_allocation_costpay
+		WHERE
+			 sy_cost_allocation_id = #{id} 		
+	</select>
+</mapper>

+ 18 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/mapper/xml/SyCostAllocationFabricMapper.xml

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.jeecg.modules.cost.mapper.SyCostAllocationFabricMapper">
+
+	<delete id="deleteByMainId" parameterType="java.lang.String">
+		DELETE 
+		FROM  sy_cost_allocation_fabric 
+		WHERE
+			 sy_cost_allocation_id = #{id} 		
+	</delete>
+	
+	<select id="selectByMainId" parameterType="java.lang.String" resultType="org.jeecg.modules.cost.entity.SyCostAllocationFabric">
+		SELECT * 
+		FROM  sy_cost_allocation_fabric
+		WHERE
+			 sy_cost_allocation_id = #{id} 		
+	</select>
+</mapper>

+ 18 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/mapper/xml/SyCostAllocationIngredientMapper.xml

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.jeecg.modules.cost.mapper.SyCostAllocationIngredientMapper">
+
+	<delete id="deleteByMainId" parameterType="java.lang.String">
+		DELETE 
+		FROM  sy_cost_allocation_ingredient 
+		WHERE
+			 sy_cost_allocation_id = #{id} 		
+	</delete>
+	
+	<select id="selectByMainId" parameterType="java.lang.String" resultType="org.jeecg.modules.cost.entity.SyCostAllocationIngredient">
+		SELECT * 
+		FROM  sy_cost_allocation_ingredient
+		WHERE
+			 sy_cost_allocation_id = #{id} 		
+	</select>
+</mapper>

+ 5 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/mapper/xml/SyCostAllocationMapper.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.jeecg.modules.cost.mapper.SyCostAllocationMapper">
+
+</mapper>

+ 18 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/mapper/xml/SyCostAllocationShipdetailMapper.xml

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.jeecg.modules.cost.mapper.SyCostAllocationShipdetailMapper">
+
+	<delete id="deleteByMainId" parameterType="java.lang.String">
+		DELETE 
+		FROM  sy_cost_allocation_shipdetail 
+		WHERE
+			 sy_cost_allocation_id = #{id} 		
+	</delete>
+	
+	<select id="selectByMainId" parameterType="java.lang.String" resultType="org.jeecg.modules.cost.entity.SyCostAllocationShipdetail">
+		SELECT * 
+		FROM  sy_cost_allocation_shipdetail
+		WHERE
+			 sy_cost_allocation_id = #{id} 		
+	</select>
+</mapper>

+ 16 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/service/ISyCostAllocationAccidentService.java

@@ -0,0 +1,16 @@
+package org.jeecg.modules.cost.service;
+
+import org.jeecg.modules.cost.entity.SyCostAllocationAccident;
+import com.baomidou.mybatisplus.extension.service.IService;
+import java.util.List;
+
+/**
+ * @Description: 成本分配子表_事故单
+ * @Author: jeecg-boot
+ * @Date:   2022-06-21
+ * @Version: V1.0
+ */
+public interface ISyCostAllocationAccidentService extends IService<SyCostAllocationAccident> {
+
+	public List<SyCostAllocationAccident> selectByMainId(String mainId);
+}

+ 16 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/service/ISyCostAllocationCostpayService.java

@@ -0,0 +1,16 @@
+package org.jeecg.modules.cost.service;
+
+import org.jeecg.modules.cost.entity.SyCostAllocationCostpay;
+import com.baomidou.mybatisplus.extension.service.IService;
+import java.util.List;
+
+/**
+ * @Description: 成本分配子表_费用支出
+ * @Author: jeecg-boot
+ * @Date:   2022-06-21
+ * @Version: V1.0
+ */
+public interface ISyCostAllocationCostpayService extends IService<SyCostAllocationCostpay> {
+
+	public List<SyCostAllocationCostpay> selectByMainId(String mainId);
+}

+ 16 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/service/ISyCostAllocationFabricService.java

@@ -0,0 +1,16 @@
+package org.jeecg.modules.cost.service;
+
+import org.jeecg.modules.cost.entity.SyCostAllocationFabric;
+import com.baomidou.mybatisplus.extension.service.IService;
+import java.util.List;
+
+/**
+ * @Description: 成本分配子表_面料
+ * @Author: jeecg-boot
+ * @Date:   2022-06-21
+ * @Version: V1.0
+ */
+public interface ISyCostAllocationFabricService extends IService<SyCostAllocationFabric> {
+
+	public List<SyCostAllocationFabric> selectByMainId(String mainId);
+}

+ 16 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/service/ISyCostAllocationIngredientService.java

@@ -0,0 +1,16 @@
+package org.jeecg.modules.cost.service;
+
+import org.jeecg.modules.cost.entity.SyCostAllocationIngredient;
+import com.baomidou.mybatisplus.extension.service.IService;
+import java.util.List;
+
+/**
+ * @Description: 成本分配子表_辅料
+ * @Author: jeecg-boot
+ * @Date:   2022-06-21
+ * @Version: V1.0
+ */
+public interface ISyCostAllocationIngredientService extends IService<SyCostAllocationIngredient> {
+
+	public List<SyCostAllocationIngredient> selectByMainId(String mainId);
+}

+ 44 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/service/ISyCostAllocationService.java

@@ -0,0 +1,44 @@
+package org.jeecg.modules.cost.service;
+
+import org.jeecg.modules.cost.entity.SyCostAllocationAccident;
+import org.jeecg.modules.cost.entity.SyCostAllocationCostpay;
+import org.jeecg.modules.cost.entity.SyCostAllocationFabric;
+import org.jeecg.modules.cost.entity.SyCostAllocationIngredient;
+import org.jeecg.modules.cost.entity.SyCostAllocationShipdetail;
+import org.jeecg.modules.cost.entity.SyCostAllocation;
+import com.baomidou.mybatisplus.extension.service.IService;
+import java.io.Serializable;
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * @Description: 成本分配主表
+ * @Author: jeecg-boot
+ * @Date:   2022-06-21
+ * @Version: V1.0
+ */
+public interface ISyCostAllocationService extends IService<SyCostAllocation> {
+
+	/**
+	 * 添加一对多
+	 * 
+	 */
+	public void saveMain(SyCostAllocation syCostAllocation, List<SyCostAllocationAccident> syCostAllocationAccidentList, List<SyCostAllocationCostpay> syCostAllocationCostpayList, List<SyCostAllocationFabric> syCostAllocationFabricList, List<SyCostAllocationIngredient> syCostAllocationIngredientList, List<SyCostAllocationShipdetail> syCostAllocationShipdetailList) ;
+	
+	/**
+	 * 修改一对多
+	 * 
+	 */
+	public void updateMain(SyCostAllocation syCostAllocation, List<SyCostAllocationAccident> syCostAllocationAccidentList, List<SyCostAllocationCostpay> syCostAllocationCostpayList, List<SyCostAllocationFabric> syCostAllocationFabricList, List<SyCostAllocationIngredient> syCostAllocationIngredientList, List<SyCostAllocationShipdetail> syCostAllocationShipdetailList);
+	
+	/**
+	 * 删除一对多
+	 */
+	public void delMain(String id);
+	
+	/**
+	 * 批量删除一对多
+	 */
+	public void delBatchMain(Collection<? extends Serializable> idList);
+	
+}

+ 16 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/service/ISyCostAllocationShipdetailService.java

@@ -0,0 +1,16 @@
+package org.jeecg.modules.cost.service;
+
+import org.jeecg.modules.cost.entity.SyCostAllocationShipdetail;
+import com.baomidou.mybatisplus.extension.service.IService;
+import java.util.List;
+
+/**
+ * @Description: 成本分配子表_发运明细
+ * @Author: jeecg-boot
+ * @Date:   2022-06-21
+ * @Version: V1.0
+ */
+public interface ISyCostAllocationShipdetailService extends IService<SyCostAllocationShipdetail> {
+
+	public List<SyCostAllocationShipdetail> selectByMainId(String mainId);
+}

+ 27 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/service/impl/SyCostAllocationAccidentServiceImpl.java

@@ -0,0 +1,27 @@
+package org.jeecg.modules.cost.service.impl;
+
+import org.jeecg.modules.cost.entity.SyCostAllocationAccident;
+import org.jeecg.modules.cost.mapper.SyCostAllocationAccidentMapper;
+import org.jeecg.modules.cost.service.ISyCostAllocationAccidentService;
+import org.springframework.stereotype.Service;
+import java.util.List;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+
+/**
+ * @Description: 成本分配子表_事故单
+ * @Author: jeecg-boot
+ * @Date:   2022-06-21
+ * @Version: V1.0
+ */
+@Service
+public class SyCostAllocationAccidentServiceImpl extends ServiceImpl<SyCostAllocationAccidentMapper, SyCostAllocationAccident> implements ISyCostAllocationAccidentService {
+	
+	@Autowired
+	private SyCostAllocationAccidentMapper syCostAllocationAccidentMapper;
+	
+	@Override
+	public List<SyCostAllocationAccident> selectByMainId(String mainId) {
+		return syCostAllocationAccidentMapper.selectByMainId(mainId);
+	}
+}

+ 27 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/service/impl/SyCostAllocationCostpayServiceImpl.java

@@ -0,0 +1,27 @@
+package org.jeecg.modules.cost.service.impl;
+
+import org.jeecg.modules.cost.entity.SyCostAllocationCostpay;
+import org.jeecg.modules.cost.mapper.SyCostAllocationCostpayMapper;
+import org.jeecg.modules.cost.service.ISyCostAllocationCostpayService;
+import org.springframework.stereotype.Service;
+import java.util.List;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+
+/**
+ * @Description: 成本分配子表_费用支出
+ * @Author: jeecg-boot
+ * @Date:   2022-06-21
+ * @Version: V1.0
+ */
+@Service
+public class SyCostAllocationCostpayServiceImpl extends ServiceImpl<SyCostAllocationCostpayMapper, SyCostAllocationCostpay> implements ISyCostAllocationCostpayService {
+	
+	@Autowired
+	private SyCostAllocationCostpayMapper syCostAllocationCostpayMapper;
+	
+	@Override
+	public List<SyCostAllocationCostpay> selectByMainId(String mainId) {
+		return syCostAllocationCostpayMapper.selectByMainId(mainId);
+	}
+}

+ 27 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/service/impl/SyCostAllocationFabricServiceImpl.java

@@ -0,0 +1,27 @@
+package org.jeecg.modules.cost.service.impl;
+
+import org.jeecg.modules.cost.entity.SyCostAllocationFabric;
+import org.jeecg.modules.cost.mapper.SyCostAllocationFabricMapper;
+import org.jeecg.modules.cost.service.ISyCostAllocationFabricService;
+import org.springframework.stereotype.Service;
+import java.util.List;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+
+/**
+ * @Description: 成本分配子表_面料
+ * @Author: jeecg-boot
+ * @Date:   2022-06-21
+ * @Version: V1.0
+ */
+@Service
+public class SyCostAllocationFabricServiceImpl extends ServiceImpl<SyCostAllocationFabricMapper, SyCostAllocationFabric> implements ISyCostAllocationFabricService {
+	
+	@Autowired
+	private SyCostAllocationFabricMapper syCostAllocationFabricMapper;
+	
+	@Override
+	public List<SyCostAllocationFabric> selectByMainId(String mainId) {
+		return syCostAllocationFabricMapper.selectByMainId(mainId);
+	}
+}

+ 27 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/service/impl/SyCostAllocationIngredientServiceImpl.java

@@ -0,0 +1,27 @@
+package org.jeecg.modules.cost.service.impl;
+
+import org.jeecg.modules.cost.entity.SyCostAllocationIngredient;
+import org.jeecg.modules.cost.mapper.SyCostAllocationIngredientMapper;
+import org.jeecg.modules.cost.service.ISyCostAllocationIngredientService;
+import org.springframework.stereotype.Service;
+import java.util.List;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+
+/**
+ * @Description: 成本分配子表_辅料
+ * @Author: jeecg-boot
+ * @Date:   2022-06-21
+ * @Version: V1.0
+ */
+@Service
+public class SyCostAllocationIngredientServiceImpl extends ServiceImpl<SyCostAllocationIngredientMapper, SyCostAllocationIngredient> implements ISyCostAllocationIngredientService {
+	
+	@Autowired
+	private SyCostAllocationIngredientMapper syCostAllocationIngredientMapper;
+	
+	@Override
+	public List<SyCostAllocationIngredient> selectByMainId(String mainId) {
+		return syCostAllocationIngredientMapper.selectByMainId(mainId);
+	}
+}

+ 141 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/service/impl/SyCostAllocationServiceImpl.java

@@ -0,0 +1,141 @@
+package org.jeecg.modules.cost.service.impl;
+
+import org.jeecg.modules.cost.entity.SyCostAllocation;
+import org.jeecg.modules.cost.entity.SyCostAllocationAccident;
+import org.jeecg.modules.cost.entity.SyCostAllocationCostpay;
+import org.jeecg.modules.cost.entity.SyCostAllocationFabric;
+import org.jeecg.modules.cost.entity.SyCostAllocationIngredient;
+import org.jeecg.modules.cost.entity.SyCostAllocationShipdetail;
+import org.jeecg.modules.cost.mapper.SyCostAllocationAccidentMapper;
+import org.jeecg.modules.cost.mapper.SyCostAllocationCostpayMapper;
+import org.jeecg.modules.cost.mapper.SyCostAllocationFabricMapper;
+import org.jeecg.modules.cost.mapper.SyCostAllocationIngredientMapper;
+import org.jeecg.modules.cost.mapper.SyCostAllocationShipdetailMapper;
+import org.jeecg.modules.cost.mapper.SyCostAllocationMapper;
+import org.jeecg.modules.cost.service.ISyCostAllocationService;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
+import java.io.Serializable;
+import java.util.List;
+import java.util.Collection;
+
+/**
+ * @Description: 成本分配主表
+ * @Author: jeecg-boot
+ * @Date:   2022-06-21
+ * @Version: V1.0
+ */
+@Service
+public class SyCostAllocationServiceImpl extends ServiceImpl<SyCostAllocationMapper, SyCostAllocation> implements ISyCostAllocationService {
+
+	@Autowired
+	private SyCostAllocationMapper syCostAllocationMapper;
+	@Autowired
+	private SyCostAllocationAccidentMapper syCostAllocationAccidentMapper;
+	@Autowired
+	private SyCostAllocationCostpayMapper syCostAllocationCostpayMapper;
+	@Autowired
+	private SyCostAllocationFabricMapper syCostAllocationFabricMapper;
+	@Autowired
+	private SyCostAllocationIngredientMapper syCostAllocationIngredientMapper;
+	@Autowired
+	private SyCostAllocationShipdetailMapper syCostAllocationShipdetailMapper;
+	
+	@Override
+	@Transactional
+	public void saveMain(SyCostAllocation syCostAllocation, List<SyCostAllocationAccident> syCostAllocationAccidentList,List<SyCostAllocationCostpay> syCostAllocationCostpayList,List<SyCostAllocationFabric> syCostAllocationFabricList,List<SyCostAllocationIngredient> syCostAllocationIngredientList,List<SyCostAllocationShipdetail> syCostAllocationShipdetailList) {
+		syCostAllocationMapper.insert(syCostAllocation);
+		for(SyCostAllocationAccident entity:syCostAllocationAccidentList) {
+			//外键设置
+			entity.setSyCostAllocationId(syCostAllocation.getId());
+			syCostAllocationAccidentMapper.insert(entity);
+		}
+		for(SyCostAllocationCostpay entity:syCostAllocationCostpayList) {
+			//外键设置
+			entity.setSyCostAllocationId(syCostAllocation.getId());
+			syCostAllocationCostpayMapper.insert(entity);
+		}
+		for(SyCostAllocationFabric entity:syCostAllocationFabricList) {
+			//外键设置
+			entity.setSyCostAllocationId(syCostAllocation.getId());
+			syCostAllocationFabricMapper.insert(entity);
+		}
+		for(SyCostAllocationIngredient entity:syCostAllocationIngredientList) {
+			//外键设置
+			entity.setSyCostAllocationId(syCostAllocation.getId());
+			syCostAllocationIngredientMapper.insert(entity);
+		}
+		for(SyCostAllocationShipdetail entity:syCostAllocationShipdetailList) {
+			//外键设置
+			entity.setSyCostAllocationId(syCostAllocation.getId());
+			syCostAllocationShipdetailMapper.insert(entity);
+		}
+	}
+
+	@Override
+	@Transactional
+	public void updateMain(SyCostAllocation syCostAllocation,List<SyCostAllocationAccident> syCostAllocationAccidentList,List<SyCostAllocationCostpay> syCostAllocationCostpayList,List<SyCostAllocationFabric> syCostAllocationFabricList,List<SyCostAllocationIngredient> syCostAllocationIngredientList,List<SyCostAllocationShipdetail> syCostAllocationShipdetailList) {
+		syCostAllocationMapper.updateById(syCostAllocation);
+		
+		//1.先删除子表数据
+		syCostAllocationAccidentMapper.deleteByMainId(syCostAllocation.getId());
+		syCostAllocationCostpayMapper.deleteByMainId(syCostAllocation.getId());
+		syCostAllocationFabricMapper.deleteByMainId(syCostAllocation.getId());
+		syCostAllocationIngredientMapper.deleteByMainId(syCostAllocation.getId());
+		syCostAllocationShipdetailMapper.deleteByMainId(syCostAllocation.getId());
+		
+		//2.子表数据重新插入
+		for(SyCostAllocationAccident entity:syCostAllocationAccidentList) {
+			//外键设置
+			entity.setSyCostAllocationId(syCostAllocation.getId());
+			syCostAllocationAccidentMapper.insert(entity);
+		}
+		for(SyCostAllocationCostpay entity:syCostAllocationCostpayList) {
+			//外键设置
+			entity.setSyCostAllocationId(syCostAllocation.getId());
+			syCostAllocationCostpayMapper.insert(entity);
+		}
+		for(SyCostAllocationFabric entity:syCostAllocationFabricList) {
+			//外键设置
+			entity.setSyCostAllocationId(syCostAllocation.getId());
+			syCostAllocationFabricMapper.insert(entity);
+		}
+		for(SyCostAllocationIngredient entity:syCostAllocationIngredientList) {
+			//外键设置
+			entity.setSyCostAllocationId(syCostAllocation.getId());
+			syCostAllocationIngredientMapper.insert(entity);
+		}
+		for(SyCostAllocationShipdetail entity:syCostAllocationShipdetailList) {
+			//外键设置
+			entity.setSyCostAllocationId(syCostAllocation.getId());
+			syCostAllocationShipdetailMapper.insert(entity);
+		}
+	}
+
+	@Override
+	@Transactional
+	public void delMain(String id) {
+		syCostAllocationAccidentMapper.deleteByMainId(id);
+		syCostAllocationCostpayMapper.deleteByMainId(id);
+		syCostAllocationFabricMapper.deleteByMainId(id);
+		syCostAllocationIngredientMapper.deleteByMainId(id);
+		syCostAllocationShipdetailMapper.deleteByMainId(id);
+		syCostAllocationMapper.deleteById(id);
+	}
+
+	@Override
+	@Transactional
+	public void delBatchMain(Collection<? extends Serializable> idList) {
+		for(Serializable id:idList) {
+			syCostAllocationAccidentMapper.deleteByMainId(id.toString());
+			syCostAllocationCostpayMapper.deleteByMainId(id.toString());
+			syCostAllocationFabricMapper.deleteByMainId(id.toString());
+			syCostAllocationIngredientMapper.deleteByMainId(id.toString());
+			syCostAllocationShipdetailMapper.deleteByMainId(id.toString());
+			syCostAllocationMapper.deleteById(id);
+		}
+	}
+	
+}

+ 27 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/service/impl/SyCostAllocationShipdetailServiceImpl.java

@@ -0,0 +1,27 @@
+package org.jeecg.modules.cost.service.impl;
+
+import org.jeecg.modules.cost.entity.SyCostAllocationShipdetail;
+import org.jeecg.modules.cost.mapper.SyCostAllocationShipdetailMapper;
+import org.jeecg.modules.cost.service.ISyCostAllocationShipdetailService;
+import org.springframework.stereotype.Service;
+import java.util.List;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+
+/**
+ * @Description: 成本分配子表_发运明细
+ * @Author: jeecg-boot
+ * @Date:   2022-06-21
+ * @Version: V1.0
+ */
+@Service
+public class SyCostAllocationShipdetailServiceImpl extends ServiceImpl<SyCostAllocationShipdetailMapper, SyCostAllocationShipdetail> implements ISyCostAllocationShipdetailService {
+	
+	@Autowired
+	private SyCostAllocationShipdetailMapper syCostAllocationShipdetailMapper;
+	
+	@Override
+	public List<SyCostAllocationShipdetail> selectByMainId(String mainId) {
+		return syCostAllocationShipdetailMapper.selectByMainId(mainId);
+	}
+}

+ 165 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/vo/SyCostAllocationPage.java

@@ -0,0 +1,165 @@
+package org.jeecg.modules.cost.vo;
+
+import java.util.List;
+import org.jeecg.modules.cost.entity.SyCostAllocation;
+import org.jeecg.modules.cost.entity.SyCostAllocationAccident;
+import org.jeecg.modules.cost.entity.SyCostAllocationCostpay;
+import org.jeecg.modules.cost.entity.SyCostAllocationFabric;
+import org.jeecg.modules.cost.entity.SyCostAllocationIngredient;
+import org.jeecg.modules.cost.entity.SyCostAllocationShipdetail;
+import lombok.Data;
+import org.jeecgframework.poi.excel.annotation.Excel;
+import org.jeecgframework.poi.excel.annotation.ExcelCollection;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.springframework.format.annotation.DateTimeFormat;
+import java.util.Date;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * @Description: 成本分配主表
+ * @Author: jeecg-boot
+ * @Date:   2022-06-21
+ * @Version: V1.0
+ */
+@Data
+@ApiModel(value="sy_cost_allocationPage对象", description="成本分配主表")
+public class SyCostAllocationPage {
+	
+	/**id*/
+	private String id;
+	/**创建人*/
+  	@Excel(name = "创建人", width = 15)
+	private String createBy;
+	/**创建日期*/
+  	@Excel(name = "创建日期", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+  	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+	private Date createTime;
+	/**修改人*/
+  	@Excel(name = "修改人", width = 15)
+	private String updateBy;
+	/**修改日期*/
+  	@Excel(name = "修改日期", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+  	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+	private Date updateTime;
+	/**组织*/
+  	@Excel(name = "组织", width = 15)
+	private String pkOrg;
+	/**删除状态*/
+  	@Excel(name = "删除状态", width = 15)
+	private String delFlag;
+	/**计划单号*/
+  	@Excel(name = "计划单号", width = 15)
+	private String planNum;
+	/**款号*/
+  	@Excel(name = "款号", width = 15)
+	private String poStyleNum;
+	/**业务员*/
+  	@Excel(name = "业务员", width = 15)
+	private String exportSales;
+	/**成衣合同号*/
+  	@Excel(name = "成衣合同号", width = 15)
+	private String garmentContractno;
+	/**部门*/
+  	@Excel(name = "部门", width = 15)
+	private String department;
+	/**客户简称*/
+  	@Excel(name = "客户简称", width = 15)
+	private String customerShortame;
+	/**加工单位*/
+  	@Excel(name = "加工单位", width = 15)
+	private String processUnit;
+	/**出运日期*/
+  	@Excel(name = "出运日期", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+  	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+	private Date outdata;
+	/**计划数量*/
+  	@Excel(name = "计划数量", width = 15)
+	private java.math.BigDecimal planQuantity;
+	/**美元外销总价*/
+  	@Excel(name = "美元外销总价", width = 15)
+	private java.math.BigDecimal usdTotalexportprice;
+	/**人民币费用支出*/
+  	@Excel(name = "人民币费用支出", width = 15)
+	private java.math.BigDecimal rmbExpense;
+	/**税率*/
+  	@Excel(name = "税率", width = 15)
+	private java.math.BigDecimal taxrate;
+	/**成衣件数-实际出货数量*/
+  	@Excel(name = "成衣件数-实际出货数量", width = 15)
+	private java.math.BigDecimal actualShipquantity;
+	/**人民币外销金额*/
+  	@Excel(name = "人民币外销金额", width = 15)
+	private java.math.BigDecimal rmbExportamount;
+	/**美元费用支出*/
+  	@Excel(name = "美元费用支出", width = 15)
+	private java.math.BigDecimal usdExpense;
+	/**人民币加工费*/
+  	@Excel(name = "人民币加工费", width = 15)
+	private java.math.BigDecimal rmbProcesscost;
+	/**美元加工费*/
+  	@Excel(name = "美元加工费", width = 15)
+	private java.math.BigDecimal usdProcesscost;
+	/**短出数:计划数量和实际出货数量的差额*/
+  	@Excel(name = "短出数:计划数量和实际出货数量的差额", width = 15)
+	private java.math.BigDecimal shortseveral;
+	/**短出货值*/
+  	@Excel(name = "短出货值", width = 15)
+	private java.math.BigDecimal shortvalue;
+	/**短出面料成本:单件成本*短出数量*/
+  	@Excel(name = "短出面料成本:单件成本*短出数量", width = 15)
+	private java.math.BigDecimal fabricshortcost;
+	/**事故单美金金额*/
+  	@Excel(name = "事故单美金金额", width = 15)
+	private java.math.BigDecimal accidentUsdamount;
+	/**面料含税成本*/
+  	@Excel(name = "面料含税成本", width = 15)
+	private java.math.BigDecimal fabriccostIncludestax;
+	/**辅料含税成本*/
+  	@Excel(name = "辅料含税成本", width = 15)
+	private java.math.BigDecimal excipiencostIncludestax;
+	/**销售订单本币总额*/
+  	@Excel(name = "销售订单本币总额", width = 15)
+	private java.math.BigDecimal salesordersLocaltotal;
+	/**事故单人民币金额*/
+  	@Excel(name = "事故单人民币金额", width = 15)
+	private java.math.BigDecimal accidentcnyAmount;
+	/**面料不含税成本*/
+  	@Excel(name = "面料不含税成本", width = 15)
+	private java.math.BigDecimal fabriccostNotincludestax;
+	/**辅料不含税成本*/
+  	@Excel(name = "辅料不含税成本", width = 15)
+	private java.math.BigDecimal excipiencostNotincludestax;
+	/**销售订单原币总额*/
+  	@Excel(name = "销售订单原币总额", width = 15)
+	private java.math.BigDecimal salesrrdersOriginaltotal;
+	/**制单人*/
+  	@Excel(name = "制单人", width = 15)
+	private String preparedBy;
+	/**单据状态:0未保存,1已保存,2已审批*/
+  	@Excel(name = "单据状态:0未保存,1已保存,2已审批", width = 15)
+	private Integer billstatus;
+	/**备注*/
+  	@Excel(name = "备注", width = 15)
+	private Object remarks;
+	
+	@ExcelCollection(name="成本分配子表_事故单")
+	@ApiModelProperty(value = "成本分配子表_事故单")
+	private List<SyCostAllocationAccident> syCostAllocationAccidentList;
+	@ExcelCollection(name="成本分配子表_费用支出")
+	@ApiModelProperty(value = "成本分配子表_费用支出")
+	private List<SyCostAllocationCostpay> syCostAllocationCostpayList;
+	@ExcelCollection(name="成本分配子表_面料")
+	@ApiModelProperty(value = "成本分配子表_面料")
+	private List<SyCostAllocationFabric> syCostAllocationFabricList;
+	@ExcelCollection(name="成本分配子表_辅料")
+	@ApiModelProperty(value = "成本分配子表_辅料")
+	private List<SyCostAllocationIngredient> syCostAllocationIngredientList;
+	@ExcelCollection(name="成本分配子表_发运明细")
+	@ApiModelProperty(value = "成本分配子表_发运明细")
+	private List<SyCostAllocationShipdetail> syCostAllocationShipdetailList;
+	
+}