Explorar o código

Merge remote-tracking branch 'origin/master'

liuchaohui %!s(int64=2) %!d(string=hai) anos
pai
achega
cabbcb193b
Modificáronse 21 ficheiros con 1072 adicións e 38 borrados
  1. 167 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/seclarationElements/controller/SyDeclarationElementsController.java
  2. 167 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/seclarationElements/controller/SyDeclarationElementsItemController.java
  3. 101 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/seclarationElements/entity/SyDeclarationElements.java
  4. 83 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/seclarationElements/entity/SyDeclarationElementsItem.java
  5. 17 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/seclarationElements/mapper/SyDeclarationElementsItemMapper.java
  6. 17 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/seclarationElements/mapper/SyDeclarationElementsMapper.java
  7. 5 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/seclarationElements/mapper/xml/SyDeclarationElementsItemMapper.xml
  8. 5 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/seclarationElements/mapper/xml/SyDeclarationElementsMapper.xml
  9. 14 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/seclarationElements/service/ISyDeclarationElementsItemService.java
  10. 18 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/seclarationElements/service/ISyDeclarationElementsService.java
  11. 19 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/seclarationElements/service/impl/SyDeclarationElementsItemServiceImpl.java
  12. 89 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/seclarationElements/service/impl/SyDeclarationElementsServiceImpl.java
  13. 196 14
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/shippingDetails/controller/SyShippingDetailsController.java
  14. 3 3
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/shippingDetails/entity/VO/OrderDataVo.java
  15. 133 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/shippingDetails/entity/VO/SyShippingDetailsVo.java
  16. 13 9
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/shippingDetails/mapper/xml/SyShippingDetailsMapper.xml
  17. 2 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/shippingDetails/service/ISyShippingDetailsService.java
  18. 8 2
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/shippingDetails/service/impl/SyShippingDetailsServiceImpl.java
  19. 6 3
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/openApi/controller/MOMainController.java
  20. 6 4
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/openApi/controller/POPomainController.java
  21. 3 3
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/util/JsonChangeUtils.java

+ 167 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/seclarationElements/controller/SyDeclarationElementsController.java

