Merge branch 'dev_New_kthg' of http://114.132.189.42:9002/r/product-inventory-management-after into dev_New_kthg
| | |
| | | LambdaQueryWrapper<ApproveProcess> approveProcessLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | | approveProcessLambdaQueryWrapper.eq(ApproveProcess::getApproveId, approveNode.getApproveProcessId()) |
| | | .eq(ApproveProcess::getApproveDelete, 0) |
| | | .eq(ApproveProcess::getApproveStatus, 0) |
| | | .last("limit 1"); |
| | | ApproveProcess approveProcess = approveProcessMapper.selectOne(approveProcessLambdaQueryWrapper); |
| | | if(approveProcess == null) throw new RuntimeException("审批不存在"); |
| | |
| | | CUSTOMIZATION_STOCK_IN("0", "合格自定义入库"), |
| | | PRODUCTION_REPORT_STOCK_IN("2", "生产报工-入库"), |
| | | PURCHASE_STOCK_IN("7", "采购-入库"), |
| | | QUALITYINSPECT_STOCK_IN("11", "质检-合格入库"), |
| | | QUALITYINSPECT_STOCK_IN("6", "质检-合格入库"), |
| | | DEFECTIVE_PASS("11", "不合格-让步放行"); |
| | | |
| | | |
| | |
| | | public enum StockInUnQualifiedRecordTypeEnum implements BaseEnum<String> { |
| | | |
| | | |
| | | DEFECTIVE_SCRAP("5", "不合格处理-报废"), |
| | | DEFECTIVE_SCRAP("4", "不合格处理-报废"), |
| | | PRODUCTION_SCRAP("5", "生产报工-报废"), |
| | | CUSTOMIZATION_UNSTOCK_IN("9", "不合格自定义入库"), |
| | | QUALITYINSPECT_UNSTOCK_IN("12", "质检-不合格入库"); |
| | |
| | | package com.ruoyi.production.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.basic.pojo.Customer; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import com.ruoyi.production.dto.ProductOrderDto; |
| | | import com.ruoyi.production.pojo.ProcessRoute; |
| | | import com.ruoyi.production.pojo.ProductOrder; |
| | | import com.ruoyi.production.service.ProductOrderService; |
| | | import io.swagger.annotations.Api; |
| | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | | @RequestMapping("productOrder") |
| | | @RequestMapping("/productOrder") |
| | | @RestController |
| | | @Api(tags = "生产订单") |
| | | public class ProductOrderController { |
| | |
| | | * 工资 |
| | | */ |
| | | @ApiModelProperty(value = "工资") |
| | | @Excel(name = "工资") |
| | | private BigDecimal wages; |
| | | |
| | | /** |
| | |
| | | * 工时定额 |
| | | */ |
| | | @ApiModelProperty(value = "工时定额") |
| | | @Excel(name = "工时定额") |
| | | private BigDecimal workHours; |
| | | |
| | | /** |
| | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Excel; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime endTime; |
| | | |
| | | @ApiModelProperty(value = "生产日期") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime productionDate; |
| | | |
| | | |
| | | } |
| | |
| | | /** |
| | | * 工资定额 |
| | | */ |
| | | @Excel(name = "工资定额") |
| | | // @Excel(name = "工资定额") |
| | | private BigDecimal salaryQuota; |
| | | |
| | | /** |
| | |
| | | productionProductInput.setQuantity(productStructureDto.getUnitQuantity().multiply(dto.getQuantity())); |
| | | productionProductInput.setProductMainId(productionProductMain.getId()); |
| | | productionProductInputMapper.insert(productionProductInput); |
| | | stockUtils.substractStock(productStructureDto.getProductModelId(), productionProductInput.getQuantity(), StockOutQualifiedRecordTypeEnum.PRODUCTION_REPORT_STOCK_OUT.getCode(), productionProductMain.getId()); |
| | | |
| | | } |
| | | /*新增报工产出表*/ |
| | | // stockUtils.substractStock(productStructureDto.getProductModelId(), productionProductInput.getQuantity(), StockOutQualifiedRecordTypeEnum.PRODUCTION_REPORT_STOCK_OUT.getCode(), productionProductMain.getId()); |
| | | } /*新增报工产出表*/ |
| | | ProductionProductOutput productionProductOutput = new ProductionProductOutput(); |
| | | productionProductOutput.setProductMainId(productionProductMain.getId()); |
| | | productionProductOutput.setProductModelId(productProcessRouteItem.getProductModelId()); |
| | |
| | | /** 菜单ID */
|
| | | private Long menuId;
|
| | |
|
| | | public String getAppComponent() {
|
| | | return appComponent;
|
| | | }
|
| | |
|
| | | public void setAppComponent(String appComponent) {
|
| | | this.appComponent = appComponent;
|
| | | }
|
| | |
|
| | | /** 菜单名称 */
|
| | | private String menuName;
|
| | |
|
| | |
| | |
|
| | | /** 组件路径 */
|
| | | private String component;
|
| | |
|
| | | /** APP组件路径 */
|
| | | private String appComponent;
|
| | |
|
| | | /** 路由参数 */
|
| | | private String query;
|
| | |
| | | .append("isFrame", getIsFrame())
|
| | | .append("IsCache", getIsCache())
|
| | | .append("menuType", getMenuType())
|
| | | .append("appComponent", getAppComponent())
|
| | | .append("visible", getVisible())
|
| | | .append("status ", getStatus())
|
| | | .append("perms", getPerms())
|
| | |
| | | addressEnabled: false |
| | | # 验证码类型 math 数字计算 char 字符验证 |
| | | captchaType: math |
| | | |
| | | # 协同审批编号前缀(配置文件后缀命名) |
| | | approvalNumberPrefix: DEV |
| | | # 开发环境配置 |
| | | server: |
| | | # 服务器的HTTP端口,默认为8080 |
| | |
| | | <result property="salesLedgerId" column="sales_ledger_id"/> |
| | | <result property="routeId" column="route_id"/> |
| | | <result property="npsNo" column="nps_no"/> |
| | | <result property="productionDate" column="production_date"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="updateTime" column="update_time"/> |
| | | </resultMap> |
| | |
| | | |
| | | <select id="invoiceRegistrationProductPage" resultType="com.ruoyi.sales.dto.InvoiceRegistrationProductDto"> |
| | | SELECT |
| | | T1.id , |
| | | T1.sales_ledger_id , |
| | | T1.sales_ledger_product_id , |
| | | T1.invoice_registration_id , |
| | | T1.product_category , |
| | | T1.specification_model , |
| | | T1.unit , |
| | | T1.quantity , |
| | | T1.tax_rate , |
| | | T1.tax_inclusive_unit_price , |
| | | T1.tax_inclusive_total_price , |
| | | T1.tax_exclusive_total_price , |
| | | T1.invoice_type , |
| | | T1.invoice_num , |
| | | T1.invoice_amount , |
| | | T1.no_invoice_num , |
| | | T1.no_invoice_amount , |
| | | T1.create_time , |
| | | T1.create_user , |
| | | T1.update_time , |
| | | T1.update_user , |
| | | T1.tenant_id, |
| | | T2.sales_contract_no, |
| | | T2.customer_contract_no, |
| | | T2.customer_name, |
| | | T3.invoice_no, |
| | | T3.id as invoice_ledger_id, |
| | | IFNULL(T3.invoice_total,0) AS invoice_total, |
| | | T3.invoice_person, |
| | | T3.invoice_date, |
| | | T4.invoiceFileName, |
| | | T2.project_name |
| | | T1.id , |
| | | T1.sales_ledger_id , |
| | | T1.sales_ledger_product_id , |
| | | T1.invoice_registration_id , |
| | | T1.product_category , |
| | | T1.specification_model , |
| | | T1.unit , |
| | | T1.quantity , |
| | | T1.tax_rate , |
| | | T1.tax_inclusive_unit_price , |
| | | T1.tax_inclusive_total_price , |
| | | T1.tax_exclusive_total_price , |
| | | T1.invoice_type , |
| | | T1.invoice_num , |
| | | T1.invoice_amount , |
| | | T1.no_invoice_num , |
| | | T1.no_invoice_amount , |
| | | T1.create_time , |
| | | T1.create_user , |
| | | T1.update_time , |
| | | T1.update_user , |
| | | T1.tenant_id, |
| | | T2.sales_contract_no, |
| | | T2.customer_contract_no, |
| | | T2.customer_name, |
| | | T3.invoice_no, |
| | | T3.id as invoice_ledger_id, |
| | | IFNULL(T3.invoice_total,0) AS invoice_total, |
| | | T3.invoice_person, |
| | | T3.invoice_date, |
| | | T4.invoiceFileName, |
| | | T2.project_name, |
| | | u.nick_name as invoicePerson |
| | | FROM invoice_registration_product T1 |
| | | LEFT JOIN sales_ledger T2 ON T1.sales_ledger_id = T2.id |
| | | LEFT JOIN sys_user u ON u.user_id = T1.create_user |
| | | RIGHT JOIN invoice_ledger T3 ON T1.id = T3.invoice_registration_product_id |
| | | LEFT JOIN ( |
| | | SELECT |
| | | invoice_ledger_id, |
| | | GROUP_CONCAT( name ORDER BY id ASC SEPARATOR ' | ') AS invoiceFileName |
| | | FROM invoice_ledger_file GROUP BY invoice_ledger_id |
| | | SELECT |
| | | invoice_ledger_id, |
| | | GROUP_CONCAT( name ORDER BY id ASC SEPARATOR ' | ') AS invoiceFileName |
| | | FROM invoice_ledger_file GROUP BY invoice_ledger_id |
| | | ) T4 ON T4.invoice_ledger_id = T3.id |
| | | <where> |
| | | <if test="invoiceRegistrationProductDto.searchText != null and invoiceRegistrationProductDto.searchText != '' "> |
| | | AND (T2.sales_contract_no LIKE CONCAT('%',#{invoiceRegistrationProductDto.searchText},'%') |
| | | OR |
| | | T2.customer_name LIKE CONCAT('%',#{invoiceRegistrationProductDto.searchText},'%') |
| | | ) |
| | | OR |
| | | T2.customer_name LIKE CONCAT('%',#{invoiceRegistrationProductDto.searchText},'%') |
| | | ) |
| | | </if> |
| | | <if test="invoiceRegistrationProductDto.invoiceDateStart != null and invoiceRegistrationProductDto.invoiceDateStart != ''"> |
| | | AND T3.invoice_date >= str_to_date(#{invoiceRegistrationProductDto.invoiceDateStart}, '%Y-%m-%d') |
| | | </if> |
| | | <if test="invoiceRegistrationProductDto.invoiceDateEnd != null and invoiceRegistrationProductDto.invoiceDateEnd != ''"> |
| | | AND T3.invoice_date < date_add(str_to_date(#{invoiceRegistrationProductDto.invoiceDateEnd}, '%Y-%m-%d'), interval 1 day) |
| | | AND T3.invoice_date < date_add(str_to_date(#{invoiceRegistrationProductDto.invoiceDateEnd}, |
| | | '%Y-%m-%d'), interval 1 day) |
| | | </if> |
| | | <if test="invoiceRegistrationProductDto.createTimeStart != null "> |
| | | AND T1.create_time >= date_format(#{invoiceRegistrationProductDto.createTimeStart}, '%Y-%m-%d %H:%i:%s') |
| | | AND T1.create_time >= date_format(#{invoiceRegistrationProductDto.createTimeStart}, '%Y-%m-%d |
| | | %H:%i:%s') |
| | | </if> |
| | | <if test="invoiceRegistrationProductDto.createTimeEnd != null "> |
| | | AND T1.create_time <= date_format(#{invoiceRegistrationProductDto.createTimeStart}, '%Y-%m-%d %H:%i:%s')+interval 1 day |
| | | AND T1.create_time <= date_format(#{invoiceRegistrationProductDto.createTimeStart}, '%Y-%m-%d |
| | | %H:%i:%s')+interval 1 day |
| | | </if> |
| | | </where> |
| | | ORDER BY T1.create_time DESC |
| | |
| | | <result property="parentId" column="parent_id" /> |
| | | <result property="orderNum" column="order_num" /> |
| | | <result property="path" column="path" /> |
| | | <result property="appComponent" column="app_component" /> |
| | | <result property="component" column="component" /> |
| | | <result property="query" column="query" /> |
| | | <result property="routeName" column="route_name" /> |
| | |
| | | </resultMap> |
| | | |
| | | <sql id="selectMenuVo"> |
| | | select menu_id, menu_name, parent_id, order_num, path, component, `query`, route_name, is_frame, is_cache, menu_type, visible, status, ifnull(perms,'') as perms, icon, create_time |
| | | select menu_id, menu_name, parent_id, order_num, path,app_component, component, `query`, route_name, is_frame, is_cache, menu_type, visible, status, ifnull(perms,'') as perms, icon, create_time |
| | | from sys_menu |
| | | </sql> |
| | | |
| | |
| | | </select> |
| | | |
| | | <select id="selectMenuTreeAll" resultMap="SysMenuResult"> |
| | | select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.`query`, m.route_name, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time |
| | | select distinct m.menu_id, m.parent_id, m.menu_name, m.path,m.app_component, m.component, m.`query`, m.route_name, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time |
| | | from sys_menu m where m.menu_type in ('M', 'C') and m.status = 0 |
| | | order by m.parent_id, m.order_num |
| | | </select> |
| | | |
| | | <select id="selectMenuListByUserId" parameterType="com.ruoyi.project.system.domain.SysMenu" resultMap="SysMenuResult"> |
| | | select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.`query`, m.route_name, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time |
| | | select distinct m.menu_id, m.parent_id, m.menu_name, m.path,m.app_component, m.component, m.`query`, m.route_name, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time |
| | | from sys_menu m |
| | | left join sys_role_menu rm on m.menu_id = rm.menu_id |
| | | left join sys_user_role ur on rm.role_id = ur.role_id |
| | |
| | | </select> |
| | | |
| | | <select id="selectMenuTreeByUserId" parameterType="Long" resultMap="SysMenuResult"> |
| | | select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.`query`, m.route_name, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time |
| | | select distinct m.menu_id, m.parent_id, m.menu_name, m.path,m.app_component, m.component, m.`query`, m.route_name, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time |
| | | from sys_menu m |
| | | left join sys_role_menu rm on m.menu_id = rm.menu_id |
| | | left join sys_user_role ur on rm.role_id = ur.role_id |
| | |
| | | <if test="orderNum != null">order_num = #{orderNum},</if> |
| | | <if test="path != null and path != ''">path = #{path},</if> |
| | | <if test="component != null">component = #{component},</if> |
| | | <if test="appComponent != null">app_component = #{appComponent},</if> |
| | | <if test="query != null">`query` = #{query},</if> |
| | | <if test="routeName != null">route_name = #{routeName},</if> |
| | | <if test="isFrame != null and isFrame != ''">is_frame = #{isFrame},</if> |
| | |
| | | <if test="menuName != null and menuName != ''">menu_name,</if> |
| | | <if test="orderNum != null">order_num,</if> |
| | | <if test="path != null and path != ''">path,</if> |
| | | <if test="appComponent != null and appComponent != ''">app_component,</if> |
| | | <if test="component != null and component != ''">component,</if> |
| | | <if test="query != null and query != ''">`query`,</if> |
| | | <if test="routeName != null">route_name,</if> |
| | |
| | | <if test="menuName != null and menuName != ''">#{menuName},</if> |
| | | <if test="orderNum != null">#{orderNum},</if> |
| | | <if test="path != null and path != ''">#{path},</if> |
| | | <if test="appComponent != null and appComponent != ''">#{appComponent},</if> |
| | | <if test="component != null and component != ''">#{component},</if> |
| | | <if test="query != null and query != ''">#{query},</if> |
| | | <if test="routeName != null">#{routeName},</if> |