Merge remote-tracking branch 'origin/dev' into dev
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.aps.core.controller.mainPlan; |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.aps.common.core.web.page.TableDataInfo; |
| | | import com.aps.core.domain.ApsGasPipelineMo; |
| | | import com.aps.core.domain.ApsGasPipelinePrediction; |
| | | import com.aps.core.service.IApsGasPipelinePredictionService; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.PutMapping; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import com.aps.common.log.annotation.Log; |
| | | import com.aps.common.log.enums.BusinessType; |
| | | import com.aps.common.security.annotation.RequiresPermissions; |
| | | import com.aps.common.core.web.controller.BaseController; |
| | | import com.aps.common.core.web.domain.AjaxResult; |
| | | import com.aps.common.core.utils.poi.ExcelUtil; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | /** |
| | | * 管路æå·¥æ°ä½é¢æµæ°æ®Controller |
| | | * |
| | | * @author ruoyi |
| | | * @date 2025-05-19 |
| | | */ |
| | | |
| | | @Tag(name = "管路æå·¥æ°ä½é¢æµæ°æ®", description = "管路æå·¥æ°ä½é¢æµæ°æ®æ¥å£") |
| | | @RestController |
| | | @RequestMapping("/gasPipelinePrediction") |
| | | public class ApsGasPipelinePredictionController extends BaseController |
| | | { |
| | | @Autowired |
| | | private IApsGasPipelinePredictionService apsGasPipelinePredictionService; |
| | | |
| | | /** |
| | | * æ¥è¯¢ç®¡è·¯æå·¥æ°ä½é¢æµæ°æ®å表 |
| | | */ |
| | | @Operation(summary = "æ¥è¯¢ç®¡è·¯æå·¥æ°ä½é¢æµæ°æ®å表", description = "å页æ¥è¯¢") |
| | | @RequiresPermissions("gasPipeline:prediction:list") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(ApsGasPipelinePrediction apsGasPipelineMo) |
| | | { |
| | | startPage(); |
| | | List<ApsGasPipelinePrediction> list = apsGasPipelinePredictionService.selectApsGasPipelinePredictionList(apsGasPipelineMo); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | |
| | | @Operation(summary = "导å
¥æå·¥æ°ä½é¢æµæ°æ®", description = "æ¹é导å
¥") |
| | | @Log(title = "导å
¥æå·¥æ°ä½é¢æµæ°æ®", businessType = BusinessType.IMPORT) |
| | | @RequiresPermissions("gasPipeline:mo:import") |
| | | @PostMapping("/importData") |
| | | public AjaxResult importData(MultipartFile file) throws Exception { |
| | | |
| | | int i = apsGasPipelinePredictionService.batchInsertApsGasPipelinePrediction(file); |
| | | return toAjax(i); |
| | | } |
| | | /** |
| | | * 导åºç®¡è·¯æå·¥æ°ä½é¢æµæ°æ®å表 |
| | | */ |
| | | @Operation(summary = "导åºç®¡è·¯æå·¥æ°ä½é¢æµæ°æ®å表", description = "导åº") |
| | | @RequiresPermissions("gasPipeline:prediction:export") |
| | | @Log(title = "管路æå·¥æ°ä½é¢æµæ°æ®", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, ApsGasPipelinePrediction apsGasPipelinePrediction) |
| | | { |
| | | List<ApsGasPipelinePrediction> list = apsGasPipelinePredictionService.selectApsGasPipelinePredictionList(apsGasPipelinePrediction); |
| | | ExcelUtil<ApsGasPipelinePrediction> util = new ExcelUtil<ApsGasPipelinePrediction>(ApsGasPipelinePrediction.class); |
| | | util.exportExcel(response, list, "管路æå·¥æ°ä½é¢æµæ°æ®æ°æ®"); |
| | | } |
| | | |
| | | /** |
| | | * è·å管路æå·¥æ°ä½é¢æµæ°æ®è¯¦ç»ä¿¡æ¯ |
| | | */ |
| | | @Operation(summary = "è·å管路æå·¥æ°ä½é¢æµæ°æ®è¯¦ç»ä¿¡æ¯", description = "æ ¹æ®idè·å") |
| | | @RequiresPermissions("gasPipeline:prediction:query") |
| | | @GetMapping(value = "/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") Long id) |
| | | { |
| | | return success(apsGasPipelinePredictionService.selectApsGasPipelinePredictionById(id)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢ç®¡è·¯æå·¥æ°ä½é¢æµæ°æ® |
| | | */ |
| | | @Operation(summary = "æ°å¢ç®¡è·¯æå·¥æ°ä½é¢æµæ°æ®", description = "å个æ°å¢") |
| | | @RequiresPermissions("gasPipeline:prediction:add") |
| | | @Log(title = "管路æå·¥æ°ä½é¢æµæ°æ®", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody ApsGasPipelinePrediction apsGasPipelinePrediction) |
| | | { |
| | | return toAjax(apsGasPipelinePredictionService.insertApsGasPipelinePrediction(apsGasPipelinePrediction)); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹ç®¡è·¯æå·¥æ°ä½é¢æµæ°æ® |
| | | */ |
| | | @Operation(summary = "ä¿®æ¹ç®¡è·¯æå·¥æ°ä½é¢æµæ°æ®", description = "å个修æ¹") |
| | | @RequiresPermissions("gasPipeline:prediction:edit") |
| | | @Log(title = "管路æå·¥æ°ä½é¢æµæ°æ®", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody ApsGasPipelinePrediction apsGasPipelinePrediction) |
| | | { |
| | | return toAjax(apsGasPipelinePredictionService.updateApsGasPipelinePrediction(apsGasPipelinePrediction)); |
| | | } |
| | | |
| | | /** |
| | | * å é¤ç®¡è·¯æå·¥æ°ä½é¢æµæ°æ® |
| | | */ |
| | | @Operation(summary = "å é¤ç®¡è·¯æå·¥æ°ä½é¢æµæ°æ®", description = "æ¹éå é¤") |
| | | @RequiresPermissions("gasPipeline:prediction:remove") |
| | | @Log(title = "管路æå·¥æ°ä½é¢æµæ°æ®", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) |
| | | { |
| | | return toAjax(apsGasPipelinePredictionService.deleteApsGasPipelinePredictionByIds(ids)); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.aps.core.controller.mainPlan; |
| | | |
| | | import com.aps.common.core.utils.poi.ExcelUtil; |
| | | import com.aps.common.core.web.controller.BaseController; |
| | | import com.aps.common.core.web.domain.AjaxResult; |
| | | import com.aps.common.core.web.page.TableDataInfo; |
| | | import com.aps.common.log.annotation.Log; |
| | | import com.aps.common.log.enums.BusinessType; |
| | | import com.aps.common.security.annotation.RequiresPermissions; |
| | | import com.aps.core.domain.ApsMaterialProductGroupManagement; |
| | | import com.aps.core.service.IApsMaterialProductGroupManagementService; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * ç©æäº§åç»æ°æ®ç®¡çController |
| | | * |
| | | * @author ruoyi |
| | | * @date 2025-05-19 |
| | | */ |
| | | |
| | | @Tag(name = "ç©æäº§åç»æ°æ®ç®¡ç", description = "ç©æäº§åç»æ°æ®ç®¡çæ¥å£") |
| | | @RestController |
| | | @RequestMapping("/materialProductGroupManagement") |
| | | public class ApsMaterialProductGroupManagementController extends BaseController |
| | | { |
| | | @Autowired |
| | | private IApsMaterialProductGroupManagementService apsMaterialProductGroupManagementService; |
| | | |
| | | /** |
| | | * æ¥è¯¢ç©æäº§åç»æ°æ®ç®¡çå表 |
| | | */ |
| | | @Operation(summary = "æ¥è¯¢ç©æäº§åç»æ°æ®ç®¡çå表", description = "å页æ¥è¯¢") |
| | | // @RequiresPermissions("materialProductGroup:management:list") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(ApsMaterialProductGroupManagement apsGasPipelineMo) |
| | | { |
| | | startPage(); |
| | | List<ApsMaterialProductGroupManagement> list = apsMaterialProductGroupManagementService.selectApsMaterialProductGroupManagementList(apsGasPipelineMo); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | |
| | | @Operation(summary = "导å
¥æå·¥æ°ä½é¢æµæ°æ®", description = "æ¹é导å
¥") |
| | | @Log(title = "导å
¥æå·¥æ°ä½é¢æµæ°æ®", businessType = BusinessType.IMPORT) |
| | | // @RequiresPermissions("materialProductGroup:mo:import") |
| | | @PostMapping("/importData") |
| | | public AjaxResult importData(MultipartFile file) throws Exception { |
| | | |
| | | int i = apsMaterialProductGroupManagementService.batchInsertApsMaterialProductGroupManagement(file); |
| | | return toAjax(i); |
| | | } |
| | | /** |
| | | * 导åºç©æäº§åç»æ°æ®ç®¡çå表 |
| | | */ |
| | | @Operation(summary = "导åºç©æäº§åç»æ°æ®ç®¡çå表", description = "导åº") |
| | | // @RequiresPermissions("materialProductGroup:management:export") |
| | | @Log(title = "ç©æäº§åç»æ°æ®ç®¡ç", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, ApsMaterialProductGroupManagement apsMaterialProductGroupManagement) |
| | | { |
| | | List<ApsMaterialProductGroupManagement> list = apsMaterialProductGroupManagementService.selectApsMaterialProductGroupManagementList(apsMaterialProductGroupManagement); |
| | | ExcelUtil<ApsMaterialProductGroupManagement> util = new ExcelUtil<ApsMaterialProductGroupManagement>(ApsMaterialProductGroupManagement.class); |
| | | util.exportExcel(response, list, "ç©æäº§åç»æ°æ®ç®¡çæ°æ®"); |
| | | } |
| | | |
| | | /** |
| | | * è·åç©æäº§åç»æ°æ®ç®¡ç详ç»ä¿¡æ¯ |
| | | */ |
| | | @Operation(summary = "è·åç©æäº§åç»æ°æ®ç®¡ç详ç»ä¿¡æ¯", description = "æ ¹æ®idè·å") |
| | | @RequiresPermissions("materialProductGroup:management:query") |
| | | @GetMapping(value = "/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") Long id) |
| | | { |
| | | return success(apsMaterialProductGroupManagementService.selectApsMaterialProductGroupManagementById(id)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢ç©æäº§åç»æ°æ®ç®¡ç |
| | | */ |
| | | @Operation(summary = "æ°å¢ç©æäº§åç»æ°æ®ç®¡ç", description = "å个æ°å¢") |
| | | // @RequiresPermissions("materialProductGroup:management:add") |
| | | @Log(title = "ç©æäº§åç»æ°æ®ç®¡ç", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody ApsMaterialProductGroupManagement apsMaterialProductGroupManagement) |
| | | { |
| | | return toAjax(apsMaterialProductGroupManagementService.insertApsMaterialProductGroupManagement(apsMaterialProductGroupManagement)); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹ç©æäº§åç»æ°æ®ç®¡ç |
| | | */ |
| | | @Operation(summary = "ä¿®æ¹ç©æäº§åç»æ°æ®ç®¡ç", description = "å个修æ¹") |
| | | // @RequiresPermissions("materialProductGroup:management:edit") |
| | | @Log(title = "ç©æäº§åç»æ°æ®ç®¡ç", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody ApsMaterialProductGroupManagement apsMaterialProductGroupManagement) |
| | | { |
| | | return toAjax(apsMaterialProductGroupManagementService.updateApsMaterialProductGroupManagement(apsMaterialProductGroupManagement)); |
| | | } |
| | | |
| | | /** |
| | | * å é¤ç©æäº§åç»æ°æ®ç®¡ç |
| | | */ |
| | | @Operation(summary = "å é¤ç©æäº§åç»æ°æ®ç®¡ç", description = "æ¹éå é¤") |
| | | // @RequiresPermissions("materialProductGroup:management:remove") |
| | | @Log(title = "ç©æäº§åç»æ°æ®ç®¡ç", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) |
| | | { |
| | | return toAjax(apsMaterialProductGroupManagementService.deleteApsMaterialProductGroupManagementByIds(ids)); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.aps.core.domain; |
| | | |
| | | import com.aps.common.core.annotation.Excel; |
| | | import com.aps.common.core.web.domain.BaseEntity; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | import org.springframework.data.annotation.Id; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.sql.Timestamp; |
| | | |
| | | /** |
| | | * 管路æå·¥æ°ä½é¢æµæ°æ®å¯¹è±¡ aps_gas_pipeline_prediction |
| | | * |
| | | * @author ruoyi |
| | | * @date 2025-05-19 |
| | | */ |
| | | @Data |
| | | @Schema(description = "管路æå·¥æ°ä½é¢æµæ°æ®å®ä½ç±»") |
| | | public class ApsGasPipelinePrediction extends BaseEntity |
| | | { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @Id |
| | | @JsonFormat(shape = JsonFormat.Shape.STRING) |
| | | /** ID */ |
| | | @Schema(description = "ID") |
| | | private Long id; |
| | | |
| | | /** ç产åºå° */ |
| | | @Excel(name = "ç产åºå°") |
| | | @Schema(description = "ç产åºå°") |
| | | private String factory; |
| | | |
| | | /** æå· */ |
| | | @Excel(name = "æå·") |
| | | @Schema(description = "æå·") |
| | | private String materialCode; |
| | | |
| | | /** 颿µæ¥æ */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @Excel(name = "颿µæ¥æ", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") |
| | | @Schema(description = "颿µæ¥æ") |
| | | private Timestamp predictDate; |
| | | |
| | | /** æ°é */ |
| | | @Excel(name = "æ°é") |
| | | @Schema(description = "æ°é") |
| | | private BigDecimal predictQuantity; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.aps.core.domain; |
| | | |
| | | import com.aps.common.core.web.domain.BaseEntity; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | import org.apache.commons.lang3.builder.ToStringBuilder; |
| | | import org.apache.commons.lang3.builder.ToStringStyle; |
| | | import com.aps.common.core.annotation.Excel; |
| | | import org.springframework.data.annotation.Id; |
| | | |
| | | /** |
| | | * ç©æäº§åç»æ°æ®ç®¡ç对象 aps_material_product_group_management |
| | | * |
| | | * @author ruoyi |
| | | * @date 2025-05-19 |
| | | */ |
| | | @Schema(description = "ç©æäº§åç»æ°æ®ç®¡çå®ä½ç±»") |
| | | @Data |
| | | public class ApsMaterialProductGroupManagement extends BaseEntity |
| | | { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @Id |
| | | @JsonFormat(shape = JsonFormat.Shape.STRING) |
| | | /** ID */ |
| | | @Schema(description = "ID") |
| | | private Long id; |
| | | |
| | | /** éç¨å·¥å åè aps_factory */ |
| | | @Excel(name = "éç¨å·¥å åè aps_factory") |
| | | @Schema(description = "éç¨å·¥å åè aps_factory") |
| | | private String factory; |
| | | |
| | | /** æå· */ |
| | | @Excel(name = "æå·") |
| | | @Schema(description = "æå·") |
| | | private String materialCode; |
| | | |
| | | /** ä¸ä¸ åè aps_domain */ |
| | | @Excel(name = "ä¸ä¸ åè aps_domain") |
| | | @Schema(description = "ä¸ä¸ åè aps_domain") |
| | | private String domain; |
| | | |
| | | /** æ¯å¦ä¸ºä¸»é¶ æ¯/å¦ */ |
| | | @Excel(name = "æ¯å¦ä¸ºä¸»é¶ æ¯/å¦") |
| | | @Schema(description = "æ¯å¦ä¸ºä¸»é¶ æ¯/å¦") |
| | | private String isMain; |
| | | |
| | | /** æå·ç±»å« å¶é ä»¶/éè´ä»¶ */ |
| | | @Excel(name = "æå·ç±»å« å¶é ä»¶/éè´ä»¶") |
| | | @Schema(description = "æå·ç±»å« å¶é ä»¶/éè´ä»¶") |
| | | private String materialType; |
| | | |
| | | public void setId(Long id) |
| | | { |
| | | this.id = id; |
| | | } |
| | | |
| | | public Long getId() |
| | | { |
| | | return id; |
| | | } |
| | | |
| | | public void setFactory(String factory) |
| | | { |
| | | this.factory = factory; |
| | | } |
| | | |
| | | public String getFactory() |
| | | { |
| | | return factory; |
| | | } |
| | | |
| | | public void setMaterialCode(String materialCode) |
| | | { |
| | | this.materialCode = materialCode; |
| | | } |
| | | |
| | | public String getMaterialCode() |
| | | { |
| | | return materialCode; |
| | | } |
| | | |
| | | public void setDomain(String domain) |
| | | { |
| | | this.domain = domain; |
| | | } |
| | | |
| | | public String getDomain() |
| | | { |
| | | return domain; |
| | | } |
| | | |
| | | public void setIsMain(String isMain) |
| | | { |
| | | this.isMain = isMain; |
| | | } |
| | | |
| | | public String getIsMain() |
| | | { |
| | | return isMain; |
| | | } |
| | | |
| | | public void setMaterialType(String materialType) |
| | | { |
| | | this.materialType = materialType; |
| | | } |
| | | |
| | | public String getMaterialType() |
| | | { |
| | | return materialType; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
| | | .append("id", getId()) |
| | | .append("factory", getFactory()) |
| | | .append("materialCode", getMaterialCode()) |
| | | .append("domain", getDomain()) |
| | | .append("createBy", getCreateBy()) |
| | | .append("createTime", getCreateTime()) |
| | | .append("updateBy", getUpdateBy()) |
| | | .append("updateTime", getUpdateTime()) |
| | | .append("isMain", getIsMain()) |
| | | .append("materialType", getMaterialType()) |
| | | .toString(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.aps.core.mapper; |
| | | |
| | | import com.aps.core.domain.ApsGasPipelinePrediction; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 管路æå·¥æ°ä½é¢æµæ°æ®Mapperæ¥å£ |
| | | * |
| | | * @author ruoyi |
| | | * @date 2025-05-19 |
| | | */ |
| | | public interface ApsGasPipelinePredictionMapper extends BaseMapper<ApsGasPipelinePrediction> |
| | | { |
| | | /** |
| | | * æ¥è¯¢ç®¡è·¯æå·¥æ°ä½é¢æµæ°æ® |
| | | * |
| | | * @param id 管路æå·¥æ°ä½é¢æµæ°æ®ä¸»é® |
| | | * @return 管路æå·¥æ°ä½é¢æµæ°æ® |
| | | */ |
| | | public ApsGasPipelinePrediction selectApsGasPipelinePredictionById(Long id); |
| | | |
| | | /** |
| | | * æ¥è¯¢ç®¡è·¯æå·¥æ°ä½é¢æµæ°æ®å表 |
| | | * |
| | | * @param apsGasPipelinePrediction 管路æå·¥æ°ä½é¢æµæ°æ® |
| | | * @return 管路æå·¥æ°ä½é¢æµæ°æ®éå |
| | | */ |
| | | public List<ApsGasPipelinePrediction> selectApsGasPipelinePredictionList(ApsGasPipelinePrediction apsGasPipelinePrediction); |
| | | |
| | | /** |
| | | * æ°å¢ç®¡è·¯æå·¥æ°ä½é¢æµæ°æ® |
| | | * |
| | | * @param apsGasPipelinePrediction 管路æå·¥æ°ä½é¢æµæ°æ® |
| | | * @return ç»æ |
| | | */ |
| | | public int insertApsGasPipelinePrediction(ApsGasPipelinePrediction apsGasPipelinePrediction); |
| | | |
| | | /** |
| | | * ä¿®æ¹ç®¡è·¯æå·¥æ°ä½é¢æµæ°æ® |
| | | * |
| | | * @param apsGasPipelinePrediction 管路æå·¥æ°ä½é¢æµæ°æ® |
| | | * @return ç»æ |
| | | */ |
| | | public int updateApsGasPipelinePrediction(ApsGasPipelinePrediction apsGasPipelinePrediction); |
| | | |
| | | /** |
| | | * å é¤ç®¡è·¯æå·¥æ°ä½é¢æµæ°æ® |
| | | * |
| | | * @param id 管路æå·¥æ°ä½é¢æµæ°æ®ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteApsGasPipelinePredictionById(Long id); |
| | | |
| | | /** |
| | | * æ¹éå é¤ç®¡è·¯æå·¥æ°ä½é¢æµæ°æ® |
| | | * |
| | | * @param ids éè¦å é¤çæ°æ®ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteApsGasPipelinePredictionByIds(Long[] ids); |
| | | |
| | | void deleteAll(); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.aps.core.mapper; |
| | | |
| | | import com.aps.core.domain.ApsMaterialProductGroupManagement; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * ç©æäº§åç»æ°æ®ç®¡çMapperæ¥å£ |
| | | * |
| | | * @author ruoyi |
| | | * @date 2025-05-19 |
| | | */ |
| | | public interface ApsMaterialProductGroupManagementMapper extends BaseMapper<ApsMaterialProductGroupManagement> |
| | | { |
| | | /** |
| | | * æ¥è¯¢ç©æäº§åç»æ°æ®ç®¡ç |
| | | * |
| | | * @param id ç©æäº§åç»æ°æ®ç®¡çä¸»é® |
| | | * @return ç©æäº§åç»æ°æ®ç®¡ç |
| | | */ |
| | | public ApsMaterialProductGroupManagement selectApsMaterialProductGroupManagementById(Long id); |
| | | |
| | | /** |
| | | * æ¥è¯¢ç©æäº§åç»æ°æ®ç®¡çå表 |
| | | * |
| | | * @param apsMaterialProductGroupManagement ç©æäº§åç»æ°æ®ç®¡ç |
| | | * @return ç©æäº§åç»æ°æ®ç®¡çéå |
| | | */ |
| | | public List<ApsMaterialProductGroupManagement> selectApsMaterialProductGroupManagementList(ApsMaterialProductGroupManagement apsMaterialProductGroupManagement); |
| | | |
| | | /** |
| | | * æ°å¢ç©æäº§åç»æ°æ®ç®¡ç |
| | | * |
| | | * @param apsMaterialProductGroupManagement ç©æäº§åç»æ°æ®ç®¡ç |
| | | * @return ç»æ |
| | | */ |
| | | public int insertApsMaterialProductGroupManagement(ApsMaterialProductGroupManagement apsMaterialProductGroupManagement); |
| | | |
| | | /** |
| | | * ä¿®æ¹ç©æäº§åç»æ°æ®ç®¡ç |
| | | * |
| | | * @param apsMaterialProductGroupManagement ç©æäº§åç»æ°æ®ç®¡ç |
| | | * @return ç»æ |
| | | */ |
| | | public int updateApsMaterialProductGroupManagement(ApsMaterialProductGroupManagement apsMaterialProductGroupManagement); |
| | | |
| | | /** |
| | | * å é¤ç©æäº§åç»æ°æ®ç®¡ç |
| | | * |
| | | * @param id ç©æäº§åç»æ°æ®ç®¡çä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteApsMaterialProductGroupManagementById(Long id); |
| | | |
| | | /** |
| | | * æ¹éå é¤ç©æäº§åç»æ°æ®ç®¡ç |
| | | * |
| | | * @param ids éè¦å é¤çæ°æ®ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteApsMaterialProductGroupManagementByIds(Long[] ids); |
| | | |
| | | void deleteAll(); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.aps.core.service; |
| | | |
| | | import java.util.List; |
| | | import com.aps.core.domain.ApsGasPipelinePrediction; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | /** |
| | | * 管路æå·¥æ°ä½é¢æµæ°æ®Serviceæ¥å£ |
| | | * |
| | | * @author ruoyi |
| | | * @date 2025-05-19 |
| | | */ |
| | | public interface IApsGasPipelinePredictionService |
| | | { |
| | | /** |
| | | * æ¥è¯¢ç®¡è·¯æå·¥æ°ä½é¢æµæ°æ® |
| | | * |
| | | * @param id 管路æå·¥æ°ä½é¢æµæ°æ®ä¸»é® |
| | | * @return 管路æå·¥æ°ä½é¢æµæ°æ® |
| | | */ |
| | | public ApsGasPipelinePrediction selectApsGasPipelinePredictionById(Long id); |
| | | |
| | | /** |
| | | * æ¥è¯¢ç®¡è·¯æå·¥æ°ä½é¢æµæ°æ®å表 |
| | | * |
| | | * @param apsGasPipelinePrediction 管路æå·¥æ°ä½é¢æµæ°æ® |
| | | * @return 管路æå·¥æ°ä½é¢æµæ°æ®éå |
| | | */ |
| | | public List<ApsGasPipelinePrediction> selectApsGasPipelinePredictionList(ApsGasPipelinePrediction apsGasPipelinePrediction); |
| | | |
| | | /** |
| | | * æ°å¢ç®¡è·¯æå·¥æ°ä½é¢æµæ°æ® |
| | | * |
| | | * @param apsGasPipelinePrediction 管路æå·¥æ°ä½é¢æµæ°æ® |
| | | * @return ç»æ |
| | | */ |
| | | public int insertApsGasPipelinePrediction(ApsGasPipelinePrediction apsGasPipelinePrediction); |
| | | |
| | | /** |
| | | * ä¿®æ¹ç®¡è·¯æå·¥æ°ä½é¢æµæ°æ® |
| | | * |
| | | * @param apsGasPipelinePrediction 管路æå·¥æ°ä½é¢æµæ°æ® |
| | | * @return ç»æ |
| | | */ |
| | | public int updateApsGasPipelinePrediction(ApsGasPipelinePrediction apsGasPipelinePrediction); |
| | | |
| | | /** |
| | | * æ¹éå é¤ç®¡è·¯æå·¥æ°ä½é¢æµæ°æ® |
| | | * |
| | | * @param ids éè¦å é¤ç管路æå·¥æ°ä½é¢æµæ°æ®ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteApsGasPipelinePredictionByIds(Long[] ids); |
| | | |
| | | /** |
| | | * å é¤ç®¡è·¯æå·¥æ°ä½é¢æµæ°æ®ä¿¡æ¯ |
| | | * |
| | | * @param id 管路æå·¥æ°ä½é¢æµæ°æ®ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteApsGasPipelinePredictionById(Long id); |
| | | |
| | | int batchInsertApsGasPipelinePrediction(MultipartFile file); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.aps.core.service; |
| | | |
| | | import com.aps.core.domain.ApsMaterialProductGroupManagement; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * ç©æäº§åç»æ°æ®ç®¡çServiceæ¥å£ |
| | | * |
| | | * @author ruoyi |
| | | * @date 2025-05-19 |
| | | */ |
| | | public interface IApsMaterialProductGroupManagementService |
| | | { |
| | | /** |
| | | * æ¥è¯¢ç©æäº§åç»æ°æ®ç®¡ç |
| | | * |
| | | * @param id ç©æäº§åç»æ°æ®ç®¡çä¸»é® |
| | | * @return ç©æäº§åç»æ°æ®ç®¡ç |
| | | */ |
| | | public ApsMaterialProductGroupManagement selectApsMaterialProductGroupManagementById(Long id); |
| | | |
| | | /** |
| | | * æ¥è¯¢ç©æäº§åç»æ°æ®ç®¡çå表 |
| | | * |
| | | * @param apsMaterialProductGroupManagement ç©æäº§åç»æ°æ®ç®¡ç |
| | | * @return ç©æäº§åç»æ°æ®ç®¡çéå |
| | | */ |
| | | public List<ApsMaterialProductGroupManagement> selectApsMaterialProductGroupManagementList(ApsMaterialProductGroupManagement apsMaterialProductGroupManagement); |
| | | |
| | | /** |
| | | * æ°å¢ç©æäº§åç»æ°æ®ç®¡ç |
| | | * |
| | | * @param apsMaterialProductGroupManagement ç©æäº§åç»æ°æ®ç®¡ç |
| | | * @return ç»æ |
| | | */ |
| | | public int insertApsMaterialProductGroupManagement(ApsMaterialProductGroupManagement apsMaterialProductGroupManagement); |
| | | |
| | | /** |
| | | * ä¿®æ¹ç©æäº§åç»æ°æ®ç®¡ç |
| | | * |
| | | * @param apsMaterialProductGroupManagement ç©æäº§åç»æ°æ®ç®¡ç |
| | | * @return ç»æ |
| | | */ |
| | | public int updateApsMaterialProductGroupManagement(ApsMaterialProductGroupManagement apsMaterialProductGroupManagement); |
| | | |
| | | /** |
| | | * æ¹éå é¤ç©æäº§åç»æ°æ®ç®¡ç |
| | | * |
| | | * @param ids éè¦å é¤çç©æäº§åç»æ°æ®ç®¡ç主é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteApsMaterialProductGroupManagementByIds(Long[] ids); |
| | | |
| | | /** |
| | | * å é¤ç©æäº§åç»æ°æ®ç®¡çä¿¡æ¯ |
| | | * |
| | | * @param id ç©æäº§åç»æ°æ®ç®¡çä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteApsMaterialProductGroupManagementById(Long id); |
| | | |
| | | int batchInsertApsMaterialProductGroupManagement(MultipartFile file); |
| | | } |
| | |
| | | for (int i = 1; i <= rows; i++) { |
| | | Row row = sheet.getRow(i); |
| | | String mo = row.getCell(0).getStringCellValue(); |
| | | if (StringUtils.isEmpty(mo)){ |
| | | continue; |
| | | } |
| | | String factory = row.getCell(1).getStringCellValue(); |
| | | String materialNum = row.getCell(2).getStringCellValue(); |
| | | double quantity = row.getCell(3).getNumericCellValue(); |
| | | Date planEnd = row.getCell(4).getDateCellValue(); |
| | | if (StringUtils.isNotBlank(mo) && |
| | | StringUtils.isNotBlank(factory) && |
| | | if (StringUtils.isNotBlank(factory) && |
| | | StringUtils.isNotBlank(materialNum) && |
| | | planEnd != null) { |
| | | ApsGasPipelineMo apsGasPipelineMo = new ApsGasPipelineMo(); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.aps.core.service.impl; |
| | | |
| | | import cn.hutool.core.util.IdUtil; |
| | | import com.aps.common.core.utils.DateUtils; |
| | | import com.aps.common.security.utils.SecurityUtils; |
| | | import com.aps.core.domain.ApsGasPipelinePrediction; |
| | | import com.aps.core.mapper.ApsGasPipelinePredictionMapper; |
| | | import com.aps.core.service.IApsGasPipelinePredictionService; |
| | | import io.micrometer.common.util.StringUtils; |
| | | import lombok.SneakyThrows; |
| | | import org.apache.poi.ss.usermodel.Row; |
| | | import org.apache.poi.ss.usermodel.Sheet; |
| | | import org.apache.poi.ss.usermodel.Workbook; |
| | | import org.apache.poi.ss.usermodel.WorkbookFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.sql.Timestamp; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 管路æå·¥æ°ä½é¢æµæ°æ®Serviceä¸å¡å±å¤ç |
| | | * |
| | | * @author ruoyi |
| | | * @date 2025-05-19 |
| | | */ |
| | | @Service |
| | | public class ApsGasPipelinePredictionServiceImpl implements IApsGasPipelinePredictionService |
| | | { |
| | | @Autowired |
| | | private ApsGasPipelinePredictionMapper apsGasPipelinePredictionMapper; |
| | | |
| | | /** |
| | | * æ¥è¯¢ç®¡è·¯æå·¥æ°ä½é¢æµæ°æ® |
| | | * |
| | | * @param id 管路æå·¥æ°ä½é¢æµæ°æ®ä¸»é® |
| | | * @return 管路æå·¥æ°ä½é¢æµæ°æ® |
| | | */ |
| | | @Override |
| | | public ApsGasPipelinePrediction selectApsGasPipelinePredictionById(Long id) |
| | | { |
| | | return apsGasPipelinePredictionMapper.selectApsGasPipelinePredictionById(id); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢ç®¡è·¯æå·¥æ°ä½é¢æµæ°æ®å表 |
| | | * |
| | | * @param apsGasPipelinePrediction 管路æå·¥æ°ä½é¢æµæ°æ® |
| | | * @return 管路æå·¥æ°ä½é¢æµæ°æ® |
| | | */ |
| | | @Override |
| | | public List<ApsGasPipelinePrediction> selectApsGasPipelinePredictionList(ApsGasPipelinePrediction apsGasPipelinePrediction) |
| | | { |
| | | return apsGasPipelinePredictionMapper.selectApsGasPipelinePredictionList(apsGasPipelinePrediction); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢ç®¡è·¯æå·¥æ°ä½é¢æµæ°æ® |
| | | * |
| | | * @param apsGasPipelinePrediction 管路æå·¥æ°ä½é¢æµæ°æ® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int insertApsGasPipelinePrediction(ApsGasPipelinePrediction apsGasPipelinePrediction) |
| | | { |
| | | apsGasPipelinePrediction.setCreateTime(DateUtils.getNowDate()); |
| | | return apsGasPipelinePredictionMapper.insertApsGasPipelinePrediction(apsGasPipelinePrediction); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹ç®¡è·¯æå·¥æ°ä½é¢æµæ°æ® |
| | | * |
| | | * @param apsGasPipelinePrediction 管路æå·¥æ°ä½é¢æµæ°æ® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int updateApsGasPipelinePrediction(ApsGasPipelinePrediction apsGasPipelinePrediction) |
| | | { |
| | | apsGasPipelinePrediction.setUpdateTime(DateUtils.getNowDate()); |
| | | return apsGasPipelinePredictionMapper.updateApsGasPipelinePrediction(apsGasPipelinePrediction); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå é¤ç®¡è·¯æå·¥æ°ä½é¢æµæ°æ® |
| | | * |
| | | * @param ids éè¦å é¤ç管路æå·¥æ°ä½é¢æµæ°æ®ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteApsGasPipelinePredictionByIds(Long[] ids) |
| | | { |
| | | return apsGasPipelinePredictionMapper.deleteApsGasPipelinePredictionByIds(ids); |
| | | } |
| | | |
| | | /** |
| | | * å é¤ç®¡è·¯æå·¥æ°ä½é¢æµæ°æ®ä¿¡æ¯ |
| | | * |
| | | * @param id 管路æå·¥æ°ä½é¢æµæ°æ®ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteApsGasPipelinePredictionById(Long id) |
| | | { |
| | | return apsGasPipelinePredictionMapper.deleteApsGasPipelinePredictionById(id); |
| | | } |
| | | |
| | | @SneakyThrows |
| | | @Override |
| | | public int batchInsertApsGasPipelinePrediction(MultipartFile file) { |
| | | Workbook workbook = WorkbookFactory.create(file.getInputStream()); |
| | | |
| | | Sheet sheet = workbook.getSheetAt(0); |
| | | int rows = sheet.getLastRowNum(); |
| | | if (rows > 0) { |
| | | List<ApsGasPipelinePrediction> list = new ArrayList<>(); |
| | | |
| | | /*æ°æ®åä»1å¼å§*/ |
| | | for (int i = 1; i <= rows; i++) { |
| | | Row row = sheet.getRow(i); |
| | | String materialCode = row.getCell(0).getStringCellValue(); |
| | | if (StringUtils.isEmpty(materialCode)){ |
| | | continue; |
| | | } |
| | | String factory = row.getCell(1).getStringCellValue(); |
| | | double quantity = row.getCell(2).getNumericCellValue(); |
| | | Date date = row.getCell(3).getDateCellValue(); |
| | | if (StringUtils.isNotBlank(factory) && |
| | | date != null) { |
| | | ApsGasPipelinePrediction item = new ApsGasPipelinePrediction(); |
| | | item.setId(IdUtil.getSnowflakeNextId()); |
| | | item.setFactory(factory); |
| | | item.setMaterialCode(materialCode); |
| | | item.setCreateBy(SecurityUtils.getUsername()); |
| | | item.setCreateTime(DateUtils.getNowDate()); |
| | | item.setPredictQuantity(new BigDecimal(quantity)); |
| | | item.setPredictDate(new Timestamp(date.getTime())); |
| | | list.add(item); |
| | | } |
| | | } |
| | | if (!list.isEmpty()) { |
| | | apsGasPipelinePredictionMapper.deleteAll(); |
| | | apsGasPipelinePredictionMapper.insert(list); |
| | | } |
| | | return list.size(); |
| | | } |
| | | return 0; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.aps.core.service.impl; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.sql.Timestamp; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | import cn.hutool.core.util.IdUtil; |
| | | import com.aps.common.core.utils.DateUtils; |
| | | import com.aps.common.security.utils.SecurityUtils; |
| | | import com.aps.core.domain.ApsGasPipelinePrediction; |
| | | import com.aps.core.domain.ApsMaterialProductGroupManagement; |
| | | import com.aps.core.mapper.ApsMaterialProductGroupManagementMapper; |
| | | import com.aps.core.service.IApsMaterialProductGroupManagementService; |
| | | import io.micrometer.common.util.StringUtils; |
| | | import lombok.SneakyThrows; |
| | | import org.apache.poi.ss.usermodel.Row; |
| | | import org.apache.poi.ss.usermodel.Sheet; |
| | | import org.apache.poi.ss.usermodel.Workbook; |
| | | import org.apache.poi.ss.usermodel.WorkbookFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | /** |
| | | * ç©æäº§åç»æ°æ®ç®¡çServiceä¸å¡å±å¤ç |
| | | * |
| | | * @author ruoyi |
| | | * @date 2025-05-19 |
| | | */ |
| | | @Service |
| | | public class ApsMaterialProductGroupManagementServiceImpl implements IApsMaterialProductGroupManagementService |
| | | { |
| | | @Autowired |
| | | private ApsMaterialProductGroupManagementMapper apsMaterialProductGroupManagementMapper; |
| | | |
| | | /** |
| | | * æ¥è¯¢ç©æäº§åç»æ°æ®ç®¡ç |
| | | * |
| | | * @param id ç©æäº§åç»æ°æ®ç®¡çä¸»é® |
| | | * @return ç©æäº§åç»æ°æ®ç®¡ç |
| | | */ |
| | | @Override |
| | | public ApsMaterialProductGroupManagement selectApsMaterialProductGroupManagementById(Long id) |
| | | { |
| | | return apsMaterialProductGroupManagementMapper.selectApsMaterialProductGroupManagementById(id); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢ç©æäº§åç»æ°æ®ç®¡çå表 |
| | | * |
| | | * @param apsMaterialProductGroupManagement ç©æäº§åç»æ°æ®ç®¡ç |
| | | * @return ç©æäº§åç»æ°æ®ç®¡ç |
| | | */ |
| | | @Override |
| | | public List<ApsMaterialProductGroupManagement> selectApsMaterialProductGroupManagementList(ApsMaterialProductGroupManagement apsMaterialProductGroupManagement) |
| | | { |
| | | return apsMaterialProductGroupManagementMapper.selectApsMaterialProductGroupManagementList(apsMaterialProductGroupManagement); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢ç©æäº§åç»æ°æ®ç®¡ç |
| | | * |
| | | * @param apsMaterialProductGroupManagement ç©æäº§åç»æ°æ®ç®¡ç |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int insertApsMaterialProductGroupManagement(ApsMaterialProductGroupManagement apsMaterialProductGroupManagement) |
| | | { |
| | | apsMaterialProductGroupManagement.setCreateTime(DateUtils.getNowDate()); |
| | | return apsMaterialProductGroupManagementMapper.insertApsMaterialProductGroupManagement(apsMaterialProductGroupManagement); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹ç©æäº§åç»æ°æ®ç®¡ç |
| | | * |
| | | * @param apsMaterialProductGroupManagement ç©æäº§åç»æ°æ®ç®¡ç |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int updateApsMaterialProductGroupManagement(ApsMaterialProductGroupManagement apsMaterialProductGroupManagement) |
| | | { |
| | | apsMaterialProductGroupManagement.setUpdateTime(DateUtils.getNowDate()); |
| | | return apsMaterialProductGroupManagementMapper.updateApsMaterialProductGroupManagement(apsMaterialProductGroupManagement); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå é¤ç©æäº§åç»æ°æ®ç®¡ç |
| | | * |
| | | * @param ids éè¦å é¤çç©æäº§åç»æ°æ®ç®¡çä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteApsMaterialProductGroupManagementByIds(Long[] ids) |
| | | { |
| | | return apsMaterialProductGroupManagementMapper.deleteApsMaterialProductGroupManagementByIds(ids); |
| | | } |
| | | |
| | | /** |
| | | * å é¤ç©æäº§åç»æ°æ®ç®¡çä¿¡æ¯ |
| | | * |
| | | * @param id ç©æäº§åç»æ°æ®ç®¡çä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteApsMaterialProductGroupManagementById(Long id) |
| | | { |
| | | return apsMaterialProductGroupManagementMapper.deleteApsMaterialProductGroupManagementById(id); |
| | | } |
| | | |
| | | @SneakyThrows |
| | | @Override |
| | | public int batchInsertApsMaterialProductGroupManagement(MultipartFile file) { |
| | | Workbook workbook = WorkbookFactory.create(file.getInputStream()); |
| | | |
| | | Sheet sheet = workbook.getSheetAt(0); |
| | | int rows = sheet.getLastRowNum(); |
| | | if (rows > 0) { |
| | | List<ApsMaterialProductGroupManagement> list = new ArrayList<>(); |
| | | |
| | | /*æ°æ®åä»1å¼å§*/ |
| | | for (int i = 1; i <= rows; i++) { |
| | | Row row = sheet.getRow(i); |
| | | String materialCode = row.getCell(0).getStringCellValue(); |
| | | if (StringUtils.isEmpty(materialCode)){ |
| | | continue; |
| | | } |
| | | String materialType = row.getCell(1).getStringCellValue(); |
| | | String domain = row.getCell(2).getStringCellValue(); |
| | | String isMain = row.getCell(3).getStringCellValue(); |
| | | String factory = row.getCell(4).getStringCellValue(); |
| | | if (StringUtils.isNotBlank(materialType) && |
| | | StringUtils.isNotBlank(domain) && |
| | | StringUtils.isNotBlank(isMain) && |
| | | StringUtils.isNotBlank(factory)) { |
| | | ApsMaterialProductGroupManagement item = new ApsMaterialProductGroupManagement(); |
| | | item.setId(IdUtil.getSnowflakeNextId()); |
| | | item.setFactory(factory); |
| | | item.setDomain(domain); |
| | | item.setMaterialType(materialType); |
| | | item.setMaterialCode(materialCode); |
| | | item.setIsMain(isMain); |
| | | item.setCreateBy(SecurityUtils.getUsername()); |
| | | item.setCreateTime(DateUtils.getNowDate()); |
| | | list.add(item); |
| | | } |
| | | } |
| | | if (!list.isEmpty()) { |
| | | apsMaterialProductGroupManagementMapper.insert(list); |
| | | } |
| | | return list.size(); |
| | | } |
| | | return 0; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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.aps.core.mapper.ApsGasPipelinePredictionMapper"> |
| | | |
| | | <resultMap type="com.aps.core.domain.ApsGasPipelinePrediction" id="ApsGasPipelinePredictionResult"> |
| | | <result property="id" column="id" /> |
| | | <result property="factory" column="factory" /> |
| | | <result property="materialCode" column="material_code" /> |
| | | <result property="predictDate" column="predict_date" /> |
| | | <result property="createBy" column="create_by" /> |
| | | <result property="createTime" column="create_time" /> |
| | | <result property="updateBy" column="update_by" /> |
| | | <result property="updateTime" column="update_time" /> |
| | | <result property="predictQuantity" column="predict_quantity" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectApsGasPipelinePredictionVo"> |
| | | select id, factory, material_code, predict_date, create_by, create_time, update_by, update_time, predict_quantity from aps_gas_pipeline_prediction |
| | | </sql> |
| | | |
| | | <select id="selectApsGasPipelinePredictionList" parameterType="ApsGasPipelinePrediction" resultMap="ApsGasPipelinePredictionResult"> |
| | | <include refid="selectApsGasPipelinePredictionVo"/> |
| | | <where> |
| | | <if test="factory != null and factory != ''"> and factory = #{factory}</if> |
| | | <if test="materialCode != null and materialCode != ''"> and material_code = #{materialCode}</if> |
| | | <if test="predictDate != null and predictDate != ''"> and predict_date = #{predictDate}</if> |
| | | <if test="predictQuantity != null and predictQuantity != ''"> and predict_quantity = #{predictQuantity}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectApsGasPipelinePredictionById" parameterType="Long" resultMap="ApsGasPipelinePredictionResult"> |
| | | </select> |
| | | |
| | | <insert id="insertApsGasPipelinePrediction" parameterType="ApsGasPipelinePrediction"> |
| | | insert into aps_gas_pipeline_prediction |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">id,</if> |
| | | <if test="factory != null">factory,</if> |
| | | <if test="materialCode != null">material_code,</if> |
| | | <if test="predictDate != null">predict_date,</if> |
| | | <if test="createBy != null">create_by,</if> |
| | | <if test="createTime != null">create_time,</if> |
| | | <if test="updateBy != null">update_by,</if> |
| | | <if test="updateTime != null">update_time,</if> |
| | | <if test="predictQuantity != null">predict_quantity,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id},</if> |
| | | <if test="factory != null">#{factory},</if> |
| | | <if test="materialCode != null">#{materialCode},</if> |
| | | <if test="predictDate != null">#{predictDate},</if> |
| | | <if test="createBy != null">#{createBy},</if> |
| | | <if test="createTime != null">#{createTime},</if> |
| | | <if test="updateBy != null">#{updateBy},</if> |
| | | <if test="updateTime != null">#{updateTime},</if> |
| | | <if test="predictQuantity != null">#{predictQuantity},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updateApsGasPipelinePrediction" parameterType="ApsGasPipelinePrediction"> |
| | | update aps_gas_pipeline_prediction |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="factory != null">factory = #{factory},</if> |
| | | <if test="materialCode != null">material_code = #{materialCode},</if> |
| | | <if test="predictDate != null">predict_date = #{predictDate},</if> |
| | | <if test="createBy != null">create_by = #{createBy},</if> |
| | | <if test="createTime != null">create_time = #{createTime},</if> |
| | | <if test="updateBy != null">update_by = #{updateBy},</if> |
| | | <if test="updateTime != null">update_time = #{updateTime},</if> |
| | | <if test="predictQuantity != null">predict_quantity = #{predictQuantity},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <delete id="deleteApsGasPipelinePredictionById" parameterType="Long"> |
| | | delete from aps_gas_pipeline_prediction where id = #{id} |
| | | </delete> |
| | | |
| | | <delete id="deleteApsGasPipelinePredictionByIds" parameterType="String"> |
| | | delete from aps_gas_pipeline_prediction where id in |
| | | <foreach item="id" collection="array" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | |
| | | <delete id="deleteAll" > |
| | | delete from aps_gas_pipeline_prediction |
| | | </delete> |
| | | </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.aps.core.mapper.ApsMaterialProductGroupManagementMapper"> |
| | | |
| | | <resultMap type="com.aps.core.domain.ApsMaterialProductGroupManagement" id="ApsMaterialProductGroupManagementResult"> |
| | | <result property="id" column="id" /> |
| | | <result property="factory" column="factory" /> |
| | | <result property="materialCode" column="material_code" /> |
| | | <result property="domain" column="domain" /> |
| | | <result property="createBy" column="create_by" /> |
| | | <result property="createTime" column="create_time" /> |
| | | <result property="updateBy" column="update_by" /> |
| | | <result property="updateTime" column="update_time" /> |
| | | <result property="isMain" column="is_main" /> |
| | | <result property="materialType" column="material_type" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectApsMaterialProductGroupManagementVo"> |
| | | select id, factory, material_code, domain, create_by, create_time, update_by, update_time, is_main, material_type from aps_material_product_group_management |
| | | </sql> |
| | | |
| | | <select id="selectApsMaterialProductGroupManagementList" parameterType="ApsMaterialProductGroupManagement" resultMap="ApsMaterialProductGroupManagementResult"> |
| | | <include refid="selectApsMaterialProductGroupManagementVo"/> |
| | | <where> |
| | | <if test="factory != null and factory != ''"> and factory = #{factory}</if> |
| | | <if test="materialCode != null and materialCode != ''"> and material_code = #{materialCode}</if> |
| | | <if test="domain != null and domain != ''"> and domain = #{domain}</if> |
| | | <if test="isMain != null and isMain != ''"> and is_main = #{isMain}</if> |
| | | <if test="materialType != null and materialType != ''"> and material_type = #{materialType}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectApsMaterialProductGroupManagementById" parameterType="Long" resultMap="ApsMaterialProductGroupManagementResult"> |
| | | </select> |
| | | |
| | | <insert id="insertApsMaterialProductGroupManagement" parameterType="ApsMaterialProductGroupManagement"> |
| | | insert into aps_material_product_group_management |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">id,</if> |
| | | <if test="factory != null">factory,</if> |
| | | <if test="materialCode != null">material_code,</if> |
| | | <if test="domain != null">domain,</if> |
| | | <if test="createBy != null">create_by,</if> |
| | | <if test="createTime != null">create_time,</if> |
| | | <if test="updateBy != null">update_by,</if> |
| | | <if test="updateTime != null">update_time,</if> |
| | | <if test="isMain != null">is_main,</if> |
| | | <if test="materialType != null">material_type,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id},</if> |
| | | <if test="factory != null">#{factory},</if> |
| | | <if test="materialCode != null">#{materialCode},</if> |
| | | <if test="domain != null">#{domain},</if> |
| | | <if test="createBy != null">#{createBy},</if> |
| | | <if test="createTime != null">#{createTime},</if> |
| | | <if test="updateBy != null">#{updateBy},</if> |
| | | <if test="updateTime != null">#{updateTime},</if> |
| | | <if test="isMain != null">#{isMain},</if> |
| | | <if test="materialType != null">#{materialType},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updateApsMaterialProductGroupManagement" parameterType="ApsMaterialProductGroupManagement"> |
| | | update aps_material_product_group_management |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="factory != null">factory = #{factory},</if> |
| | | <if test="materialCode != null">material_code = #{materialCode},</if> |
| | | <if test="domain != null">domain = #{domain},</if> |
| | | <if test="createBy != null">create_by = #{createBy},</if> |
| | | <if test="createTime != null">create_time = #{createTime},</if> |
| | | <if test="updateBy != null">update_by = #{updateBy},</if> |
| | | <if test="updateTime != null">update_time = #{updateTime},</if> |
| | | <if test="isMain != null">is_main = #{isMain},</if> |
| | | <if test="materialType != null">material_type = #{materialType},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <delete id="deleteApsMaterialProductGroupManagementById" parameterType="Long"> |
| | | delete from aps_material_product_group_management where id = #{id} |
| | | </delete> |
| | | |
| | | <delete id="deleteApsMaterialProductGroupManagementByIds" parameterType="String"> |
| | | delete from aps_material_product_group_management where id in |
| | | <foreach item="id" collection="array" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | |
| | | <delete id="deleteAll" parameterType="String"> |
| | | delete from aps_material_product_group_management |
| | | </delete> |
| | | </mapper> |