@@ -0,0 +1,167 @@
+package org.jeecg.modules.documents.seclarationElements.controller;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.common.system.query.QueryGenerator;
+import org.jeecg.common.aspect.annotation.AutoLog;
+import org.jeecg.common.util.oConvertUtils;
+import org.jeecg.modules.documents.seclarationElements.entity.SyDeclarationElements;
+import org.jeecg.modules.documents.seclarationElements.service.ISyDeclarationElementsService;
+import java.util.Date;
+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 org.jeecg.common.system.base.controller.JeecgController;
+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.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+import org.springframework.web.multipart.MultipartHttpServletRequest;
+import org.springframework.web.servlet.ModelAndView;
+import com.alibaba.fastjson.JSON;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+
+ /**
+ * @Description: 报关要素
+ * @Author: jeecg-boot
+ * @Date:   2022-05-23
+ * @Version: V1.0
+ */
+@Slf4j
+@Api(tags="报关要素")
+@RestController
+@RequestMapping("/seclarationElements/syDeclarationElements")
+public class SyDeclarationElementsController extends JeecgController<SyDeclarationElements, ISyDeclarationElementsService> {
+	@Autowired
+	private ISyDeclarationElementsService syDeclarationElementsService;
+	
+	/**
+	 * 分页列表查询
+	 *
+	 * @param syDeclarationElements
+	 * @param pageNo
+	 * @param pageSize
+	 * @param req
+	 * @return
+	 */
+	@AutoLog(value = "报关要素-分页列表查询")
+	@ApiOperation(value="报关要素-分页列表查询", notes="报关要素-分页列表查询")
+	@GetMapping(value = "/list")
+	public Result<?> queryPageList(SyDeclarationElements syDeclarationElements,
+								   @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
+								   @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
+								   HttpServletRequest req) {
+		QueryWrapper<SyDeclarationElements> queryWrapper = QueryGenerator.initQueryWrapper(syDeclarationElements, req.getParameterMap());
+		Page<SyDeclarationElements> page = new Page<SyDeclarationElements>(pageNo, pageSize);
+		IPage<SyDeclarationElements> pageList = syDeclarationElementsService.page(page, queryWrapper);
+		return Result.OK(pageList);
+	}
+	
+	/**
+	 * 添加
+	 *
+	 * @param syDeclarationElements
+	 * @return
+	 */
+	@AutoLog(value = "报关要素-添加")
+	@ApiOperation(value="报关要素-添加", notes="报关要素-添加")
+	@PostMapping(value = "/add")
+	public Result<?> add(@RequestBody SyDeclarationElements syDeclarationElements) {
+		syDeclarationElementsService.save(syDeclarationElements);
+		return Result.OK("添加成功!");
+	}
+	
+	/**
+	 * 编辑
+	 *
+	 * @param syDeclarationElements
+	 * @return
+	 */
+	@AutoLog(value = "报关要素-编辑")
+	@ApiOperation(value="报关要素-编辑", notes="报关要素-编辑")
+	@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
+	public Result<?> edit(@RequestBody SyDeclarationElements syDeclarationElements) {
+		syDeclarationElementsService.updateById(syDeclarationElements);
+		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) {
+		syDeclarationElementsService.removeById(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.syDeclarationElementsService.removeByIds(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) {
+		SyDeclarationElements syDeclarationElements = syDeclarationElementsService.getById(id);
+		return Result.OK(syDeclarationElements);
+	}
+
+  /**
+   * 导出excel
+   *
+   * @param request
+   * @param syDeclarationElements
+   */
+  @RequestMapping(value = "/exportXls")
+  public ModelAndView exportXls(HttpServletRequest request, SyDeclarationElements syDeclarationElements) {
+      return super.exportXls(request, syDeclarationElements, SyDeclarationElements.class, "报关要素");
+  }
+
+  /**
+   * 通过excel导入数据
+   *
+   * @param request
+   * @param response
+   * @return
+   */
+  @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
+  public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
+      return super.importExcel(request, response, SyDeclarationElements.class);
+  }
+
+}

+ 167 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/seclarationElements/controller/SyDeclarationElementsItemController.java

@@ -0,0 +1,167 @@
+package org.jeecg.modules.documents.seclarationElements.controller;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.common.system.query.QueryGenerator;
+import org.jeecg.common.aspect.annotation.AutoLog;
+import org.jeecg.common.util.oConvertUtils;
+import org.jeecg.modules.documents.seclarationElements.entity.SyDeclarationElementsItem;
+import org.jeecg.modules.documents.seclarationElements.service.ISyDeclarationElementsItemService;
+import java.util.Date;
+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 org.jeecg.common.system.base.controller.JeecgController;
+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.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+import org.springframework.web.multipart.MultipartHttpServletRequest;
+import org.springframework.web.servlet.ModelAndView;
+import com.alibaba.fastjson.JSON;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+
+ /**
+ * @Description: 报关要素子表
+ * @Author: jeecg-boot
+ * @Date:   2022-05-23
+ * @Version: V1.0
+ */
+@Slf4j
+@Api(tags="报关要素子表")
+@RestController
+@RequestMapping("/seclarationElements/syDeclarationElementsItem")
+public class SyDeclarationElementsItemController extends JeecgController<SyDeclarationElementsItem, ISyDeclarationElementsItemService> {
+	@Autowired
+	private ISyDeclarationElementsItemService syDeclarationElementsItemService;
+	
+	/**
+	 * 分页列表查询
+	 *
+	 * @param syDeclarationElementsItem
+	 * @param pageNo
+	 * @param pageSize
+	 * @param req
+	 * @return
+	 */
+	@AutoLog(value = "报关要素子表-分页列表查询")
+	@ApiOperation(value="报关要素子表-分页列表查询", notes="报关要素子表-分页列表查询")
+	@GetMapping(value = "/list")
+	public Result<?> queryPageList(SyDeclarationElementsItem syDeclarationElementsItem,
+								   @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
+								   @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
+								   HttpServletRequest req) {
+		QueryWrapper<SyDeclarationElementsItem> queryWrapper = QueryGenerator.initQueryWrapper(syDeclarationElementsItem, req.getParameterMap());
+		Page<SyDeclarationElementsItem> page = new Page<SyDeclarationElementsItem>(pageNo, pageSize);
+		IPage<SyDeclarationElementsItem> pageList = syDeclarationElementsItemService.page(page, queryWrapper);
+		return Result.OK(pageList);
+	}
+	
+	/**
+	 * 添加
+	 *
+	 * @param syDeclarationElementsItem
+	 * @return
+	 */
+	@AutoLog(value = "报关要素子表-添加")
+	@ApiOperation(value="报关要素子表-添加", notes="报关要素子表-添加")
+	@PostMapping(value = "/add")
+	public Result<?> add(@RequestBody SyDeclarationElementsItem syDeclarationElementsItem) {
+		syDeclarationElementsItemService.save(syDeclarationElementsItem);
+		return Result.OK("添加成功!");
+	}
+	
+	/**
+	 * 编辑
+	 *
+	 * @param syDeclarationElementsItem
+	 * @return
+	 */
+	@AutoLog(value = "报关要素子表-编辑")
+	@ApiOperation(value="报关要素子表-编辑", notes="报关要素子表-编辑")
+	@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
+	public Result<?> edit(@RequestBody SyDeclarationElementsItem syDeclarationElementsItem) {
+		syDeclarationElementsItemService.updateById(syDeclarationElementsItem);
+		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) {
+		syDeclarationElementsItemService.removeById(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.syDeclarationElementsItemService.removeByIds(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) {
+		SyDeclarationElementsItem syDeclarationElementsItem = syDeclarationElementsItemService.getById(id);
+		return Result.OK(syDeclarationElementsItem);
+	}
+
+  /**
+   * 导出excel
+   *
+   * @param request
+   * @param syDeclarationElementsItem
+   */
+  @RequestMapping(value = "/exportXls")
+  public ModelAndView exportXls(HttpServletRequest request, SyDeclarationElementsItem syDeclarationElementsItem) {
+      return super.exportXls(request, syDeclarationElementsItem, SyDeclarationElementsItem.class, "报关要素子表");
+  }
+
+  /**
+   * 通过excel导入数据
+   *
+   * @param request
+   * @param response
+   * @return
+   */
+  @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
+  public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
+      return super.importExcel(request, response, SyDeclarationElementsItem.class);
+  }
+
+}

+ 101 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/seclarationElements/entity/SyDeclarationElements.java

@@ -0,0 +1,101 @@
+package org.jeecg.modules.documents.seclarationElements.entity;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.util.List;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.TableField;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.springframework.format.annotation.DateTimeFormat;
+import org.jeecgframework.poi.excel.annotation.Excel;
+
+/**
+ * @Description: 报关要素
+ * @Author: jeecg-boot
+ * @Date:   2022-05-23
+ * @Version: V1.0
+ */
+@Data
+@TableName("sy_declaration_elements")
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@ApiModel(value="sy_declaration_elements对象", description="报关要素")
+public class SyDeclarationElements {
+    
+	/**主键id*/
+	@TableId(type = IdType.ASSIGN_ID)
+    @ApiModelProperty(value = "主键id")
+	private java.lang.String id;
+	/**存货编码*/
+	@Excel(name = "存货编码", width = 15)
+    @ApiModelProperty(value = "存货编码")
+	private java.lang.String inventoryCode;
+	/**存货名称*/
+	@Excel(name = "存货名称", width = 15)
+    @ApiModelProperty(value = "存货名称")
+	private java.lang.String inventoryName;
+	/**账套*/
+	@Excel(name = "账套", width = 15)
+    @ApiModelProperty(value = "账套")
+	private java.lang.String acSetNo;
+	/**款号*/
+	@Excel(name = "款号", width = 15)
+    @ApiModelProperty(value = "款号")
+	private java.lang.String itemNumber;
+	/**报关品名*/
+	@Excel(name = "报关品名", width = 15)
+    @ApiModelProperty(value = "报关品名")
+	private java.lang.String declarationName;
+	/**HScode*/
+	@Excel(name = "HScode", width = 15)
+    @ApiModelProperty(value = "HScode")
+	private java.lang.String hsCode;
+	/**英文品名*/
+	@Excel(name = "英文品名", width = 15)
+    @ApiModelProperty(value = "英文品名")
+	private java.lang.String englishProductName;
+	/**创建人*/
+	@Excel(name = "创建人", width = 15)
+    @ApiModelProperty(value = "创建人")
+	private java.lang.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 java.util.Date createTime;
+	/**更新人*/
+	@Excel(name = "更新人", width = 15)
+    @ApiModelProperty(value = "更新人")
+	private java.lang.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 java.util.Date updateTime;
+	/**组织*/
+	@Excel(name = "组织", width = 15)
+    @ApiModelProperty(value = "组织")
+	private java.lang.String pkOrg;
+	/**删除状态*/
+	@Excel(name = "删除状态", width = 15)
+    @ApiModelProperty(value = "删除状态")
+	private java.lang.String delFlag;
+	/**备注*/
+	@Excel(name = "备注", width = 15)
+    @ApiModelProperty(value = "备注")
+	private java.lang.Object memo;
+
+	/**子表集合*/
+	@TableField(exist = false)
+	List<SyDeclarationElementsItem> syDeclarationElementsItemList;
+}

+ 83 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/seclarationElements/entity/SyDeclarationElementsItem.java

@@ -0,0 +1,83 @@
+package org.jeecg.modules.documents.seclarationElements.entity;
+
+import java.io.Serializable;
+import java.util.Date;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.TableField;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.springframework.format.annotation.DateTimeFormat;
+import org.jeecgframework.poi.excel.annotation.Excel;
+
+/**
+ * @Description: 报关要素子表
+ * @Author: jeecg-boot
+ * @Date:   2022-05-23
+ * @Version: V1.0
+ */
+@Data
+@TableName("sy_declaration_elements_item")
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@ApiModel(value="sy_declaration_elements_item对象", description="报关要素子表")
+public class SyDeclarationElementsItem {
+    
+	/**主键id*/
+	@TableId(type = IdType.ASSIGN_ID)
+    @ApiModelProperty(value = "主键id")
+	private java.lang.String id;
+	/**报关要素主表*/
+	@Excel(name = "报关要素主表", width = 15)
+    @ApiModelProperty(value = "报关要素主表")
+	private java.lang.String syDeclarationElementsId;
+	/**类型*/
+	@Excel(name = "类型", width = 15)
+    @ApiModelProperty(value = "类型")
+	private java.lang.String typeValue;
+	/**类型文本*/
+	@Excel(name = "类型文本", width = 15)
+    @ApiModelProperty(value = "类型文本")
+	private java.lang.String typeText;
+	/**描述*/
+	@Excel(name = "描述", width = 15)
+    @ApiModelProperty(value = "描述")
+	private java.lang.Object describeText;
+	/**创建人*/
+	@Excel(name = "创建人", width = 15)
+    @ApiModelProperty(value = "创建人")
+	private java.lang.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 java.util.Date createTime;
+	/**更新人*/
+	@Excel(name = "更新人", width = 15)
+    @ApiModelProperty(value = "更新人")
+	private java.lang.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 java.util.Date updateTime;
+	/**组织*/
+	@Excel(name = "组织", width = 15)
+    @ApiModelProperty(value = "组织")
+	private java.lang.String pkOrg;
+	/**删除状态*/
+	@Excel(name = "删除状态", width = 15)
+    @ApiModelProperty(value = "删除状态")
+	private java.lang.String delFlag;
+	/**备注*/
+	@Excel(name = "备注", width = 15)
+    @ApiModelProperty(value = "备注")
+	private java.lang.Object memo;
+}

+ 17 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/seclarationElements/mapper/SyDeclarationElementsItemMapper.java

@@ -0,0 +1,17 @@
+package org.jeecg.modules.documents.seclarationElements.mapper;
+
+import java.util.List;
+
+import org.apache.ibatis.annotations.Param;
+import org.jeecg.modules.documents.seclarationElements.entity.SyDeclarationElementsItem;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * @Description: 报关要素子表
+ * @Author: jeecg-boot
+ * @Date:   2022-05-23
+ * @Version: V1.0
+ */
+public interface SyDeclarationElementsItemMapper extends BaseMapper<SyDeclarationElementsItem> {
+
+}

+ 17 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/seclarationElements/mapper/SyDeclarationElementsMapper.java

@@ -0,0 +1,17 @@
+package org.jeecg.modules.documents.seclarationElements.mapper;
+
+import java.util.List;
+
+import org.apache.ibatis.annotations.Param;
+import org.jeecg.modules.documents.seclarationElements.entity.SyDeclarationElements;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * @Description: 报关要素
+ * @Author: jeecg-boot
+ * @Date:   2022-05-23
+ * @Version: V1.0
+ */
+public interface SyDeclarationElementsMapper extends BaseMapper<SyDeclarationElements> {
+
+}

+ 5 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/seclarationElements/mapper/xml/SyDeclarationElementsItemMapper.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.documents.seclarationElements.mapper.SyDeclarationElementsItemMapper">
+
+</mapper>

+ 5 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/seclarationElements/mapper/xml/SyDeclarationElementsMapper.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.documents.seclarationElements.mapper.SyDeclarationElementsMapper">
+
+</mapper>

+ 14 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/seclarationElements/service/ISyDeclarationElementsItemService.java

@@ -0,0 +1,14 @@
+package org.jeecg.modules.documents.seclarationElements.service;
+
+import org.jeecg.modules.documents.seclarationElements.entity.SyDeclarationElementsItem;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * @Description: 报关要素子表
+ * @Author: jeecg-boot
+ * @Date:   2022-05-23
+ * @Version: V1.0
+ */
+public interface ISyDeclarationElementsItemService extends IService<SyDeclarationElementsItem> {
+
+}

+ 18 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/seclarationElements/service/ISyDeclarationElementsService.java

@@ -0,0 +1,18 @@
+package org.jeecg.modules.documents.seclarationElements.service;
+
+import org.jeecg.modules.documents.seclarationElements.entity.SyDeclarationElements;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * @Description: 报关要素
+ * @Author: jeecg-boot
+ * @Date:   2022-05-23
+ * @Version: V1.0
+ */
+public interface ISyDeclarationElementsService extends IService<SyDeclarationElements> {
+
+
+    //新增
+    public SyDeclarationElements syDeclarationElementsAdd(SyDeclarationElements syDeclarationElements);
+
+}

+ 19 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/seclarationElements/service/impl/SyDeclarationElementsItemServiceImpl.java

@@ -0,0 +1,19 @@
+package org.jeecg.modules.documents.seclarationElements.service.impl;
+
+import org.jeecg.modules.documents.seclarationElements.entity.SyDeclarationElementsItem;
+import org.jeecg.modules.documents.seclarationElements.mapper.SyDeclarationElementsItemMapper;
+import org.jeecg.modules.documents.seclarationElements.service.ISyDeclarationElementsItemService;
+import org.springframework.stereotype.Service;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+
+/**
+ * @Description: 报关要素子表
+ * @Author: jeecg-boot
+ * @Date:   2022-05-23
+ * @Version: V1.0
+ */
+@Service
+public class SyDeclarationElementsItemServiceImpl extends ServiceImpl<SyDeclarationElementsItemMapper, SyDeclarationElementsItem> implements ISyDeclarationElementsItemService {
+
+}

+ 89 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/seclarationElements/service/impl/SyDeclarationElementsServiceImpl.java

@@ -0,0 +1,89 @@
+package org.jeecg.modules.documents.seclarationElements.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import org.jeecg.common.util.oConvertUtils;
+import org.jeecg.modules.documents.seclarationElements.entity.SyDeclarationElements;
+import org.jeecg.modules.documents.seclarationElements.entity.SyDeclarationElementsItem;
+import org.jeecg.modules.documents.seclarationElements.mapper.SyDeclarationElementsMapper;
+import org.jeecg.modules.documents.seclarationElements.service.ISyDeclarationElementsItemService;
+import org.jeecg.modules.documents.seclarationElements.service.ISyDeclarationElementsService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @Description: 报关要素
+ * @Author: jeecg-boot
+ * @Date:   2022-05-23
+ * @Version: V1.0
+ */
+@Service
+public class SyDeclarationElementsServiceImpl extends ServiceImpl<SyDeclarationElementsMapper, SyDeclarationElements> implements ISyDeclarationElementsService {
+
+
+    @Autowired
+    private ISyDeclarationElementsItemService syDeclarationElementsItemService;
+
+    /**
+     * 新增(发运明细调用)
+     * @param syDeclarationElements
+     * @return
+     */
+    @Override
+    public SyDeclarationElements syDeclarationElementsAdd(SyDeclarationElements syDeclarationElements) {
+        //用于修改新增的集合
+        List<SyDeclarationElementsItem> syDeclarationElementsItemListUpdate = new ArrayList<SyDeclarationElementsItem>();
+        //查询是否有数据
+        String ids = syDeclarationElements.getId();
+
+        if(oConvertUtils.isEmpty(ids)){ //新增
+                String id = oConvertUtils.id();
+
+                List<SyDeclarationElementsItem> syDeclarationElementsItemList = new ArrayList<SyDeclarationElementsItem>();
+                //设置ID
+                syDeclarationElements.setId(id);
+
+                List<SyDeclarationElementsItem> list = syDeclarationElements.getSyDeclarationElementsItemList();
+                for (SyDeclarationElementsItem item:list){
+                    item.setId(oConvertUtils.id());
+                    item.setSyDeclarationElementsId(id);
+                    syDeclarationElementsItemList.add(item);
+                }
+                if(syDeclarationElementsItemList.size()!=0){
+                    syDeclarationElementsItemService.saveBatch(syDeclarationElementsItemList);
+                }
+
+                boolean ok = save(syDeclarationElements);
+                if(ok){
+                    return syDeclarationElements;
+                }
+
+            }else{ //修改
+
+             //删除子表
+            QueryWrapper<SyDeclarationElementsItem> queryWrapperItem = new QueryWrapper<SyDeclarationElementsItem>();
+            queryWrapperItem.eq("sy_declaration_elements_id", ids).eq("del_flag", 0);
+            List<SyDeclarationElementsItem> syDeclarationElementsItemsList = syDeclarationElementsItemService.list(queryWrapperItem);
+            for(SyDeclarationElementsItem li:syDeclarationElementsItemsList){
+                li.setDelFlag("1");
+            }
+            syDeclarationElementsItemService.updateBatchById(syDeclarationElementsItemsList);
+
+            //新增
+            List<SyDeclarationElementsItem> list = syDeclarationElements.getSyDeclarationElementsItemList();
+            for (SyDeclarationElementsItem item:list){
+                item.setId(oConvertUtils.id());
+                item.setSyDeclarationElementsId(syDeclarationElements.getId());
+                syDeclarationElementsItemListUpdate.add(item);
+            }
+            if(syDeclarationElementsItemListUpdate.size()!=0){
+                syDeclarationElementsItemService.saveBatch(syDeclarationElementsItemListUpdate);
+            }
+        }
+        return syDeclarationElements;
+    }
+}

+ 196 - 14
jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/shippingDetails/controller/SyShippingDetailsController.java

@@ -1,5 +1,6 @@
 package org.jeecg.modules.documents.shippingDetails.controller;
 
+import java.text.SimpleDateFormat;
 import java.util.Arrays;
 import java.util.List;
 import java.util.Map;
@@ -8,11 +9,17 @@ import java.io.UnsupportedEncodingException;
 import java.net.URLDecoder;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
+
+import com.alibaba.fastjson.JSONObject;
 import org.jeecg.common.api.vo.Result;
 import org.jeecg.common.exception.JeecgBootException;
 import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.aspect.annotation.AutoLog;
 import org.jeecg.common.util.oConvertUtils;
+import org.jeecg.modules.documents.seclarationElements.entity.SyDeclarationElements;
+import org.jeecg.modules.documents.seclarationElements.entity.SyDeclarationElementsItem;
+import org.jeecg.modules.documents.seclarationElements.service.ISyDeclarationElementsItemService;
+import org.jeecg.modules.documents.seclarationElements.service.ISyDeclarationElementsService;
 import org.jeecg.modules.documents.shippingDetails.entity.SyShippingDetails;
 import org.jeecg.modules.documents.shippingDetails.entity.SyShippingDetailsItem;
 import org.jeecg.modules.documents.shippingDetails.entity.VO.OrderDataVo;
@@ -20,11 +27,17 @@ import org.jeecg.modules.documents.shippingDetails.entity.VO.SyShippingDetailsVo
 import org.jeecg.modules.documents.shippingDetails.service.ISyShippingDetailsItemService;
 import org.jeecg.modules.documents.shippingDetails.service.ISyShippingDetailsService;
 import java.util.Date;
+import java.util.logging.SimpleFormatter;
+
 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 org.jeecg.common.system.base.controller.JeecgController;
+import org.jeecg.modules.openApi.entity.DxpDataPlan;
+import org.jeecg.modules.openApi.service.IDxpDataPlanService;
+import org.jeecg.modules.system.util.InterfaceConnUtils;
+import org.jeecg.modules.system.util.JsonChangeUtils;
 import org.jeecgframework.poi.excel.ExcelImportUtil;
 import org.jeecgframework.poi.excel.def.NormalExcelConstants;
 import org.jeecgframework.poi.excel.entity.ExportParams;
@@ -55,6 +68,12 @@ public class SyShippingDetailsController extends JeecgController<SyShippingDetai
 	private ISyShippingDetailsService syShippingDetailsService;
 	@Autowired
 	private ISyShippingDetailsItemService syShippingDetailsItemService;
+	@Autowired
+	private IDxpDataPlanService iDxpDataPlanService;
+	@Autowired
+	private ISyDeclarationElementsService syDeclarationElementsService;
+	 @Autowired
+	private ISyDeclarationElementsItemService syDeclarationElementsItemService;
 	
 	/**
 	 * 分页列表查询
@@ -68,12 +87,30 @@ public class SyShippingDetailsController extends JeecgController<SyShippingDetai
 	@AutoLog(value = "发运明细主表-分页列表查询")
 	@ApiOperation(value="发运明细主表-分页列表查询", notes="发运明细主表-分页列表查询")
 	@GetMapping(value = "/list")
-	public Result<IPage<SyShippingDetailsVo>> queryPageList(SyShippingDetailsVo syShippingDetails,
+	public Result<IPage<SyShippingDetailsVo>> queryPageList(SyShippingDetailsVo syShippingDetails,String startTime,String endTime,
 								   @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
 								   @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
 								   HttpServletRequest req) {
 		Result<IPage<SyShippingDetailsVo>> result = new Result<IPage<SyShippingDetailsVo>>();
-		QueryWrapper<SyShippingDetailsVo> queryWrapper = QueryGenerator.initQueryWrapper(syShippingDetails, req.getParameterMap());
+		QueryWrapper<SyShippingDetailsVo> queryWrapper = new QueryWrapper<>();
+		SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd");
+		if(oConvertUtils.isNotEmpty(syShippingDetails.getDocumentNo())){
+			queryWrapper.eq("t.documentNo",syShippingDetails.getDocumentNo());
+		}
+		if(oConvertUtils.isNotEmpty(startTime)){
+
+		    queryWrapper.ge("t.documentDate",startTime);
+			queryWrapper.le("t.documentDate",endTime);
+		}
+		if(oConvertUtils.isNotEmpty(syShippingDetails.getPreDeliveryDate())){
+			queryWrapper.eq("t.preDeliveryDate",syShippingDetails.getPreDeliveryDate());
+		}
+		if(oConvertUtils.isNotEmpty(syShippingDetails.getSalesman())){
+			queryWrapper.eq("t.salesman",syShippingDetails.getSalesman());
+		}
+		if(oConvertUtils.isNotEmpty(syShippingDetails.getItemNumber())){
+			queryWrapper.eq("t.itemNumber",syShippingDetails.getItemNumber());
+		}
 		Page<SyShippingDetailsVo> page = new Page<SyShippingDetailsVo>(pageNo, pageSize);
 		IPage<SyShippingDetailsVo> pageList = syShippingDetailsService.queryShippingDetails(page, queryWrapper);
 		result.setSuccess(true);
@@ -169,16 +206,22 @@ public class SyShippingDetailsController extends JeecgController<SyShippingDetai
 		Result<Integer> result = new Result<>();
 
 		if(oConvertUtils.isEmpty(id)){
-			throw new JeecgBootException("ID不能为空!");
+			result.setMessage("ID不能为空!");
+			result.setSuccess(false);
+			return result;
 		}
 		//判断是由有该数据
 		SyShippingDetails shippingDetails = syShippingDetailsService.getById(id);
 		if(oConvertUtils.isEmpty(shippingDetails)){
-			throw new JeecgBootException("未找到该数据!");
+			result.setMessage("未找到该数据!");
+			result.setSuccess(false);
+			return result;
 		}
 		//判断是否已提交
 		if(shippingDetails.getState().equals("1")){
-			throw new JeecgBootException("该单据已提交,不允许删除!");
+			result.setMessage("该单据已提交,不允许删除!");
+			result.setSuccess(false);
+			return result;
 		}
 
 		int size = syShippingDetailsService.syShippingDetailsDelete(id);
@@ -294,23 +337,29 @@ public class SyShippingDetailsController extends JeecgController<SyShippingDetai
 	  try {
 
 		  if(oConvertUtils.isEmpty(id)){
-			  throw new JeecgBootException("未拿到ID");
+			  result.setMessage("未拿到ID");
+			  result.setSuccess(false);
+			  return  result;
 		  }
 		  //判断是否有该数据
 		  SyShippingDetails shippingDetails = syShippingDetailsService.getById(id);
 		  if(oConvertUtils.isEmpty(shippingDetails)){
-			  throw new JeecgBootException("未找到该数据!");
+			  result.setMessage("未找到该数据!");
+			  result.setSuccess(false);
+			  return  result;
 		  }
 		  //判断是否已提交
 		  if(shippingDetails.getState().equals("1")){
-			  throw new JeecgBootException("该单据已提交,不允许再次提交!");
+			  result.setMessage("该单据已提交,不允许再次提交!");
+			  result.setSuccess(false);
+			  return  result;
+		  }
+		  int i = syShippingDetailsService.syShippingDetailsSubmit(id);
+		  if(i>0){
+			  result.setMessage("提交成功!");
+			  result.setSuccess(true);
+			  result.setResult(shippingDetails);
 		  }
-		  shippingDetails.setState("1");
-		  syShippingDetailsService.updateById(shippingDetails);
-
-		  result.setMessage("提交成功!");
-		  result.setSuccess(true);
-		  result.setResult(shippingDetails);
 
 	  }catch (Exception ex){
 		  ex.printStackTrace();
@@ -361,4 +410,137 @@ public class SyShippingDetailsController extends JeecgController<SyShippingDetai
 
 	  return result;
   }
+
+
+	 /**
+	  *发运明细推送接口
+	  * @param id
+	  * @return
+	  */
+  public JSONObject pushSyShipping(String id){
+
+	  JSONObject result = new JSONObject();
+
+	  try {
+
+	  //查询主表
+	  SyShippingDetails shippingDetails = syShippingDetailsService.getById(id);
+	  //查询子表
+	  QueryWrapper<SyShippingDetailsItem> syShippingDetailsItemQueryWrapper = new QueryWrapper<SyShippingDetailsItem>();
+	  syShippingDetailsItemQueryWrapper.eq("shipping_details_id",shippingDetails.getId()).eq("del_flag",0);
+	  List<SyShippingDetailsItem> syShippingDetailsItemList = syShippingDetailsItemService.list(syShippingDetailsItemQueryWrapper);
+	  if(syShippingDetailsItemList.size()!=0){
+		  shippingDetails.setSyShippingDetailsItemList(syShippingDetailsItemList);
+	  }
+	      //转JSON
+		  result.put("payload", JSONObject.toJSON(shippingDetails));
+		  log.info("JSON数据:" + result);
+
+		  //查询IP及账套信息、时间戳
+		  QueryWrapper<DxpDataPlan> queryWrapper = new QueryWrapper<>();
+		  queryWrapper.eq("code", "senYu_syShipping");
+		  Page<DxpDataPlan> page = new Page<DxpDataPlan>(1, 100);
+		  IPage<DxpDataPlan> pageList = iDxpDataPlanService.page(page, queryWrapper);
+		  List<DxpDataPlan> resultList = pageList.getRecords();
+		  //拼接url
+		  String url = resultList.get(0).getItemIp() + resultList.get(0).getItemUrl();
+		  //调用doPost
+		  InterfaceConnUtils interfaceConnUtils = new InterfaceConnUtils();
+		  //处理返回信息
+		  JSONObject  informationJson = interfaceConnUtils.doPostToBearer(result, url,null, "发运明细接口-");
+		  //获取返回信息
+		  JSONObject jsonArray = informationJson.getJSONObject("payload");
+
+	  }catch (Exception ex){
+
+		  ex.printStackTrace();
+		  log.error("提交失败:" + ex.getMessage());
+	  }
+	  return  result;
+  }
+
+
+	 /**
+	  * 查询报关要素
+	  * @param hsCode
+	  * @param request
+	  * @param response
+	  * @return
+	  */
+	 @AutoLog(value = "查询报关要素")
+	 @ApiOperation(value="查询报关要素", notes="查询报关要素")
+	 @GetMapping(value = "/queryDeclarationElements")
+  public Result<SyDeclarationElements> queryDeclarationElements(String hsCode,
+																HttpServletRequest request, HttpServletResponse response){
+
+  	Result<SyDeclarationElements> result = new Result<SyDeclarationElements>();
+
+  	if(oConvertUtils.isEmpty(hsCode)){
+  		result.setMessage("HsCode没有获取到!");
+  		result.setSuccess(false);
+  		return result;
+	}
+  	     //查询报关要素主表
+		 QueryWrapper<SyDeclarationElements> queryWrapper = new QueryWrapper<SyDeclarationElements>();
+  	     queryWrapper.eq("hs_code",hsCode).eq("del_flag",0);
+  	     List<SyDeclarationElements> syDeclarationElements = syDeclarationElementsService.list(queryWrapper);
+		 if(syDeclarationElements.size()==0){
+			 SyDeclarationElements syDeclarationElementsEntityNull = new SyDeclarationElements();
+			 result.setMessage("查询成功!");
+			 result.setSuccess(true);
+			 result.setResult(syDeclarationElementsEntityNull);
+		 }else {
+			 SyDeclarationElements syDeclarationElementsEntity = syDeclarationElements.get(0);
+			 //查询报关要素子表
+			 QueryWrapper<SyDeclarationElementsItem> queryWrapperItem = new QueryWrapper<SyDeclarationElementsItem>();
+			 queryWrapperItem.eq("sy_declaration_elements_id", syDeclarationElementsEntity.getId()).eq("del_flag", 0);
+			 List<SyDeclarationElementsItem> syDeclarationElementsItemsList = syDeclarationElementsItemService.list(queryWrapperItem);
+			 syDeclarationElementsEntity.setSyDeclarationElementsItemList(syDeclarationElementsItemsList);
+
+			 result.setMessage("查询成功!");
+			 result.setSuccess(true);
+			 result.setResult(syDeclarationElementsEntity);
+		 }
+
+  	     return result;
+  }
+
+
+	 /**
+	  * 报关要素新增
+	  * @param syDeclarationElements
+	  * @return
+	  */
+	 @AutoLog(value = "新增报关要素")
+	 @ApiOperation(value="新增报关要素", notes="新增报关要素")
+	 @GetMapping(value = "/syDeclarationElementsAdd")
+	 public Result<SyDeclarationElements> syDeclarationElementsAdd(@RequestBody  SyDeclarationElements syDeclarationElements){
+
+		 Result<SyDeclarationElements> result = new Result<SyDeclarationElements>();
+			try {
+
+			if(oConvertUtils.isEmpty(syDeclarationElements)){
+				result.setMessage("实体对象不能为空!");
+				result.setSuccess(false);
+				return  result;
+			}
+			List<SyDeclarationElementsItem> items = syDeclarationElements.getSyDeclarationElementsItemList();
+			if(items.size()==0){
+				result.setMessage("实体对象子表信息不能为空!");
+				result.setSuccess(false);
+				return  result;
+			}
+			 SyDeclarationElements syDeclarationElementsAdd = syDeclarationElementsService.syDeclarationElementsAdd(syDeclarationElements);
+
+			result.setResult(syDeclarationElementsAdd);
+			result.setMessage("新增成功!");
+			result.setSuccess(true);
+
+			}catch (Exception ex){
+				ex.printStackTrace();
+				log.error("提交失败:" + ex.getMessage());
+				result.error500("提交失败:" + ex.getMessage());
+			}
+		 return result;
+	 }
 }

+ 3 - 3
jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/shippingDetails/entity/VO/OrderDataVo.java

@@ -16,9 +16,9 @@ public class OrderDataVo {
     @ApiModelProperty(value = "订单号")
     private java.lang.String orderNumber;
     /**订单日期*/
-    @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")
+    @Excel(name = "订单日期", width = 20, format = "yyyy-MM-dd")
+    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern="yyyy-MM-dd")
     @ApiModelProperty(value = "订单日期")
     private java.util.Date orderDate;
 

+ 133 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/shippingDetails/entity/VO/SyShippingDetailsVo.java

@@ -32,6 +32,16 @@ public class SyShippingDetailsVo {
     @ApiModelProperty(value = "订单号")
     private java.lang.String orderNumber;
 
+    /**客户简称*/
+    @Excel(name = "客户", width = 15)
+    @ApiModelProperty(value = "客户")
+    private java.lang.String customer;
+
+    /**报关品名*/
+    @Excel(name = "报关品名", width = 15)
+    @ApiModelProperty(value = "报关品名")
+    private java.lang.String declarationName;
+
     /**客户简称*/
     @Excel(name = "客户简称", width = 15)
     @ApiModelProperty(value = "客户简称")
@@ -57,6 +67,16 @@ public class SyShippingDetailsVo {
     @ApiModelProperty(value = "packId")
     private java.lang.String packId;
 
+    /**订单数量*/
+    @Excel(name = "订单数量", width = 15)
+    @ApiModelProperty(value = "订单数量")
+    private java.math.BigDecimal orderQuantity;
+
+    /**订单剩余数量*/
+    @Excel(name = "订单剩余数量", width = 15)
+    @ApiModelProperty(value = "订单剩余数量")
+    private java.math.BigDecimal orderRemainingQuantity;
+
     /**预发货日期*/
     @Excel(name = "预发货日期", width = 20, format = "yyyy-MM-dd")
     @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@@ -127,4 +147,117 @@ public class SyShippingDetailsVo {
     @ApiModelProperty(value = "成衣工厂")
     private String garmentFactory;
 
+    /**物料成分*/
+    @Excel(name = "物料成分", width = 15)
+    @ApiModelProperty(value = "物料成分")
+    private java.lang.String materialComposition;
+
+    /**客户名称*/
+    @Excel(name = "客户名称", width = 15)
+    @ApiModelProperty(value = "客户名称")
+    private java.lang.String customerName;
+
+    /**汇率*/
+    @Excel(name = "汇率", width = 15)
+    @ApiModelProperty(value = "汇率")
+    private java.math.BigDecimal exchangeRate;
+
+    /**整单合计*/
+    @Excel(name = "整单合计", width = 15)
+    @ApiModelProperty(value = "整单合计")
+    private java.math.BigDecimal wholeOrderTotal;
+
+    /**币种文本*/
+    @Excel(name = "币种文本", width = 15)
+    @ApiModelProperty(value = "币种文本")
+    private java.lang.String currencyText;
+
+    /**品牌方*/
+    @Excel(name = "品牌方", width = 15)
+    @ApiModelProperty(value = "品牌方")
+    private java.lang.String brandSide;
+
+    /**第三方*/
+    @Excel(name = "第三方", width = 15)
+    @ApiModelProperty(value = "第三方")
+    private java.lang.String thirdParty;
+
+    /**定金比例*/
+    @Excel(name = "定金比例", width = 15)
+    @ApiModelProperty(value = "定金比例")
+    private java.lang.String depositRatio;
+
+    /**账套*/
+    @Excel(name = "账套", width = 15)
+    @ApiModelProperty(value = "账套")
+    private java.lang.String acSetNo;
+
+    /**订单日期*/
+    @Excel(name = "订单日期", width = 20, format = "yyyy-MM-dd")
+    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern="yyyy-MM-dd")
+    @ApiModelProperty(value = "订单日期")
+    private java.util.Date orderDate;
+
+    /**定金*/
+    @Excel(name = "定金", width = 15)
+    @ApiModelProperty(value = "定金")
+    private java.math.BigDecimal deposit;
+
+    /**协同路线*/
+    @Excel(name = "协同路线", width = 15)
+    @ApiModelProperty(value = "协同路线")
+    private java.lang.String collaborativeRoute;
+
+    /**付款条件*/
+    @Excel(name = "付款条件", width = 15)
+    @ApiModelProperty(value = "付款条件")
+    private java.lang.String termOfPayment;
+
+    /**最终客户*/
+    @Excel(name = "最终客户", width = 15)
+    @ApiModelProperty(value = "最终客户")
+    private java.lang.String endCustomer;
+    /**价格备注*/
+    @Excel(name = "价格备注", width = 15)
+    @ApiModelProperty(value = "价格备注")
+    private java.lang.Object priceRemarks;
+    /**订单备注*/
+    @Excel(name = "订单备注", width = 15)
+    @ApiModelProperty(value = "订单备注")
+    private java.lang.Object orderRemarks;
+    /**订单说明*/
+    @Excel(name = "订单说明", width = 15)
+    @ApiModelProperty(value = "订单说明")
+    private java.lang.Object orderChangeDescription;
+
+    /**状态(0保存,1提交)*/
+    @Excel(name = "状态", width = 15)
+    @ApiModelProperty(value = "状态")
+    private String state;
+    /**推送状态*/
+    @Excel(name = "推送状态", width = 15)
+    @ApiModelProperty(value = "推送状态")
+    private String pushState;
+
+    /**业务类型文本*/
+    @Excel(name = "业务类型文本", width = 15)
+    @ApiModelProperty(value = "业务类型文本")
+    private java.lang.String businessTypeText;
+    /**客户订单*/
+    @Excel(name = "客户订单", width = 15)
+    @ApiModelProperty(value = "客户订单")
+    private java.lang.String customerOrder;
+
+    /**销售类型文本*/
+    @Excel(name = "销售类型文本", width = 15)
+    @ApiModelProperty(value = "销售类型文本")
+    private java.lang.String salesTypeText;
+
+    /**预完工日期*/
+    @Excel(name = "预完工日期", width = 20, format = "yyyy-MM-dd")
+    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern="yyyy-MM-dd")
+    @ApiModelProperty(value = "预完工日期")
+    private java.util.Date preCompletionDate;
 }

+ 13 - 9
jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/shippingDetails/mapper/xml/SyShippingDetailsMapper.xml

@@ -5,7 +5,7 @@
     <select id="queryOrderData" resultType="org.jeecg.modules.documents.shippingDetails.entity.VO.OrderDataVo">
 
         select a.order_number as orderNumber,b.item_number as itemNumber,b.small_po as smallPo,b.pk_org as pkOrg,a.order_date as orderDate,b.inventory_name as inventoryName,
-         b.colour as colour,b.size as size,b.coding_rules as codingRules,b.quantity as quantity,a.business_type_text as businessTypeText,a.customer_order_number as customerOrderNumber,
+         b.colour as colour,b.size as size,b.coding_rules as codingRules,b.quantity as quantity,a.business_type_text as businessTypeText,b.customer_order as customerOrder,
            a.sales_type_text as salesTypeText,a.customer_abbreviation as customerAbbreviation,a.customer_name as customerName,
            a.brand_side as brandSide,a.exchange_rate as exchangeRate,b.specification_and_model as specificationAndModel,
            a.whole_order_total as wholeOrderTotal,a.sales_department as salesDepartment,a.salesman as salesman,a.currency_text as currencyText,a.third_party as thirdParty,
@@ -19,14 +19,18 @@
     </select>
 
 <select id="queryShippingDetails" resultType="org.jeecg.modules.documents.shippingDetails.entity.VO.SyShippingDetailsVo">
-    select t.* from(select a.id as id,a.document_no as documentNo,a.document_date as documentDate,b.order_number as orderNumber,
-    b.customer_abbreviation as customerAbbreviation,b.sales_department as salesDepartment,b.salesman as salesman,
-    b.small_po as smallPo,b.pack_id as packId,a.pre_delivery_date as preDeliveryDate,
-    b.shipment_quantity as shipmentQuantity,b.customs_declaration_unit_price as customsDeclarationUnitPrice,
-    b.is_tc as isTc,a.hs_code as hsCode,b.distribution_point as distributionPoint,b.item_number as itemNumber,
-    b.arrival_date as arrivalDate,b.inventory_name as inventoryName,b.sales_unit_price as salesUnitPrice,
-    b.pur_or_sub_order as purOrSubOrder,b.order_type as orderType,b.factory_unit_price as factoryUnitPrice,
-    b.declaration_elements as declarationElements,b.number_of_sets as numberOfSets,b.chinese_name as chineseName,
+    select t.* from(select a.id as id,a.document_no as documentNo,a.document_date as documentDate,b.order_number as orderNumber,a.push_state,a.state,
+    b.customer_abbreviation as customerAbbreviation,b.sales_department as salesDepartment,b.salesman as salesman,a.customer as customer,
+    b.small_po as smallPo,b.pack_id as packId,a.pre_delivery_date as preDeliveryDate,a.declaration_name as declarationName,b.order_date as orderDate,
+    sum(b.shipment_quantity) as shipmentQuantity,b.customs_declaration_unit_price as customsDeclarationUnitPrice,b.order_quantity as orderQuantity,
+    b.is_tc as isTc,a.hs_code as hsCode,b.distribution_point as distributionPoint,b.item_number as itemNumber,b.business_type_text as businessTypeText,
+    b.arrival_date as arrivalDate,b.inventory_name as inventoryName,b.sales_unit_price as salesUnitPrice,b.order_remaining_quantity as orderRemainingQuantity,
+    b.pur_or_sub_order as purOrSubOrder,b.order_type as orderType,b.factory_unit_price as factoryUnitPrice,b.third_party as thirdParty,b.customer_order as customerOrder,
+    b.material_composition as materialComposition,b.currency_text as currencyText,b.brand_side as brandSide,b.deposit_ratio as depositRatio,
+    b.deposit as deposit,b.collaborative_route as collaborativeRoute,b.term_of_payment as termOfPayment,b.end_customer as endCustomer,
+    b.order_remarks as orderRemarks,b.price_remarks as priceRemarks,b.order_change_description as orderChangeDescription,a.pre_completion_date as preCompletionDate,
+    b.sales_type_text as salesTypeText,b.customer_name as customerName,b.exchange_rate as exchangeRate,b.whole_order_total as wholeOrderTotal,
+    b.declaration_elements as declarationElements,b.number_of_sets as numberOfSets,b.chinese_name as chineseName,b.ac_set_no as acSetNo,
     b.english_name as englishName,b.garment_factory as garmentFactory from sy_shipping_details a
 left join sy_shipping_details_item b
 on a.id = b.shipping_details_id and b.del_flag = 0

+ 2 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/shippingDetails/service/ISyShippingDetailsService.java

@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import org.apache.ibatis.annotations.Param;
 import org.jeecg.modules.documents.orderData.entity.SyOrderData;
+import org.jeecg.modules.documents.seclarationElements.entity.SyDeclarationElements;
 import org.jeecg.modules.documents.shippingDetails.entity.SyShippingDetails;
 import com.baomidou.mybatisplus.extension.service.IService;
 import org.jeecg.modules.documents.shippingDetails.entity.VO.OrderDataVo;
@@ -40,4 +41,5 @@ public interface ISyShippingDetailsService extends IService<SyShippingDetails> {
 
     //子表删除
     public void syshippingDetailsItemUpdate(String shippingDetailsId);
+
 }

+ 8 - 2
jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/shippingDetails/service/impl/SyShippingDetailsServiceImpl.java

@@ -163,8 +163,14 @@ public class SyShippingDetailsServiceImpl extends ServiceImpl<SyShippingDetailsM
      */
     @Override
     public int syShippingDetailsSubmit(String id) {
-
-        return 0;
+        int i = 0;
+        SyShippingDetails shippingDetails = getById(id);
+        if(oConvertUtils.isNotEmpty(shippingDetails)){
+            shippingDetails.setState("1");
+            updateById(shippingDetails);
+            i = 1;
+        }
+        return i;
     }
 
 

+ 6 - 3
jeecg-boot-module-system/src/main/java/org/jeecg/modules/openApi/controller/MOMainController.java

@@ -95,7 +95,7 @@ public class MOMainController implements ApplicationContextAware {
                 String ac = pkorgValue[1]; //or mo.dChangeVerifyTime >'"+lasttimeSf+"'
                 if (pkorgValue[0].equals("one")) {
                     String sql = "select mo.MOID as 'moId',mo.MOID as 'moId','"+ac+"' as accId,'"+pkorgValue[0]+"' as pkorg,mo.cState as 'poStatus'," +
-                            "mo.cCode as 'poNum','SUBCONTRACTOR_PO' as 'poType',mo.cVenCode as 'supplierNumber',ven.cVenName as 'supplierName'," +
+                            "mo.cCode as 'poNum','SUBCONTRACTOR_PO' as 'poType',ven.cVenDefine3 as 'supplierNumber',ven.cVenName as 'supplierName'," +
                             "ven.cVenPerson as 'supplierContacts',ven.cVenBranchPhone as 'supplierContactsPhone',mo.cPersonCode as 'salerCode',hr.cPsn_Num as 'headerAttributeString9'," +
                             "hr1.cPsn_Name as 'headerAttributeString10',mo.cMaker as 'customerContacts','采购业务实体名称' as poBusinessUnitCode," +
                             "'' as 'customerContactsPhone','0.00' as 'totalAmount','0.00' as 'exTaxAmount', curr.cexch_code as 'currencyCode'," +
@@ -120,7 +120,7 @@ public class MOMainController implements ApplicationContextAware {
                     }//mo.cPersonCode as 'salerId',hr.cPsn_Num as 'buyerId',
                 }else if(pkorgValue[0].equals("two")){
                     String sql = "select mo.MOID as 'moId',mo.MOID as 'moId','"+ac+"' as accId,'"+pkorgValue[0]+"' as pkorg,mo.cState as 'poStatus'," +
-                            "mo.cCode as 'poNum','SUBCONTRACTOR_PO' as 'poType',mo.cVenCode as 'supplierNumber',ven.cVenName as 'supplierName'," +
+                            "mo.cCode as 'poNum','SUBCONTRACTOR_PO' as 'poType',ven.cVenDefine3 as 'supplierNumber',ven.cVenName as 'supplierName'," +
                             "ven.cVenPerson as 'supplierContacts',ven.cVenBranchPhone as 'supplierContactsPhone',mo.cPersonCode as 'salerCode',hr.cPsn_Num as 'headerAttributeString9'," +
                             "hr1.cPsn_Name as 'headerAttributeString10',mo.cMaker as 'customerContacts','采购业务实体名称' as poBusinessUnitCode," +
                             "'' as 'customerContactsPhone','0.00' as 'totalAmount','0.00' as 'exTaxAmount', curr.cexch_code as 'currencyCode'," +
@@ -145,7 +145,7 @@ public class MOMainController implements ApplicationContextAware {
                     }//mo.cPersonCode as 'salerId',hr.cPsn_Num as 'buyerId',
                 }else if(pkorgValue[0].equals("three")){
                     String sql = "select mo.MOID as 'moId',mo.MOID as 'moId','"+ac+"' as accId,'"+pkorgValue[0]+"' as pkorg,mo.cState as 'poStatus'," +
-                            "mo.cCode as 'poNum','SUBCONTRACTOR_PO' as 'poType',mo.cVenCode as 'supplierNumber',ven.cVenName as 'supplierName'," +
+                            "mo.cCode as 'poNum','SUBCONTRACTOR_PO' as 'poType',ven.cVenDefine3 as 'supplierNumber',ven.cVenName as 'supplierName'," +
                             "ven.cVenPerson as 'supplierContacts',ven.cVenBranchPhone as 'supplierContactsPhone',mo.cPersonCode as 'salerCode',hr.cPsn_Num as 'headerAttributeString9'," +
                             "hr1.cPsn_Name as 'headerAttributeString10',mo.cMaker as 'customerContacts','采购业务实体名称' as poBusinessUnitCode," +
                             "'' as 'customerContactsPhone','0.00' as 'totalAmount','0.00' as 'exTaxAmount', curr.cexch_code as 'currencyCode'," +
@@ -177,6 +177,9 @@ public class MOMainController implements ApplicationContextAware {
                 for (Map<String, Object> map : sumlist) {
                     //转JSON且赋值
                     Gson userGson = new GsonBuilder().create();
+                    JSONObject jf = new JSONObject();
+                    jf.put("organizationId","32");
+                    result.put("pathVariableMap",jf);
                     result.put("payload", userGson.toJson(JsonChangeUtils.toMoMainJson(map)));
                     log.info("查询到的数据:" + result);
 

+ 6 - 4
jeecg-boot-module-system/src/main/java/org/jeecg/modules/openApi/controller/POPomainController.java

@@ -89,7 +89,7 @@ public class POPomainController implements ApplicationContextAware {
                 if (pkorgValue[0].equals("one")) {
                     //or cChangAuditTime >'"+lasttimeSf+"'
                     String sql = "select mo.POID as 'moId','"+ac+"' as accId,'"+pkorgValue[0]+"' as pkorg,mo.cState as 'poStatus',mo.cPOID as 'poNum','STANDARD_PO' as 'poType'," +
-                            "mo.cVenCode as 'supplierNumber','采购业务实体名称' as 'poBusinessUnitCode',ven.cVenName as 'supplierName',mo.cPersonCode as salerCode,hr.cPsn_Num as 'headerAttributeString9'," +
+                            "ven.cVenDefine3 as 'supplierNumber','采购业务实体名称' as 'poBusinessUnitCode',ven.cVenName as 'supplierName',mo.cPersonCode as salerCode,hr.cPsn_Num as 'headerAttributeString9'," +
                             "ven.cVenPerson as 'supplierContacts',ven.cVenBranchPhone as 'supplierContactsPhone'," +
                             "mo.cPOID as headerAttributeString2,'' as 'customerContactsPhone','0.00' as 'totalAmount'," +
                             "'0.00' as 'exTaxAmount', curr.cexch_code as 'currencyCode',mo.iTaxRate as 'headerTaxRate'," +
@@ -114,7 +114,7 @@ public class POPomainController implements ApplicationContextAware {
                 }
                 else if(pkorgValue[0].equals("two")){
                     String sql = "select mo.POID as 'moId','"+ac+"' as accId,'"+pkorgValue[0]+"' as pkorg,mo.cState as 'poStatus',mo.cPOID as 'poNum','STANDARD_PO' as 'poType'," +
-                            "mo.cVenCode as 'supplierNumber','采购业务实体名称' as 'poBusinessUnitCode',ven.cVenName as 'supplierName',mo.cPersonCode as salerCode,hr.cPsn_Num as 'headerAttributeString9'," +
+                            "ven.cVenDefine3 as 'supplierNumber','采购业务实体名称' as 'poBusinessUnitCode',ven.cVenName as 'supplierName',mo.cPersonCode as salerCode,hr.cPsn_Num as 'headerAttributeString9'," +
                             "ven.cVenPerson as 'supplierContacts',ven.cVenBranchPhone as 'supplierContactsPhone'," +
                             "mo.cPOID as headerAttributeString2,'' as 'customerContactsPhone','0.00' as 'totalAmount'," +
                             "'0.00' as 'exTaxAmount', curr.cexch_code as 'currencyCode',mo.iTaxRate as 'headerTaxRate'," +
@@ -138,7 +138,7 @@ public class POPomainController implements ApplicationContextAware {
 //hr.cPsn_Num as 'buyerId',mo.cPersonCode as salerId,
                 }else if(pkorgValue[0].equals("three")){
                     String sql = "select mo.POID as 'moId','"+ac+"' as accId,'"+pkorgValue[0]+"' as pkorg,mo.cState as 'poStatus',mo.cPOID as 'poNum','STANDARD_PO' as 'poType'," +
-                            "mo.cVenCode as 'supplierNumber','采购业务实体名称' as 'poBusinessUnitCode',ven.cVenName as 'supplierName',mo.cPersonCode as salerCode,hr.cPsn_Num as 'headerAttributeString9'," +
+                            "ven.cVenDefine3 as 'supplierNumber','采购业务实体名称' as 'poBusinessUnitCode',ven.cVenName as 'supplierName',mo.cPersonCode as salerCode,hr.cPsn_Num as 'headerAttributeString9'," +
                             "ven.cVenPerson as 'supplierContacts',ven.cVenBranchPhone as 'supplierContactsPhone'," +
                             "mo.cPOID as headerAttributeString2,'' as 'customerContactsPhone','0.00' as 'totalAmount'," +
                             "'0.00' as 'exTaxAmount', curr.cexch_code as 'currencyCode',mo.iTaxRate as 'headerTaxRate'," +
@@ -169,9 +169,11 @@ public class POPomainController implements ApplicationContextAware {
                 log.info("条数:"+sumlist.size());
                 //循环集合,一条一条传
                 for (Map<String, Object> map : sumlist) {
-                    //转JSON且赋值
                     //转JSON且赋值
                     Gson userGson = new GsonBuilder().create();
+                    JSONObject jf = new JSONObject();
+                    jf.put("organizationId","32");
+                    result.put("pathVariableMap",jf);
                     result.put("payload", userGson.toJson(JsonChangeUtils.toPoMainJson(map)));
 
                     log.info("查询到的数据:" + result);

+ 3 - 3
jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/util/JsonChangeUtils.java

@@ -484,7 +484,7 @@ public class JsonChangeUtils implements ApplicationContextAware{
             //查询委外用料子表数据
             if(map.get("pkorg").equals("one")){
 
-                String sql1 = "select '"+map.get("accId")+"' as accId,'"+map.get("MOID")+"' as poId,'"+map.get("poNum")+"' as poNum," +
+                String sql1 = "select MOMaterialsID as moMaterialsId,'"+map.get("accId")+"' as accId,'"+map.get("MOID")+"' as poId,'"+map.get("poNum")+"' as poNum," +
                         "mo.cInvCode as 'customerItemCode','' as 'itemAttrId','' as customerItemId,mo.iUnitQuantity as 'bomUsage'," +
                         "mo.cFree1 as cFree1,mo.cFree2 as cFree2,mo.cFree3 as cFree3,mo.cFree4 as cFree4," +
                         "mo.cFree5 as cFree5,mo.cFree6 as cFree6,mo.cFree7 as cFree7,mo.cFree8 as cFree8,mo.cFree9 as cFree9,mo.cFree10 as cFree10," +
@@ -497,7 +497,7 @@ public class JsonChangeUtils implements ApplicationContextAware{
                 jf.put("outSourceList",json);
             }else if(map.get("pkorg").equals("two")){
 
-                String sql1 = "select '"+map.get("accId")+"' as accId,'"+map.get("MOID")+"' as poId,'"+map.get("poNum")+"' as poNum," +
+                String sql1 = "select MOMaterialsID as moMaterialsId,'"+map.get("accId")+"' as accId,'"+map.get("MOID")+"' as poId,'"+map.get("poNum")+"' as poNum," +
                         "mo.cInvCode as 'customerItemCode','' as 'itemAttrId','' as customerItemId,mo.iUnitQuantity as 'bomUsage'," +
                         "mo.cFree1 as cFree1,mo.cFree2 as cFree2,mo.cFree3 as cFree3,mo.cFree4 as cFree4," +
                         "mo.cFree5 as cFree5,mo.cFree6 as cFree6,mo.cFree7 as cFree7,mo.cFree8 as cFree8,mo.cFree9 as cFree9,mo.cFree10 as cFree10," +
@@ -510,7 +510,7 @@ public class JsonChangeUtils implements ApplicationContextAware{
                 jf.put("outSourceList",json);
             }else if(map.get("pkorg").equals("three")){
 
-                String sql1 = "select '"+map.get("accId")+"' as accId,'"+map.get("MOID")+"' as poId,'"+map.get("poNum")+"' as poNum," +
+                String sql1 = "select MOMaterialsID as moMaterialsId,'"+map.get("accId")+"' as accId,'"+map.get("MOID")+"' as poId,'"+map.get("poNum")+"' as poNum," +
                         "mo.cInvCode as 'customerItemCode','' as 'itemAttrId','' as customerItemId,mo.iUnitQuantity as 'bomUsage'," +
                         "mo.cFree1 as cFree1,mo.cFree2 as cFree2,mo.cFree3 as cFree3,mo.cFree4 as cFree4," +
                         "mo.cFree5 as cFree5,mo.cFree6 as cFree6,mo.cFree7 as cFree7,mo.cFree8 as cFree8,mo.cFree9 as cFree9,mo.cFree10 as cFree10," +