diff --git a/ruoyi-admin/src/main/java/com/ruoyi/sales/controller/SalesShippingInformationController.java b/ruoyi-admin/src/main/java/com/ruoyi/sales/controller/SalesShippingInformationController.java new file mode 100644 index 00000000..b73a7f4e --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/sales/controller/SalesShippingInformationController.java @@ -0,0 +1,151 @@ +package com.ruoyi.sales.controller; + +import java.util.List; +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.ui.ModelMap; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; +import com.ruoyi.common.annotation.Log; +import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.sales.domain.SalesShippingInformation; +import com.ruoyi.sales.service.ISalesShippingInformationService; +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.common.core.page.TableDataInfo; + +/** + * 销售出货资料Controller + * + * @author 刘晓旭 + * @date 2024-09-02 + */ +@Controller +@RequestMapping("/sales/salesShippingInformation") +public class SalesShippingInformationController extends BaseController +{ + private String prefix = "sales/salesShippingInformation"; + + @Autowired + private ISalesShippingInformationService salesShippingInformationService; + + @RequiresPermissions("sales:salesShippingInformation:view") + @GetMapping() + public String salesShippingInformation() + { + return prefix + "/salesShippingInformation"; + } + + /** + * 查询销售出货资料列表 + */ + @RequiresPermissions("sales:salesShippingInformation:list") + @PostMapping("/list") + @ResponseBody + public TableDataInfo list(SalesShippingInformation salesShippingInformation) + { + startPage(); + List list = salesShippingInformationService.selectSalesShippingInformationList(salesShippingInformation); + return getDataTable(list); + } + + /** + * 导出销售出货资料列表 + */ + @RequiresPermissions("sales:salesShippingInformation:export") + @Log(title = "销售出货资料", businessType = BusinessType.EXPORT) + @PostMapping("/export") + @ResponseBody + public AjaxResult export(SalesShippingInformation salesShippingInformation) + { + List list = salesShippingInformationService.selectSalesShippingInformationList(salesShippingInformation); + ExcelUtil util = new ExcelUtil(SalesShippingInformation.class); + return util.exportExcel(list, "销售出货资料数据"); + } + + /** + * 新增销售出货资料 + */ + @GetMapping("/add") + public String add() + { + return prefix + "/add"; + } + + /** + * 新增保存销售出货资料 + */ + @RequiresPermissions("sales:salesShippingInformation:add") + @Log(title = "销售出货资料", businessType = BusinessType.INSERT) + @PostMapping("/add") + @ResponseBody + public AjaxResult addSave(SalesShippingInformation salesShippingInformation) + { + return toAjax(salesShippingInformationService.insertSalesShippingInformation(salesShippingInformation)); + } + + /** + * 修改销售出货资料 + */ + @GetMapping("/edit/{shippingInformationId}") + public String edit(@PathVariable("shippingInformationId") Long shippingInformationId, ModelMap mmap) + { + SalesShippingInformation salesShippingInformation = salesShippingInformationService.selectSalesShippingInformationById(shippingInformationId); + mmap.put("salesShippingInformation", salesShippingInformation); + return prefix + "/edit"; + } + + /** + * 修改保存销售出货资料 + */ + @RequiresPermissions("sales:salesShippingInformation:edit") + @Log(title = "销售出货资料", businessType = BusinessType.UPDATE) + @PostMapping("/edit") + @ResponseBody + public AjaxResult editSave(SalesShippingInformation salesShippingInformation) + { + return toAjax(salesShippingInformationService.updateSalesShippingInformation(salesShippingInformation)); + } + + /** + * 删除销售出货资料 + */ + @RequiresPermissions("sales:salesShippingInformation:remove") + @Log(title = "销售出货资料", businessType = BusinessType.DELETE) + @PostMapping( "/remove") + @ResponseBody + public AjaxResult remove(String ids) + { + return toAjax(salesShippingInformationService.deleteSalesShippingInformationByIds(ids)); + } + + /** + * 作废销售出货资料 + */ + @RequiresPermissions("sales:salesShippingInformation:cancel") + @Log(title = "销售出货资料", businessType = BusinessType.CANCEL) + @GetMapping( "/cancel/{id}") + @ResponseBody + public AjaxResult cancel(@PathVariable("id") Long id){ + return toAjax(salesShippingInformationService.cancelSalesShippingInformationById(id)); + } + + /** + * 恢复销售出货资料 + */ + @RequiresPermissions("sales:salesShippingInformation:restore") + @Log(title = "销售出货资料", businessType = BusinessType.RESTORE) + @GetMapping( "/restore/{id}") + @ResponseBody + public AjaxResult restore(@PathVariable("id")Long id) + { + return toAjax(salesShippingInformationService.restoreSalesShippingInformationById(id)); + } + + +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/sales/domain/SalesShippingInformation.java b/ruoyi-admin/src/main/java/com/ruoyi/sales/domain/SalesShippingInformation.java new file mode 100644 index 00000000..25c7cc9c --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/sales/domain/SalesShippingInformation.java @@ -0,0 +1,465 @@ +package com.ruoyi.sales.domain; + +import java.math.BigDecimal; +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.ruoyi.common.annotation.Excel; +import com.ruoyi.common.core.domain.BaseEntity; + +/** + * 销售出货资料对象 sales_shipping_information + * + * @author 刘晓旭 + * @date 2024-09-02 + */ +public class SalesShippingInformation extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 出货资料单id */ + private Long shippingInformationId; + + /** 出货资料单单号 */ + @Excel(name = "出货资料单单号") + private String shippingInformationCode; + + /** 关联销售订单号 */ + @Excel(name = "关联销售订单号") + private String salesOrderCode; + + /** 关联出库单号 */ + @Excel(name = "关联出库单号") + private String outOrderCode; + + /** 出货资料类型(0出货箱单、1出货发票、2销售出货单) */ + @Excel(name = "出货资料类型(0出货箱单、1出货发票、2销售出货单)") + private String shippingInformationType; + + /** 模板类型 */ + @Excel(name = "模板类型") + private String shippingTemplateType; + + /** 出库订单类型(0销售订单、1生产订单、2请购订单、3委外订单、4退换货订单、5开发修改单) */ + @Excel(name = "出库订单类型", readConverterExp = "0=销售订单、1生产订单、2请购订单、3委外订单、4退换货订单、5开发修改单") + private String warehouseOrderType; + + /** 出库类型(0销售出库、1生产领料、2员工领料、3委外领料、4公司退货、5工程领料) */ + @Excel(name = "出库类型", readConverterExp = "0=销售出库、1生产领料、2员工领料、3委外领料、4公司退货、5工程领料") + private String warehouseOutType; + + /** 业务人员 */ + @Excel(name = "业务人员") + private String businessMembers; + + /** 客户代码/id */ + @Excel(name = "客户代码/id") + private String customerId; + + /** 客户名称 */ + @Excel(name = "客户名称") + private String customerName; + + /** 客户订单号 */ + @Excel(name = "客户订单号") + private String salesOrderNumber; + + /** 发货日期 */ + private String deliveryDate; + + /** 客户订单号 */ + private String customerNumber; + + /** 物料合计 */ + @Excel(name = "物料合计") + private Long materialSum; + + /** 数量合计 */ + @Excel(name = "数量合计") + private Long enterpriseSum; + + /** 不含税总价(RMB) */ + @Excel(name = "不含税总价", readConverterExp = "R=MB") + private BigDecimal allPriceExcludingTaxRmb; + + /** 不含税总价(美元) */ + @Excel(name = "不含税总价", readConverterExp = "美=元") + private BigDecimal allPriceExcludingTaxDollar; + + /** 含税总价(RMB) */ + @Excel(name = "含税总价", readConverterExp = "R=MB") + private BigDecimal allPriceIncludesTax; + + /** 计划交付时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "计划交付时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date plannedDeliveryTime; + + /** 客户验收时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "客户验收时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date acceptanceTime; + + /** 付款条件 */ + @Excel(name = "付款条件") + private String paymentCondition; + + /** 交付条件 */ + @Excel(name = "交付条件") + private String deliveryCondition; + + /** 送货日期 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "送货日期", width = 30, dateFormat = "yyyy-MM-dd") + private Date deliverTime; + + /** 收货联系人(Ship to) */ + @Excel(name = "收货联系人(Ship to)") + private String customerContact; + + /** 联系电话(Ship to) */ + @Excel(name = "联系电话(Ship to)") + private String contactNumber; + + /** 收货地址(Ship to) */ + @Excel(name = "收货地址(Ship to)") + private String customerContactAddress; + + /** 收货联系人(Bill to) */ + @Excel(name = "收货联系人(Bill to)") + private String customerContactBillto; + + /** 联系电话(Bill to) */ + @Excel(name = "联系电话(Bill to)") + private String contactNumberBillto; + + /** 收货地址(Bill to) */ + @Excel(name = "收货地址(Bill to)") + private String contactAddressBillto; + + /** 备注 */ + @Excel(name = "备注") + private String remarks; + + public void setShippingInformationId(Long shippingInformationId) + { + this.shippingInformationId = shippingInformationId; + } + + public Long getShippingInformationId() + { + return shippingInformationId; + } + public void setShippingInformationCode(String shippingInformationCode) + { + this.shippingInformationCode = shippingInformationCode; + } + + public String getShippingInformationCode() + { + return shippingInformationCode; + } + public void setSalesOrderCode(String salesOrderCode) + { + this.salesOrderCode = salesOrderCode; + } + + public String getSalesOrderCode() + { + return salesOrderCode; + } + public void setOutOrderCode(String outOrderCode) + { + this.outOrderCode = outOrderCode; + } + + public String getOutOrderCode() + { + return outOrderCode; + } + public void setShippingInformationType(String shippingInformationType) + { + this.shippingInformationType = shippingInformationType; + } + + public String getShippingInformationType() + { + return shippingInformationType; + } + public void setShippingTemplateType(String shippingTemplateType) + { + this.shippingTemplateType = shippingTemplateType; + } + + public String getShippingTemplateType() + { + return shippingTemplateType; + } + public void setWarehouseOrderType(String warehouseOrderType) + { + this.warehouseOrderType = warehouseOrderType; + } + + public String getWarehouseOrderType() + { + return warehouseOrderType; + } + public void setWarehouseOutType(String warehouseOutType) + { + this.warehouseOutType = warehouseOutType; + } + + public String getWarehouseOutType() + { + return warehouseOutType; + } + public void setBusinessMembers(String businessMembers) + { + this.businessMembers = businessMembers; + } + + public String getBusinessMembers() + { + return businessMembers; + } + public void setCustomerId(String customerId) + { + this.customerId = customerId; + } + + public String getCustomerId() + { + return customerId; + } + public void setCustomerName(String customerName) + { + this.customerName = customerName; + } + + public String getCustomerName() + { + return customerName; + } + public void setSalesOrderNumber(String salesOrderNumber) + { + this.salesOrderNumber = salesOrderNumber; + } + + public String getSalesOrderNumber() + { + return salesOrderNumber; + } + public void setDeliveryDate(String deliveryDate) + { + this.deliveryDate = deliveryDate; + } + + public String getDeliveryDate() + { + return deliveryDate; + } + public void setCustomerNumber(String customerNumber) + { + this.customerNumber = customerNumber; + } + + public String getCustomerNumber() + { + return customerNumber; + } + public void setMaterialSum(Long materialSum) + { + this.materialSum = materialSum; + } + + public Long getMaterialSum() + { + return materialSum; + } + public void setEnterpriseSum(Long enterpriseSum) + { + this.enterpriseSum = enterpriseSum; + } + + public Long getEnterpriseSum() + { + return enterpriseSum; + } + public void setAllPriceExcludingTaxRmb(BigDecimal allPriceExcludingTaxRmb) + { + this.allPriceExcludingTaxRmb = allPriceExcludingTaxRmb; + } + + public BigDecimal getAllPriceExcludingTaxRmb() + { + return allPriceExcludingTaxRmb; + } + public void setAllPriceExcludingTaxDollar(BigDecimal allPriceExcludingTaxDollar) + { + this.allPriceExcludingTaxDollar = allPriceExcludingTaxDollar; + } + + public BigDecimal getAllPriceExcludingTaxDollar() + { + return allPriceExcludingTaxDollar; + } + public void setAllPriceIncludesTax(BigDecimal allPriceIncludesTax) + { + this.allPriceIncludesTax = allPriceIncludesTax; + } + + public BigDecimal getAllPriceIncludesTax() + { + return allPriceIncludesTax; + } + public void setPlannedDeliveryTime(Date plannedDeliveryTime) + { + this.plannedDeliveryTime = plannedDeliveryTime; + } + + public Date getPlannedDeliveryTime() + { + return plannedDeliveryTime; + } + public void setAcceptanceTime(Date acceptanceTime) + { + this.acceptanceTime = acceptanceTime; + } + + public Date getAcceptanceTime() + { + return acceptanceTime; + } + public void setPaymentCondition(String paymentCondition) + { + this.paymentCondition = paymentCondition; + } + + public String getPaymentCondition() + { + return paymentCondition; + } + public void setDeliveryCondition(String deliveryCondition) + { + this.deliveryCondition = deliveryCondition; + } + + public String getDeliveryCondition() + { + return deliveryCondition; + } + public void setDeliverTime(Date deliverTime) + { + this.deliverTime = deliverTime; + } + + public Date getDeliverTime() + { + return deliverTime; + } + public void setCustomerContact(String customerContact) + { + this.customerContact = customerContact; + } + + public String getCustomerContact() + { + return customerContact; + } + public void setContactNumber(String contactNumber) + { + this.contactNumber = contactNumber; + } + + public String getContactNumber() + { + return contactNumber; + } + public void setCustomerContactAddress(String customerContactAddress) + { + this.customerContactAddress = customerContactAddress; + } + + public String getCustomerContactAddress() + { + return customerContactAddress; + } + public void setCustomerContactBillto(String customerContactBillto) + { + this.customerContactBillto = customerContactBillto; + } + + public String getCustomerContactBillto() + { + return customerContactBillto; + } + public void setContactNumberBillto(String contactNumberBillto) + { + this.contactNumberBillto = contactNumberBillto; + } + + public String getContactNumberBillto() + { + return contactNumberBillto; + } + public void setContactAddressBillto(String contactAddressBillto) + { + this.contactAddressBillto = contactAddressBillto; + } + + public String getContactAddressBillto() + { + return contactAddressBillto; + } + public void setRemarks(String remarks) + { + this.remarks = remarks; + } + + public String getRemarks() + { + return remarks; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("shippingInformationId", getShippingInformationId()) + .append("shippingInformationCode", getShippingInformationCode()) + .append("salesOrderCode", getSalesOrderCode()) + .append("outOrderCode", getOutOrderCode()) + .append("shippingInformationType", getShippingInformationType()) + .append("shippingTemplateType", getShippingTemplateType()) + .append("warehouseOrderType", getWarehouseOrderType()) + .append("warehouseOutType", getWarehouseOutType()) + .append("businessMembers", getBusinessMembers()) + .append("customerId", getCustomerId()) + .append("customerName", getCustomerName()) + .append("salesOrderNumber", getSalesOrderNumber()) + .append("deliveryDate", getDeliveryDate()) + .append("customerNumber", getCustomerNumber()) + .append("materialSum", getMaterialSum()) + .append("enterpriseSum", getEnterpriseSum()) + .append("allPriceExcludingTaxRmb", getAllPriceExcludingTaxRmb()) + .append("allPriceExcludingTaxDollar", getAllPriceExcludingTaxDollar()) + .append("allPriceIncludesTax", getAllPriceIncludesTax()) + .append("plannedDeliveryTime", getPlannedDeliveryTime()) + .append("acceptanceTime", getAcceptanceTime()) + .append("paymentCondition", getPaymentCondition()) + .append("deliveryCondition", getDeliveryCondition()) + .append("deliverTime", getDeliverTime()) + .append("customerContact", getCustomerContact()) + .append("contactNumber", getContactNumber()) + .append("customerContactAddress", getCustomerContactAddress()) + .append("customerContactBillto", getCustomerContactBillto()) + .append("contactNumberBillto", getContactNumberBillto()) + .append("contactAddressBillto", getContactAddressBillto()) + .append("remarks", getRemarks()) + .append("createTime", getCreateTime()) + .append("createBy", getCreateBy()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .toString(); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/sales/mapper/SalesShippingInformationMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/sales/mapper/SalesShippingInformationMapper.java new file mode 100644 index 00000000..e17ff744 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/sales/mapper/SalesShippingInformationMapper.java @@ -0,0 +1,77 @@ +package com.ruoyi.sales.mapper; + +import java.util.List; +import com.ruoyi.sales.domain.SalesShippingInformation; + +/** + * 销售出货资料Mapper接口 + * + * @author 刘晓旭 + * @date 2024-09-02 + */ +public interface SalesShippingInformationMapper +{ + /** + * 查询销售出货资料 + * + * @param shippingInformationId 销售出货资料ID + * @return 销售出货资料 + */ + public SalesShippingInformation selectSalesShippingInformationById(Long shippingInformationId); + + /** + * 查询销售出货资料列表 + * + * @param salesShippingInformation 销售出货资料 + * @return 销售出货资料集合 + */ + public List selectSalesShippingInformationList(SalesShippingInformation salesShippingInformation); + + /** + * 新增销售出货资料 + * + * @param salesShippingInformation 销售出货资料 + * @return 结果 + */ + public int insertSalesShippingInformation(SalesShippingInformation salesShippingInformation); + + /** + * 修改销售出货资料 + * + * @param salesShippingInformation 销售出货资料 + * @return 结果 + */ + public int updateSalesShippingInformation(SalesShippingInformation salesShippingInformation); + + /** + * 删除销售出货资料 + * + * @param shippingInformationId 销售出货资料ID + * @return 结果 + */ + public int deleteSalesShippingInformationById(Long shippingInformationId); + + /** + * 批量删除销售出货资料 + * + * @param shippingInformationIds 需要删除的数据ID + * @return 结果 + */ + public int deleteSalesShippingInformationByIds(String[] shippingInformationIds); + + /** + * 作废销售出货资料 + * + * @param shippingInformationId 销售出货资料ID + * @return 结果 + */ + public int cancelSalesShippingInformationById(Long shippingInformationId); + + /** + * 恢复销售出货资料 + * + * @param shippingInformationId 销售出货资料ID + * @return 结果 + */ + public int restoreSalesShippingInformationById(Long shippingInformationId); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/sales/service/ISalesShippingInformationService.java b/ruoyi-admin/src/main/java/com/ruoyi/sales/service/ISalesShippingInformationService.java new file mode 100644 index 00000000..b9e46b65 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/sales/service/ISalesShippingInformationService.java @@ -0,0 +1,75 @@ +package com.ruoyi.sales.service; + +import java.util.List; +import com.ruoyi.sales.domain.SalesShippingInformation; + +/** + * 销售出货资料Service接口 + * + * @author 刘晓旭 + * @date 2024-09-02 + */ +public interface ISalesShippingInformationService +{ + /** + * 查询销售出货资料 + * + * @param shippingInformationId 销售出货资料ID + * @return 销售出货资料 + */ + public SalesShippingInformation selectSalesShippingInformationById(Long shippingInformationId); + + /** + * 查询销售出货资料列表 + * + * @param salesShippingInformation 销售出货资料 + * @return 销售出货资料集合 + */ + public List selectSalesShippingInformationList(SalesShippingInformation salesShippingInformation); + + /** + * 新增销售出货资料 + * + * @param salesShippingInformation 销售出货资料 + * @return 结果 + */ + public int insertSalesShippingInformation(SalesShippingInformation salesShippingInformation); + + /** + * 修改销售出货资料 + * + * @param salesShippingInformation 销售出货资料 + * @return 结果 + */ + public int updateSalesShippingInformation(SalesShippingInformation salesShippingInformation); + + /** + * 批量删除销售出货资料 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + public int deleteSalesShippingInformationByIds(String ids); + + /** + * 删除销售出货资料信息 + * + * @param shippingInformationId 销售出货资料ID + * @return 结果 + */ + public int deleteSalesShippingInformationById(Long shippingInformationId); + + /** + * 作废销售出货资料 + * @param shippingInformationId 销售出货资料ID + * @return + */ + int cancelSalesShippingInformationById(Long shippingInformationId); + + /** + * 恢复销售出货资料 + * @param shippingInformationId 销售出货资料ID + * @return + */ + int restoreSalesShippingInformationById(Long shippingInformationId); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/sales/service/impl/SalesShippingInformationServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/sales/service/impl/SalesShippingInformationServiceImpl.java new file mode 100644 index 00000000..48b79ef1 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/sales/service/impl/SalesShippingInformationServiceImpl.java @@ -0,0 +1,126 @@ +package com.ruoyi.sales.service.impl; + +import java.util.List; +import com.ruoyi.common.utils.DateUtils; +import com.ruoyi.common.utils.ShiroUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.ruoyi.sales.mapper.SalesShippingInformationMapper; +import com.ruoyi.sales.domain.SalesShippingInformation; +import com.ruoyi.sales.service.ISalesShippingInformationService; +import com.ruoyi.common.core.text.Convert; + +/** + * 销售出货资料Service业务层处理 + * + * @author 刘晓旭 + * @date 2024-09-02 + */ +@Service +public class SalesShippingInformationServiceImpl implements ISalesShippingInformationService +{ + @Autowired + private SalesShippingInformationMapper salesShippingInformationMapper; + + /** + * 查询销售出货资料 + * + * @param shippingInformationId 销售出货资料ID + * @return 销售出货资料 + */ + @Override + public SalesShippingInformation selectSalesShippingInformationById(Long shippingInformationId) + { + return salesShippingInformationMapper.selectSalesShippingInformationById(shippingInformationId); + } + + /** + * 查询销售出货资料列表 + * + * @param salesShippingInformation 销售出货资料 + * @return 销售出货资料 + */ + @Override + public List selectSalesShippingInformationList(SalesShippingInformation salesShippingInformation) + { + return salesShippingInformationMapper.selectSalesShippingInformationList(salesShippingInformation); + } + + /** + * 新增销售出货资料 + * + * @param salesShippingInformation 销售出货资料 + * @return 结果 + */ + @Override + public int insertSalesShippingInformation(SalesShippingInformation salesShippingInformation) + { + salesShippingInformation.setCreateTime(DateUtils.getNowDate()); + String loginName = ShiroUtils.getLoginName(); + salesShippingInformation.setCreateBy(loginName); + return salesShippingInformationMapper.insertSalesShippingInformation(salesShippingInformation); + } + + /** + * 修改销售出货资料 + * + * @param salesShippingInformation 销售出货资料 + * @return 结果 + */ + @Override + public int updateSalesShippingInformation(SalesShippingInformation salesShippingInformation) + { + String loginName = ShiroUtils.getLoginName(); + salesShippingInformation.setUpdateBy(loginName); + salesShippingInformation.setUpdateTime(DateUtils.getNowDate()); + return salesShippingInformationMapper.updateSalesShippingInformation(salesShippingInformation); + } + + /** + * 删除销售出货资料对象 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + @Override + public int deleteSalesShippingInformationByIds(String ids) + { + return salesShippingInformationMapper.deleteSalesShippingInformationByIds(Convert.toStrArray(ids)); + } + + /** + * 删除销售出货资料信息 + * + * @param shippingInformationId 销售出货资料ID + * @return 结果 + */ + @Override + public int deleteSalesShippingInformationById(Long shippingInformationId) + { + return salesShippingInformationMapper.deleteSalesShippingInformationById(shippingInformationId); + } + + /** + * 作废销售出货资料 + * + * @param shippingInformationId 销售出货资料ID + * @return 结果 + */ + @Override + public int cancelSalesShippingInformationById(Long shippingInformationId) + { + return salesShippingInformationMapper.cancelSalesShippingInformationById(shippingInformationId); + } + + /** + * 恢复销售出货资料信息 + * + * @param shippingInformationId 销售出货资料ID + * @return 结果 + */ + @Override + public int restoreSalesShippingInformationById(Long shippingInformationId) + { + return salesShippingInformationMapper.restoreSalesShippingInformationById(shippingInformationId); + } +} diff --git a/ruoyi-admin/src/main/resources/mapper/sales/SalesShippingInformationMapper.xml b/ruoyi-admin/src/main/resources/mapper/sales/SalesShippingInformationMapper.xml new file mode 100644 index 00000000..14c12a45 --- /dev/null +++ b/ruoyi-admin/src/main/resources/mapper/sales/SalesShippingInformationMapper.xml @@ -0,0 +1,204 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select shipping_information_id, shipping_information_code, sales_order_code, out_order_code, shipping_information_type, shipping_template_type, warehouse_order_type, warehouse_out_type, business_members, customer_id, customer_name, sales_order_number, delivery_date, customer_number, material_sum, enterprise_sum, all_price_excluding_tax_rmb, all_price_excluding_tax_dollar, all_price_includes_tax, planned_delivery_time, acceptance_time, payment_condition, delivery_condition, deliver_time, customer_contact, contact_number, customer_contact_address, customer_contact_billto, contact_number_billto, contact_address_billto, remarks, create_time, create_by, update_by, update_time from sales_shipping_information + + + + + + + + insert into sales_shipping_information + + shipping_information_code, + sales_order_code, + out_order_code, + shipping_information_type, + shipping_template_type, + warehouse_order_type, + warehouse_out_type, + business_members, + customer_id, + customer_name, + sales_order_number, + delivery_date, + customer_number, + material_sum, + enterprise_sum, + all_price_excluding_tax_rmb, + all_price_excluding_tax_dollar, + all_price_includes_tax, + planned_delivery_time, + acceptance_time, + payment_condition, + delivery_condition, + deliver_time, + customer_contact, + contact_number, + customer_contact_address, + customer_contact_billto, + contact_number_billto, + contact_address_billto, + remarks, + create_time, + create_by, + update_by, + update_time, + + + #{shippingInformationCode}, + #{salesOrderCode}, + #{outOrderCode}, + #{shippingInformationType}, + #{shippingTemplateType}, + #{warehouseOrderType}, + #{warehouseOutType}, + #{businessMembers}, + #{customerId}, + #{customerName}, + #{salesOrderNumber}, + #{deliveryDate}, + #{customerNumber}, + #{materialSum}, + #{enterpriseSum}, + #{allPriceExcludingTaxRmb}, + #{allPriceExcludingTaxDollar}, + #{allPriceIncludesTax}, + #{plannedDeliveryTime}, + #{acceptanceTime}, + #{paymentCondition}, + #{deliveryCondition}, + #{deliverTime}, + #{customerContact}, + #{contactNumber}, + #{customerContactAddress}, + #{customerContactBillto}, + #{contactNumberBillto}, + #{contactAddressBillto}, + #{remarks}, + #{createTime}, + #{createBy}, + #{updateBy}, + #{updateTime}, + + + + + update sales_shipping_information + + shipping_information_code = #{shippingInformationCode}, + sales_order_code = #{salesOrderCode}, + out_order_code = #{outOrderCode}, + shipping_information_type = #{shippingInformationType}, + shipping_template_type = #{shippingTemplateType}, + warehouse_order_type = #{warehouseOrderType}, + warehouse_out_type = #{warehouseOutType}, + business_members = #{businessMembers}, + customer_id = #{customerId}, + customer_name = #{customerName}, + sales_order_number = #{salesOrderNumber}, + delivery_date = #{deliveryDate}, + customer_number = #{customerNumber}, + material_sum = #{materialSum}, + enterprise_sum = #{enterpriseSum}, + all_price_excluding_tax_rmb = #{allPriceExcludingTaxRmb}, + all_price_excluding_tax_dollar = #{allPriceExcludingTaxDollar}, + all_price_includes_tax = #{allPriceIncludesTax}, + planned_delivery_time = #{plannedDeliveryTime}, + acceptance_time = #{acceptanceTime}, + payment_condition = #{paymentCondition}, + delivery_condition = #{deliveryCondition}, + deliver_time = #{deliverTime}, + customer_contact = #{customerContact}, + contact_number = #{contactNumber}, + customer_contact_address = #{customerContactAddress}, + customer_contact_billto = #{customerContactBillto}, + contact_number_billto = #{contactNumberBillto}, + contact_address_billto = #{contactAddressBillto}, + remarks = #{remarks}, + create_time = #{createTime}, + create_by = #{createBy}, + update_by = #{updateBy}, + update_time = #{updateTime}, + + where shipping_information_id = #{shippingInformationId} + + + + delete from sales_shipping_information where shipping_information_id = #{shippingInformationId} + + + + delete from sales_shipping_information where shipping_information_id in + + #{shippingInformationId} + + + + + update sales_shipping_information set del_flag = '1' where shipping_information_id = #{shippingInformationId} + + + + update sales_shipping_information set del_flag = '0' where shipping_information_id = #{shippingInformationId} + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/sales/salesShippingInformation/add.html b/ruoyi-admin/src/main/resources/templates/sales/salesShippingInformation/add.html new file mode 100644 index 00000000..0f92d488 --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/sales/salesShippingInformation/add.html @@ -0,0 +1,231 @@ + + + + + + + +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ + 代码生成请选择字典属性 +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+ + +
+
+
+
+ +
+
+ + +
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+ + +
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+ + + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/sales/salesShippingInformation/edit.html b/ruoyi-admin/src/main/resources/templates/sales/salesShippingInformation/edit.html new file mode 100644 index 00000000..bfc64d0c --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/sales/salesShippingInformation/edit.html @@ -0,0 +1,26 @@ + + + + + + +
+
+ +
+
+ + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/sales/salesShippingInformation/salesShippingInformation.html b/ruoyi-admin/src/main/resources/templates/sales/salesShippingInformation/salesShippingInformation.html new file mode 100644 index 00000000..f4138df6 --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/sales/salesShippingInformation/salesShippingInformation.html @@ -0,0 +1,270 @@ + + + + + + +
+
+
+
+
+
    +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + + - + +
  • +
  • +  搜索 +  重置 +
  • +
+
+
+
+ + +
+
+
+
+
+ + + + \ No newline at end of file