Merge branch 'dev_长治_健齿齿科器材' of http://114.132.189.42:9002/r/product-inventory-management-after into dev_长治_健齿齿科器材
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.production.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.production.dto.ProductParameterDto; |
| | | import com.ruoyi.production.service.ProductParameterService; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * åæ°é
置表 å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-03-14 01:38:54 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/productParameter") |
| | | public class ProductParameterController { |
| | | |
| | | @Autowired |
| | | private ProductParameterService productParameterService; |
| | | |
| | | |
| | | @ApiOperation("çäº§è®°å½ å页æ¥è¯¢") |
| | | @GetMapping("listPage") |
| | | @Log(title = "çäº§è®°å½ å页æ¥è¯¢", businessType = BusinessType.OTHER) |
| | | public AjaxResult page(ProductParameterDto productParameter, Page<ProductParameterDto> page) { |
| | | return AjaxResult.success(productParameterService.pageProductParameter(page, productParameter)); |
| | | } |
| | | |
| | | @ApiOperation("çäº§è®°å½ æ°å¢") |
| | | @PostMapping("/addProductParameter") |
| | | @Log(title = "çäº§è®°å½ æ°å¢", businessType = BusinessType.INSERT) |
| | | public AjaxResult addProductParameter(@RequestBody ProductParameterDto productParameter) { |
| | | productParameterService.addProductParameter(productParameter); |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("çäº§è®°å½ ä¿®æ¹") |
| | | @PutMapping("updProductParameter") |
| | | @Log(title = "çäº§è®°å½ ä¿®æ¹", businessType = BusinessType.UPDATE) |
| | | public AjaxResult updProductParameter(@RequestBody ProductParameterDto productParameter) { |
| | | productParameterService.updProductParameter(productParameter); |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | @ApiOperation("çäº§è®°å½ å é¤") |
| | | @DeleteMapping("/{ids}") |
| | | @Log(title = "çäº§è®°å½ å é¤", businessType = BusinessType.DELETE) |
| | | public AjaxResult delete(@PathVariable("ids") List<Long> ids) { |
| | | productParameterService.removeBatchByIds(ids); |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.production.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.production.dto.ProductProcessParameterDto; |
| | | import com.ruoyi.production.pojo.ProductProcessParameter; |
| | | import com.ruoyi.production.service.ProductProcessParameterService; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * å·¥åºåæ°è¡¨ å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-03-14 03:45:15 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/productProcessParameter") |
| | | public class ProductProcessParameterController { |
| | | |
| | | @Autowired |
| | | private ProductProcessParameterService productProcessParameterService; |
| | | |
| | | |
| | | @ApiOperation("å·¥åºçäº§è®°å½ å页æ¥è¯¢") |
| | | @GetMapping("listPage") |
| | | @Log(title = "å·¥åºçäº§è®°å½ å页æ¥è¯¢", businessType = BusinessType.OTHER) |
| | | public AjaxResult page(ProductProcessParameterDto productProcessParameter, Page<ProductProcessParameterDto> page) { |
| | | return AjaxResult.success(productProcessParameterService.pageProductProcessParameter(page, productProcessParameter)); |
| | | } |
| | | |
| | | @ApiOperation("å·¥åºçäº§è®°å½ æ°å¢å¤æ¡") |
| | | @PostMapping("/addProductProcessParameter/{processId}") |
| | | @Log(title = "å·¥åºçäº§è®°å½ æ°å¢å¤æ¡", businessType = BusinessType.INSERT) |
| | | public AjaxResult addProductProcessParameter(@RequestBody List<ProductProcessParameter> productProcessParameters, @PathVariable Long processId) { |
| | | productProcessParameterService.addProductProcessParameter(productProcessParameters, processId); |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("å·¥åºçäº§è®°å½ ä¿®æ¹") |
| | | @PutMapping("updProductProcessParameter") |
| | | @Log(title = "å·¥åºçäº§è®°å½ ä¿®æ¹", businessType = BusinessType.UPDATE) |
| | | public AjaxResult updProductProcessParameter(@RequestBody ProductProcessParameterDto productProcessParameter) { |
| | | productProcessParameterService.updateById(productProcessParameter); |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | @ApiOperation("å·¥åºçäº§è®°å½ å é¤å¤æ¡") |
| | | @DeleteMapping("/{ids}") |
| | | @Log(title = "å·¥åºçäº§è®°å½ å é¤å¤æ¡", businessType = BusinessType.DELETE) |
| | | public AjaxResult delete(@PathVariable("ids") List<Long> ids) { |
| | | productProcessParameterService.removeBatchByIds(ids); |
| | | return AjaxResult.success(); |
| | | } |
| | | } |
| | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | @RequestMapping("productionProductMain") |
| | | @RequestMapping("/productionProductMain") |
| | | @RestController |
| | | @Api(value = "ç产æ¥å·¥") |
| | | public class ProductionProductMainController { |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.production.dto; |
| | | |
| | | import com.ruoyi.production.pojo.ProductParameter; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author yuan |
| | | * @date 2026-03-14 13:42 |
| | | * @description |
| | | */ |
| | | @Data |
| | | public class ProductParameterDto extends ProductParameter { |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.production.dto; |
| | | |
| | | import com.ruoyi.production.pojo.ProductProcessParameter; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | /** |
| | | * @author yuan |
| | | * @date 2026-03-14 15:47 |
| | | * @description |
| | | */ |
| | | @EqualsAndHashCode(callSuper = true) |
| | | @Data |
| | | public class ProductProcessParameterDto extends ProductProcessParameter { |
| | | } |
| | |
| | | private BigDecimal workHours; |
| | | private BigDecimal wages; |
| | | |
| | | @ApiModelProperty(value = "æå
¥æ»é(kg)") |
| | | private BigDecimal totalInvestment; |
| | | |
| | | private BigDecimal inspectedQuantity; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.production.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.production.dto.ProductParameterDto; |
| | | import com.ruoyi.production.pojo.ProductParameter; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | | * åæ°é
置表 Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-03-14 01:38:54 |
| | | */ |
| | | @Mapper |
| | | public interface ProductParameterMapper extends BaseMapper<ProductParameter> { |
| | | |
| | | IPage<ProductParameterDto> pageProductParameter(@Param("page") Page<ProductParameterDto> page, @Param("productParameter") ProductParameterDto productParameter); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.production.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.production.dto.ProductProcessParameterDto; |
| | | import com.ruoyi.production.pojo.ProductProcessParameter; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | | * å·¥åºåæ°è¡¨ Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-03-14 03:45:15 |
| | | */ |
| | | @Mapper |
| | | public interface ProductProcessParameterMapper extends BaseMapper<ProductProcessParameter> { |
| | | |
| | | IPage<ProductProcessParameterDto> pageProductProcessParameter(@Param("page") Page<ProductProcessParameterDto> page, @Param("productProcessParameter") ProductProcessParameterDto productProcessParameter); |
| | | } |
| | |
| | | * å¶é çç» |
| | | */ |
| | | private String manufacturingTeam; |
| | | |
| | | /** |
| | | * æ¹å· |
| | | */ |
| | | @ApiModelProperty(value = "æ¹å·") |
| | | @Excel(name = "æ¹å·") |
| | | private String batchNo; |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.production.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * åæ°é
置表 |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-03-14 01:38:54 |
| | | */ |
| | | @Data |
| | | @TableName("product_parameter") |
| | | @ApiModel(value = "ProductParameter对象", description = "åæ°é
置表") |
| | | public class ProductParameter implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty("主é®ID") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("åæ°ç¼ç ") |
| | | private String code; |
| | | |
| | | @ApiModelProperty("忰项") |
| | | private String parameterItem; |
| | | |
| | | @ApiModelProperty("åæ°ç±»åï¼0ï¼æ°åæ ¼å¼ï¼1ï¼ææ¬æ ¼å¼ï¼") |
| | | private String type; |
| | | |
| | | @ApiModelProperty("åä½") |
| | | private String unit; |
| | | |
| | | @ApiModelProperty("åæ°æ ¼å¼") |
| | | private String parameterFormat; |
| | | |
| | | @ApiModelProperty("åå
¸å¼") |
| | | private String dict; |
| | | |
| | | @ApiModelProperty("æ¯å¦å¿
å¡«ï¼0ï¼å¦ï¼1ï¼æ¯ï¼") |
| | | private String isRequired; |
| | | |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty("å建人") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private String createUser; |
| | | |
| | | @ApiModelProperty("æ´æ°æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | @ApiModelProperty("æ´æ°äºº") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private String updateUser; |
| | | |
| | | @ApiModelProperty("ç§æ·ID") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private String tenantId; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.production.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * å·¥åºåæ°è¡¨ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-03-14 03:45:15 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("product_process_parameter") |
| | | @ApiModel(value = "ProductProcessParameter对象", description = "å·¥åºåæ°è¡¨") |
| | | public class ProductProcessParameter implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty("主é®ID") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("åæ°ç¼ç ") |
| | | private String code; |
| | | |
| | | @ApiModelProperty("å·¥åºid") |
| | | private Long processId; |
| | | |
| | | @ApiModelProperty("忰项") |
| | | private String parameterItem; |
| | | |
| | | @ApiModelProperty("åæ°ç±»åï¼0ï¼æ°åæ ¼å¼ï¼1ï¼ææ¬æ ¼å¼ï¼") |
| | | private String type; |
| | | |
| | | @ApiModelProperty("åä½") |
| | | private String unit; |
| | | |
| | | @ApiModelProperty("åæ°æ ¼å¼") |
| | | private String parameterFormat; |
| | | |
| | | @ApiModelProperty("åå
¸å¼") |
| | | private String dict; |
| | | |
| | | @ApiModelProperty("å¡«åå¼") |
| | | private String value; |
| | | |
| | | @ApiModelProperty("æ¯å¦å¿
å¡«ï¼0ï¼å¦ï¼1ï¼æ¯ï¼") |
| | | private String isRequired; |
| | | |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty("å建人") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private String createUser; |
| | | |
| | | @ApiModelProperty("æ´æ°æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime updateTime; |
| | | |
| | | @ApiModelProperty("æ´æ°äºº") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private String updateUser; |
| | | |
| | | @ApiModelProperty("ç§æ·ID") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private String tenantId; |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Excel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | |
| | | @ApiModelProperty(value = "宿æ°é") |
| | | private BigDecimal completeQuantity; |
| | | |
| | | /** |
| | | * æå
¥æ»é |
| | | */ |
| | | @ApiModelProperty(value = "æå
¥æ»é(kg)") |
| | | private BigDecimal totalInvestment; |
| | | |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.production.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.production.dto.ProductParameterDto; |
| | | import com.ruoyi.production.pojo.ProductParameter; |
| | | |
| | | /** |
| | | * <p> |
| | | * åæ°é
置表 æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-03-14 01:38:54 |
| | | */ |
| | | public interface ProductParameterService extends IService<ProductParameter> { |
| | | |
| | | IPage<ProductParameterDto> pageProductParameter(Page<ProductParameterDto> page, ProductParameterDto productParameter); |
| | | |
| | | void addProductParameter(ProductParameterDto productParameter); |
| | | |
| | | void updProductParameter(ProductParameterDto productParameter); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.production.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.production.dto.ProductProcessParameterDto; |
| | | import com.ruoyi.production.pojo.ProductProcessParameter; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * å·¥åºåæ°è¡¨ æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-03-14 03:45:15 |
| | | */ |
| | | public interface ProductProcessParameterService extends IService<ProductProcessParameter> { |
| | | |
| | | IPage<ProductProcessParameterDto> pageProductProcessParameter(Page<ProductProcessParameterDto> page, ProductProcessParameterDto productProcessParameter); |
| | | |
| | | void addProductProcessParameter(List<ProductProcessParameter> productProcessParameters, Long processId); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.production.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.production.dto.ProductParameterDto; |
| | | import com.ruoyi.production.mapper.ProductParameterMapper; |
| | | import com.ruoyi.production.pojo.ProductParameter; |
| | | import com.ruoyi.production.service.ProductParameterService; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | /** |
| | | * <p> |
| | | * åæ°é
置表 æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-03-14 01:38:54 |
| | | */ |
| | | @Service |
| | | public class ProductParameterServiceImpl extends ServiceImpl<ProductParameterMapper, ProductParameter> implements ProductParameterService { |
| | | |
| | | @Override |
| | | public IPage<ProductParameterDto> pageProductParameter(Page<ProductParameterDto> page, ProductParameterDto productParameter) { |
| | | return baseMapper.pageProductParameter(page, productParameter); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void addProductParameter(ProductParameterDto productParameter) { |
| | | boolean save = this.save(productParameter); |
| | | if (save) { |
| | | String no = "BP" + String.format("%06d", productParameter.getId()); |
| | | productParameter.setCode(no); |
| | | this.updateById(productParameter); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void updProductParameter(ProductParameterDto productParameter) { |
| | | this.updateById(productParameter); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.production.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.production.dto.ProductProcessParameterDto; |
| | | import com.ruoyi.production.mapper.ProductProcessParameterMapper; |
| | | import com.ruoyi.production.pojo.ProductProcessParameter; |
| | | import com.ruoyi.production.service.ProductProcessParameterService; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * å·¥åºåæ°è¡¨ æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-03-14 03:45:15 |
| | | */ |
| | | @Service |
| | | public class ProductProcessParameterServiceImpl extends ServiceImpl<ProductProcessParameterMapper, ProductProcessParameter> implements ProductProcessParameterService { |
| | | |
| | | @Override |
| | | public IPage<ProductProcessParameterDto> pageProductProcessParameter(Page<ProductProcessParameterDto> page, ProductProcessParameterDto productProcessParameter) { |
| | | return baseMapper.pageProductProcessParameter(page, productProcessParameter); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional |
| | | public void addProductProcessParameter(List<ProductProcessParameter> productProcessParameters, Long processId) { |
| | | productProcessParameters.forEach(productProcessParameter -> { |
| | | productProcessParameter.setId(null); |
| | | productProcessParameter.setCreateTime(null); |
| | | productProcessParameter.setUpdateTime(null); |
| | | productProcessParameter.setCreateUser(null); |
| | | productProcessParameter.setUpdateUser(null); |
| | | productProcessParameter.setTenantId(null); |
| | | productProcessParameter.setProcessId(processId); |
| | | }); |
| | | this.saveBatch(productProcessParameters); |
| | | } |
| | | } |
| | |
| | | productionProductMainMapper.insert(productionProductMain); |
| | | /*æ°å¢æ¥å·¥æå
¥è¡¨*/ |
| | | List<ProductStructureDto> productStructureDtos = productStructureMapper.listBybomAndProcess(productProcessRoute.getBomId(), productProcess.getId()); |
| | | if (productStructureDtos.size() == 0) { |
| | | if (productStructureDtos.isEmpty()) { |
| | | //å¦æè¯¥å·¥åºæ²¡æäº§åç»æçæå
¥å,é£è¿ä¸ªæå
¥åå产åºåæ¯åä¸ä¸ª |
| | | ProductStructureDto productStructureDto = new ProductStructureDto(); |
| | | productStructureDto.setProductModelId(productProcessRouteItem.getProductModelId()); |
| | |
| | | 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()); |
| | | |
| | | } |
| | | /*æ°å¢æ¥å·¥äº§åºè¡¨*/ |
| | | ProductionProductOutput productionProductOutput = new ProductionProductOutput(); |
| | |
| | | productionProductOutput.setQuantity(dto.getQuantity() != null ? dto.getQuantity() : BigDecimal.ZERO); |
| | | productionProductOutput.setScrapQty(dto.getScrapQty() != null ? dto.getScrapQty() : BigDecimal.ZERO); |
| | | productionProductOutputMapper.insert(productionProductOutput); |
| | | //åæ ¼æ°é=æ¥å·¥æ°é-æ¥åºæ°é |
| | | BigDecimal productQty = productionProductOutput.getQuantity().subtract(productionProductOutput.getScrapQty()); |
| | | //åæ ¼æ°é=æ¥å·¥æ°é |
| | | BigDecimal productQty = productionProductOutput.getQuantity(); |
| | | //åªæåæ ¼æ°é>0æè½å¢å ç¸åºæ°æ® |
| | | if (productQty.compareTo(BigDecimal.ZERO) > 0) { |
| | | /*æ°å¢è´¨æ£*/ |
| | |
| | | if (productWorkOrder.getCompleteQuantity().compareTo(productWorkOrder.getPlanQuantity()) == 0) { |
| | | productWorkOrder.setActualEndTime(LocalDate.now());//å®é
ç»ææ¶é´ |
| | | } |
| | | productWorkOrder.setTotalInvestment(dto.getTotalInvestment()); |
| | | productWorkOrderMapper.updateById(productWorkOrder); |
| | | //ç产订å |
| | | ProductOrder productOrder = productOrderMapper.selectById(productWorkOrder.getProductOrderId()); |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.account.service.AccountIncomeService; |
| | | import com.ruoyi.aftersalesservice.pojo.AfterSalesService; |
| | | import com.ruoyi.basic.mapper.CustomerMapper; |
| | | import com.ruoyi.basic.mapper.ProductMapper; |
| | | import com.ruoyi.basic.mapper.ProductModelMapper; |
| | |
| | | import com.ruoyi.other.mapper.TempFileMapper; |
| | | import com.ruoyi.other.pojo.TempFile; |
| | | import com.ruoyi.production.mapper.*; |
| | | import com.ruoyi.production.pojo.*; |
| | | import com.ruoyi.production.service.ProductionProductMainService; |
| | | import com.ruoyi.production.service.impl.ProductionProductMainServiceImpl; |
| | | import com.ruoyi.project.system.domain.SysDept; |
| | | import com.ruoyi.project.system.domain.SysUser; |
| | | import com.ruoyi.project.system.mapper.SysDeptMapper; |
| | | import com.ruoyi.project.system.mapper.SysUserMapper; |
| | | import com.ruoyi.quality.mapper.QualityInspectMapper; |
| | | import com.ruoyi.quality.pojo.QualityInspect; |
| | | import com.ruoyi.sales.dto.*; |
| | | import com.ruoyi.sales.mapper.*; |
| | | import com.ruoyi.sales.pojo.*; |
| | | import com.ruoyi.sales.service.ISalesLedgerProductService; |
| | | import com.ruoyi.sales.service.ISalesLedgerService; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | salesLedgerProduct.setPendingInvoiceTotal(salesLedgerProduct.getTaxInclusiveTotalPrice()); |
| | | salesLedgerProductMapper.insert(salesLedgerProduct); |
| | | // æ·»å çäº§æ°æ® |
| | | salesLedgerProductServiceImpl.addProductionData(salesLedgerProduct); |
| | | // salesLedgerProductServiceImpl.addProductionData(salesLedgerProduct); |
| | | } |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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="com.ruoyi.production.mapper.ProductParameterMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.production.pojo.ProductParameter"> |
| | | <id column="id" property="id" /> |
| | | <result column="code" property="code" /> |
| | | <result column="parameter_item" property="parameterItem" /> |
| | | <result column="type" property="type" /> |
| | | <result column="unit" property="unit" /> |
| | | <result column="parameter_format" property="parameterFormat" /> |
| | | <result column="dict" property="dict" /> |
| | | <result column="is_required" property="isRequired" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="create_user" property="createUser" /> |
| | | <result column="update_time" property="updateTime" /> |
| | | <result column="update_user" property="updateUser" /> |
| | | <result column="tenant_id" property="tenantId" /> |
| | | </resultMap> |
| | | <select id="pageProductParameter" resultType="com.ruoyi.production.dto.ProductParameterDto"> |
| | | select pp.* |
| | | from |
| | | product_parameter pp |
| | | <where> |
| | | <if test="productParameter.code != null and productParameter.code != ''"> |
| | | and pp.code like concat('%',#{productParameter.code},'%') |
| | | </if> |
| | | <if test="productParameter.parameterItem != null and productParameter.parameterItem != ''"> |
| | | and pp.parameter_item like concat('%',#{productParameter.parameterItem},'%') |
| | | </if> |
| | | <if test="productParameter.type != null and productParameter.type != ''"> |
| | | and pp.type like concat('%',#{productParameter.type},'%') |
| | | </if> |
| | | </where> |
| | | order by pp.id |
| | | </select> |
| | | |
| | | </mapper> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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="com.ruoyi.production.mapper.ProductProcessParameterMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.production.pojo.ProductProcessParameter"> |
| | | <id column="id" property="id" /> |
| | | <result column="process_id" property="processId" /> |
| | | <result column="code" property="code" /> |
| | | <result column="parameter_item" property="parameterItem" /> |
| | | <result column="type" property="type" /> |
| | | <result column="unit" property="unit" /> |
| | | <result column="parameter_format" property="parameterFormat" /> |
| | | <result column="dict" property="dict" /> |
| | | <result column="value" property="value" /> |
| | | <result column="is_required" property="isRequired" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="create_user" property="createUser" /> |
| | | <result column="update_time" property="updateTime" /> |
| | | <result column="update_user" property="updateUser" /> |
| | | <result column="tenant_id" property="tenantId" /> |
| | | </resultMap> |
| | | <select id="pageProductProcessParameter" resultType="com.ruoyi.production.dto.ProductProcessParameterDto"> |
| | | SELECT |
| | | * |
| | | FROM product_process_parameter |
| | | WHERE 1=1 |
| | | <if test="productProcessParameter.code != null and productProcessParameter.code != ''"> |
| | | AND code LIKE concat('%',#{productProcessParameter.code},'%') |
| | | </if> |
| | | <if test="productProcessParameter.parameterItem != null and productProcessParameter.parameterItem != ''"> |
| | | AND parameter_item LIKE concat('%',#{productProcessParameter.parameterItem},'%') |
| | | </if> |
| | | <if test="productProcessParameter.processId != null and productProcessParameter.processId != ''"> |
| | | AND process_id = #{productProcessParameter.processId} |
| | | </if> |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | select ppm.*, |
| | | pwo.work_order_no as workOrderNo, |
| | | pwo.status as workOrderStatus, |
| | | pwo.total_investment as totalInvestment, |
| | | u.nick_name as nickName, |
| | | p.product_name as productName, |
| | | pp.name as process, |