hongjli
2025-05-22 e4efff6637f4d598a7efdfca8b62fbb4c3286b02
Merge remote-tracking branch 'origin/dev' into dev
已修改31个文件
已添加2个文件
已删除2个文件
393 ■■■■■ 文件已修改
aps-common/aps-common-redis/src/main/java/com/aps/common/redis/service/RedisLockUtils.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
aps-modules/aps-core/src/main/java/com/aps/core/controller/basicData/ApsGasPipelineCapacityPlanController.java 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
aps-modules/aps-core/src/main/java/com/aps/core/controller/mainPlan/ApsBomHeaderController.java 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
aps-modules/aps-core/src/main/java/com/aps/core/controller/mainPlan/ApsGasPipelineMoController.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
aps-modules/aps-core/src/main/java/com/aps/core/controller/mainPlan/ApsGasPipelinePredictionController.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
aps-modules/aps-core/src/main/java/com/aps/core/domain/ApsGasPipelineCapacityPlan.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
aps-modules/aps-core/src/main/java/com/aps/core/enums/PLAN_TASK_STATUS.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
aps-modules/aps-core/src/main/java/com/aps/core/mapper/ApsGasPipelineCapacityPlanMapper.java 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
aps-modules/aps-core/src/main/java/com/aps/core/service/ApsPlate/IApsPlateStandardRequireBatchService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
aps-modules/aps-core/src/main/java/com/aps/core/service/ApsPlate/IApsPlateStandardRequireErrorService.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
aps-modules/aps-core/src/main/java/com/aps/core/service/IApsBomHeaderService.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
aps-modules/aps-core/src/main/java/com/aps/core/service/IApsGasPipelineCapacityPlanService.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsBomHeaderServiceImpl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsBomServiceImpl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsGasPipelineCapacityPlanServiceImpl.java 78 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsPlanTaskServiceImpl.java 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsPlate/ApsPlateProcessShopStatServiceImpl.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsPlate/ApsPlateProcessStatServiceImpl.java 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsPlate/ApsPlateStandardRequireBatchServiceImpl.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsPlate/ApsPlateStandardRequireErrorServiceImpl.java 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsPlate/ApsPlateStandardRequireServiceImpl.java 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsStandardProcessRouteLineServiceImpl.java 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
aps-modules/aps-core/src/main/resources/mapper/core/ApsBomHeaderMapper.xml 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
aps-modules/aps-core/src/main/resources/mapper/core/ApsGasPipelineCapacityPlanMapper.xml 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
aps-modules/aps-core/src/main/resources/mapper/core/ApsPlate/ApsPlateProcessStatMapper.xml 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
aps-modules/aps-core/src/main/resources/mapper/core/ApsPlate/ApsPlateStandardRequireBomOrderDetailMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
aps-modules/aps-core/src/main/resources/mapper/core/ApsPlate/ApsPlateStandardRequireBomStockDetailMapper.xml 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
aps-modules/aps-core/src/main/resources/mapper/core/ApsPlate/ApsPlateStandardRequireErrorMapper.xml 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
aps-modules/aps-core/src/main/resources/mapper/core/ApsPlate/ApsPlateStandardRequireMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
aps-modules/aps-core/src/main/resources/templates/上传气体工单数据模板.xlsx 补丁 | 查看 | 原始文档 | blame | 历史
aps-modules/aps-core/src/main/resources/templates/上传气体预测数据模板.xlsx 补丁 | 查看 | 原始文档 | blame | 历史
aps-modules/aps-core/src/main/resources/templates/气体工单数据模板v1.0.xlsx 补丁 | 查看 | 原始文档 | blame | 历史
aps-modules/aps-core/src/main/resources/templates/气体预测数据模板v1.0.xlsx 补丁 | 查看 | 原始文档 | blame | 历史
aps-modules/aps-job/src/main/java/com/aps/job/service/impl/ApsWeldSeamStandardJobServiceImpl.java 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
aps-modules/aps-job/src/main/java/com/aps/job/util/AbstractQuartzJob.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
aps-common/aps-common-redis/src/main/java/com/aps/common/redis/service/RedisLockUtils.java
@@ -29,6 +29,9 @@
     * åˆ¤æ–­æ˜¯å¦å­˜åœ¨é”
     * */
    public boolean existLock(String key,String value){
        if(null==this.redisTemplate.opsForValue().get(key)){
            return false;
        }
        return this.redisTemplate.opsForValue().get(key).equals(value);
    }
aps-modules/aps-core/src/main/java/com/aps/core/controller/basicData/ApsGasPipelineCapacityPlanController.java
@@ -32,8 +32,7 @@
@Tag(name = "气体管路产能规划", description = "气体管路产能规划接口")
@RestController
@RequestMapping("/gasPipelineCapacityPlan")
public class ApsGasPipelineCapacityPlanController extends BaseController
{
public class ApsGasPipelineCapacityPlanController extends BaseController {
    @Autowired
    private IApsGasPipelineCapacityPlanService apsGasPipelineCapacityPlanService;
@@ -46,8 +45,7 @@
    @Operation(summary = "查询气体管路产能规划列表", description = "分页查询")
    @RequiresPermissions("aps:gasPipelineCapacityPlan:list")
    @GetMapping("/list")
    public TableDataInfo list(ApsGasPipelineCapacityPlan apsGasPipelineCapacityPlan)
    {
    public TableDataInfo list(ApsGasPipelineCapacityPlan apsGasPipelineCapacityPlan) {
//        startPage();
        List<ApsGasPipelineCapacityPlan> list = apsGasPipelineCapacityPlanService.selectApsGasPipelineCapacityPlanList(apsGasPipelineCapacityPlan);
        ApsStandardProcess apsStandardProcess = new ApsStandardProcess();
@@ -93,11 +91,31 @@
    @RequiresPermissions("aps:gasPipelineCapacityPlan:export")
    @Log(title = "气体管路产能规划", businessType = BusinessType.EXPORT)
    @PostMapping("/export")
    public void export(HttpServletResponse response, ApsGasPipelineCapacityPlan apsGasPipelineCapacityPlan)
    {
    public void export(HttpServletResponse response, ApsGasPipelineCapacityPlan apsGasPipelineCapacityPlan) {
        List<ApsGasPipelineCapacityPlan> list = apsGasPipelineCapacityPlanService.selectApsGasPipelineCapacityPlanList(apsGasPipelineCapacityPlan);
        ExcelUtil<ApsGasPipelineCapacityPlan> util = new ExcelUtil<ApsGasPipelineCapacityPlan>(ApsGasPipelineCapacityPlan.class);
        util.exportExcel(response, list, "气体管路产能规划数据");
    }
    /**
     * å¤åˆ¶æ°”体管路产能规划
     */
    @Operation(summary = "复制气体管路产能规划", description = "复制")
//    @RequiresPermissions("aps:gasPipelineCapacityPlan:copy")
    @Log(title = "复制气体管路产能规划", businessType = BusinessType.INSERT)
    @PutMapping("/copy")
    public AjaxResult copy(
            // æ ¼å¼ï¼šyyyy-MM
            @RequestParam String date,
            @RequestParam String factory,
            @RequestParam String major,
            // æ ¼å¼ï¼šyyyy-MM
            @RequestParam String toStart,
            // æ ¼å¼ï¼šyyyy-MM
            @RequestParam String toEnd) {
        apsGasPipelineCapacityPlanService.copyPlan(date, factory, major, toStart, toEnd);
        return success();
    }
    /**
@@ -106,8 +124,7 @@
    @Operation(summary = "获取气体管路产能规划详细信息", description = "根据id获取")
    @RequiresPermissions("aps:gasPipelineCapacityPlan:query")
    @GetMapping(value = "/{id}")
    public AjaxResult getInfo(@PathVariable("id") Long id)
    {
    public AjaxResult getInfo(@PathVariable("id") Long id) {
        return success(apsGasPipelineCapacityPlanService.selectApsGasPipelineCapacityPlanById(id));
    }
@@ -118,8 +135,7 @@
    @RequiresPermissions("aps:gasPipelineCapacityPlan:add")
    @Log(title = "气体管路产能规划", businessType = BusinessType.INSERT)
    @PostMapping
    public AjaxResult add(@RequestBody List<ApsGasPipelineCapacityPlan> apsGasPipelineCapacityPlan)
    {
    public AjaxResult add(@RequestBody List<ApsGasPipelineCapacityPlan> apsGasPipelineCapacityPlan) {
        apsGasPipelineCapacityPlan.forEach(apsGasPipelineCapacityPlanTemp -> {
            if(apsGasPipelineCapacityPlanTemp.getId()==null){
                apsGasPipelineCapacityPlanTemp.setCreateBy(SecurityUtils.getUsername());
@@ -141,8 +157,7 @@
    @RequiresPermissions("aps:gasPipelineCapacityPlan:edit")
    @Log(title = "气体管路产能规划", businessType = BusinessType.UPDATE)
    @PutMapping
    public AjaxResult edit(@RequestBody ApsGasPipelineCapacityPlan apsGasPipelineCapacityPlan)
    {
    public AjaxResult edit(@RequestBody ApsGasPipelineCapacityPlan apsGasPipelineCapacityPlan) {
        return toAjax(apsGasPipelineCapacityPlanService.updateApsGasPipelineCapacityPlan(apsGasPipelineCapacityPlan));
    }
@@ -153,8 +168,7 @@
    @RequiresPermissions("aps:gasPipelineCapacityPlan:remove")
    @Log(title = "气体管路产能规划", businessType = BusinessType.DELETE)
    @DeleteMapping("/{ids}")
    public AjaxResult remove(@PathVariable Long[] ids)
    {
    public AjaxResult remove(@PathVariable Long[] ids) {
        return toAjax(apsGasPipelineCapacityPlanService.deleteApsGasPipelineCapacityPlanByIds(ids));
    }
}
aps-modules/aps-core/src/main/java/com/aps/core/controller/mainPlan/ApsBomHeaderController.java
@@ -129,7 +129,8 @@
    @PostMapping("/setBomDataToRedis")
    public void setBomDataToRedis()
    {
        apsBomHeaderService.setBomDataToRedis("");
        apsBomHeaderService.setBomDataToRedis("FORTUNA");
        //apsBomHeaderService.setBomDataToRedis("FORTUNE");
    }
    @PostMapping("/test")
@@ -137,4 +138,10 @@
    {
        apsBomHeaderService.setBomDataToRedis("FORTUNA");
    }
    @GetMapping("/getBomRdsCount/{orgCode}")
    public Integer getBomRdsCount(String orgCode)
    {
        return apsBomHeaderService.getBomKeys(orgCode);
    }
}
aps-modules/aps-core/src/main/java/com/aps/core/controller/mainPlan/ApsGasPipelineMoController.java
@@ -130,13 +130,14 @@
     */
    @SneakyThrows
    @Operation(summary = "下载气体工单数据导入模板", description = "下载气体工单数据导入模板")
    @RequiresPermissions("gasPipeline:mo:template")
    @Log(title = "下载气体工单数据导入模板", businessType = BusinessType.EXPORT)
//    @RequiresPermissions("gasPipeline:mo:template")
//    @Log(title = "下载气体工单数据导入模板", businessType = BusinessType.EXPORT)
    @GetMapping("/template")
    public ResponseEntity<ByteArrayResource> exportTemplate() {
        byte[] file = IOUtils.resourceToByteArray("/templates/上传气体工单数据模板.xlsx");
        byte[] file = IOUtils.resourceToByteArray("/templates/气体工单数据模板v1.0.xlsx");
        ByteArrayResource resource = new ByteArrayResource(file);
        return ResponseEntity.ok()
                .header("Access-Control-Expose-Headers", HttpHeaders.CONTENT_DISPOSITION)
                .header(HttpHeaders.CONTENT_DISPOSITION,
                        String.format("attachment;filename=%s", URLEncoder.encode("气体工单数据模板.xlsx", StandardCharsets.UTF_8)))
                .header(HttpHeaders.CONTENT_TYPE, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")
aps-modules/aps-core/src/main/java/com/aps/core/controller/mainPlan/ApsGasPipelinePredictionController.java
@@ -70,13 +70,14 @@
     */
    @SneakyThrows
    @Operation(summary = "下载气体预测数据导入模板", description = "下载气体预测数据导入模板")
    @RequiresPermissions("gasPipeline:prediction:template")
    @Log(title = "下载气体预测数据导入模板", businessType = BusinessType.EXPORT)
//    @RequiresPermissions("gasPipeline:prediction:template")
//    @Log(title = "下载气体预测数据导入模板", businessType = BusinessType.EXPORT)
    @GetMapping("/template")
    public ResponseEntity<ByteArrayResource> exportTemplate() {
        byte[] file = IOUtils.resourceToByteArray("/templates/上传气体预测数据模板.xlsx");
        byte[] file = IOUtils.resourceToByteArray("/templates/气体预测数据模板v1.0.xlsx");
        ByteArrayResource resource = new ByteArrayResource(file);
        return ResponseEntity.ok()
                .header("Access-Control-Expose-Headers", HttpHeaders.CONTENT_DISPOSITION)
                .header(HttpHeaders.CONTENT_DISPOSITION,
                        String.format("attachment;filename=%s", URLEncoder.encode("气体预测数据模板.xlsx", StandardCharsets.UTF_8)))
                .header(HttpHeaders.CONTENT_TYPE, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")
aps-modules/aps-core/src/main/java/com/aps/core/domain/ApsGasPipelineCapacityPlan.java
@@ -2,9 +2,14 @@
import com.aps.common.core.annotation.Excel;
import com.aps.common.core.web.domain.BaseEntity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
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 org.springframework.data.annotation.Id;
import java.math.BigDecimal;
@@ -14,12 +19,16 @@
 * @author hjy
 * @date 2025-04-24
 */
@Data
@Schema(description = "气体管路产能规划实体类")
public class ApsGasPipelineCapacityPlan extends BaseEntity
{
    private static final long serialVersionUID = 1L;
    @Id
    @TableId(type = IdType.AUTO)
    /** ä¸»é”®id */
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @Schema(description = "主键id", type = "Long")
    private Long id;
@@ -58,6 +67,7 @@
    @Schema(description = "日产出单位", type = "String")
    private String dayProduceUnit;
    /** äººå‘˜æ•°é‡ */
    @Excel(name = "人员数量")
    @Schema(description = "人员数量", type = "BigDecimal")
@@ -83,6 +93,12 @@
    @Schema(description = "工厂代码", type = "String")
    private String orgCode;
    /** è½¦é—´ */
    @Excel(name = "车间")
    @Schema(description = "车间", type = "String")
    private String workshop;
    public void setOrgCode(String orgCode)
    {
        this.orgCode = orgCode;
aps-modules/aps-core/src/main/java/com/aps/core/enums/PLAN_TASK_STATUS.java
@@ -2,8 +2,8 @@
public enum PLAN_TASK_STATUS {
    IN_PROCESS("InProgress","进行中"),
    FINISHED("Finished","完成");
    FINISHED("Finished","完成"),
    ERROR("Error","失败");
    private String code;
    private String desc;
aps-modules/aps-core/src/main/java/com/aps/core/mapper/ApsGasPipelineCapacityPlanMapper.java
@@ -1,6 +1,7 @@
package com.aps.core.mapper;
import com.aps.core.domain.ApsGasPipelineCapacityPlan;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@@ -12,7 +13,7 @@
 * @date 2025-04-24
 */
@Mapper
public interface ApsGasPipelineCapacityPlanMapper
public interface ApsGasPipelineCapacityPlanMapper extends BaseMapper<ApsGasPipelineCapacityPlan>
{
    /**
     * æŸ¥è¯¢æ°”体管路产能规划
@@ -61,4 +62,6 @@
     * @return ç»“æžœ
     */
    public int deleteApsGasPipelineCapacityPlanByIds(Long[] ids);
    void deleteByDateAndFactory(String year, String month, String factory, String major);
}
aps-modules/aps-core/src/main/java/com/aps/core/service/ApsPlate/IApsPlateStandardRequireBatchService.java
@@ -63,5 +63,5 @@
    String getNewBatchNumber();
    @Transactional
    void initRequireBatch();
    void initRequireBatch(String batchNumber);
}
aps-modules/aps-core/src/main/java/com/aps/core/service/ApsPlate/IApsPlateStandardRequireErrorService.java
@@ -1,6 +1,8 @@
package com.aps.core.service.ApsPlate;
import java.util.List;
import com.aps.core.domain.ApsPlate.ApsPlateStandardRequire;
import com.aps.core.domain.ApsPlate.ApsPlateStandardRequireError;
/**
@@ -58,4 +60,6 @@
     * @return ç»“æžœ
     */
    public int deleteApsPlateStandardRequireErrorById(Long id);
    void saveRequireError(ApsPlateStandardRequire require, String message);
}
aps-modules/aps-core/src/main/java/com/aps/core/service/IApsBomHeaderService.java
@@ -66,4 +66,6 @@
     * @return
     */
    public boolean setBomDataToRedis(String orgCode);
    Integer getBomKeys(String orgCode);
}
aps-modules/aps-core/src/main/java/com/aps/core/service/IApsGasPipelineCapacityPlanService.java
@@ -59,4 +59,6 @@
     * @return ç»“æžœ
     */
    public int deleteApsGasPipelineCapacityPlanById(Long id);
    void copyPlan(String date, String factory, String major, String toStart, String toEnd);
}
aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsBomHeaderServiceImpl.java
@@ -131,4 +131,8 @@
        }
        return true;
    }
    @Override
    public Integer getBomKeys(String orgCode){
        return redisTemplate.keys("BOM:BOM_"+orgCode+"*").size();
    }
}
aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsBomServiceImpl.java
@@ -140,10 +140,6 @@
                bomLineList.add(apsBom);
            }
        }
//        else {
//            bomLineList = selectApsBomLineList(plant, itemNumber);
//        }
        return bomLineList;
    }
}
aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsGasPipelineCapacityPlanServiceImpl.java
@@ -5,9 +5,16 @@
import com.aps.core.domain.ApsGasPipelineCapacityPlan;
import com.aps.core.mapper.ApsGasPipelineCapacityPlanMapper;
import com.aps.core.service.IApsGasPipelineCapacityPlanService;
import lombok.SneakyThrows;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.sql.Timestamp;
import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
/**
@@ -17,8 +24,7 @@
 * @date 2025-04-24
 */
@Service
public class ApsGasPipelineCapacityPlanServiceImpl implements IApsGasPipelineCapacityPlanService
{
public class ApsGasPipelineCapacityPlanServiceImpl implements IApsGasPipelineCapacityPlanService {
    @Autowired
    private ApsGasPipelineCapacityPlanMapper apsGasPipelineCapacityPlanMapper;
@@ -29,8 +35,7 @@
     * @return æ°”体管路产能规划
     */
    @Override
    public ApsGasPipelineCapacityPlan selectApsGasPipelineCapacityPlanById(Long id)
    {
    public ApsGasPipelineCapacityPlan selectApsGasPipelineCapacityPlanById(Long id) {
        return apsGasPipelineCapacityPlanMapper.selectApsGasPipelineCapacityPlanById(id);
    }
@@ -41,8 +46,7 @@
     * @return æ°”体管路产能规划
     */
    @Override
    public List<ApsGasPipelineCapacityPlan> selectApsGasPipelineCapacityPlanList(ApsGasPipelineCapacityPlan apsGasPipelineCapacityPlan)
    {
    public List<ApsGasPipelineCapacityPlan> selectApsGasPipelineCapacityPlanList(ApsGasPipelineCapacityPlan apsGasPipelineCapacityPlan) {
        return apsGasPipelineCapacityPlanMapper.selectApsGasPipelineCapacityPlanList(apsGasPipelineCapacityPlan);
    }
@@ -53,8 +57,7 @@
     * @return ç»“æžœ
     */
    @Override
    public int insertApsGasPipelineCapacityPlan(ApsGasPipelineCapacityPlan apsGasPipelineCapacityPlan)
    {
    public int insertApsGasPipelineCapacityPlan(ApsGasPipelineCapacityPlan apsGasPipelineCapacityPlan) {
        apsGasPipelineCapacityPlan.setCreateTime(DateUtils.getNowDate());
        apsGasPipelineCapacityPlan.setCreateBy(SecurityUtils.getUsername());
        return apsGasPipelineCapacityPlanMapper.insertApsGasPipelineCapacityPlan(apsGasPipelineCapacityPlan);
@@ -67,8 +70,7 @@
     * @return ç»“æžœ
     */
    @Override
    public int updateApsGasPipelineCapacityPlan(ApsGasPipelineCapacityPlan apsGasPipelineCapacityPlan)
    {
    public int updateApsGasPipelineCapacityPlan(ApsGasPipelineCapacityPlan apsGasPipelineCapacityPlan) {
        apsGasPipelineCapacityPlan.setUpdateTime(DateUtils.getNowDate());
        apsGasPipelineCapacityPlan.setUpdateBy(SecurityUtils.getUsername());
        return apsGasPipelineCapacityPlanMapper.updateApsGasPipelineCapacityPlan(apsGasPipelineCapacityPlan);
@@ -81,8 +83,7 @@
     * @return ç»“æžœ
     */
    @Override
    public int deleteApsGasPipelineCapacityPlanByIds(Long[] ids)
    {
    public int deleteApsGasPipelineCapacityPlanByIds(Long[] ids) {
        return apsGasPipelineCapacityPlanMapper.deleteApsGasPipelineCapacityPlanByIds(ids);
    }
@@ -93,8 +94,57 @@
     * @return ç»“æžœ
     */
    @Override
    public int deleteApsGasPipelineCapacityPlanById(Long id)
    {
    public int deleteApsGasPipelineCapacityPlanById(Long id) {
        return apsGasPipelineCapacityPlanMapper.deleteApsGasPipelineCapacityPlanById(id);
    }
    @SneakyThrows
    @Override
    @Transactional(rollbackFor = Exception.class)
    public void copyPlan(String date, String factory, String major, String toStart, String toEnd) {
        String[] dtSrc = date.split("-");
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM");
        Calendar dtStart = Calendar.getInstance();
        dtStart.setTime(sdf.parse(toStart));
        dtStart.set(Calendar.DAY_OF_MONTH, 1);
        Calendar dtEnd = Calendar.getInstance();
        dtEnd.setTime(sdf.parse(toEnd));
        dtEnd.set(Calendar.DAY_OF_MONTH, 2);
        ApsGasPipelineCapacityPlan plan = new ApsGasPipelineCapacityPlan();
        plan.setYear(Integer.valueOf(dtSrc[0]).toString());
        plan.setMonth(Integer.valueOf(dtSrc[1]).toString());
        plan.setOrgCode(factory);
        plan.setMajor(major);
        List<ApsGasPipelineCapacityPlan> templatePlans = apsGasPipelineCapacityPlanMapper.selectApsGasPipelineCapacityPlanList(plan);
        templatePlans.forEach(p -> {
            p.setCreateBy(SecurityUtils.getUsername());
            p.setCreateTime(new Date());
            p.setUpdateBy(null);
            p.setUpdateTime(null);
//                apsGasPipelineCapacityPlanMapper.insertApsGasPipelineCapacityPlan(p);
        });
        while (dtStart.before(dtEnd)) {
            String year = dtStart.get(Calendar.YEAR) + "";
            String month = (dtStart.get(Calendar.MONTH) + 1) + "";
            apsGasPipelineCapacityPlanMapper.deleteByDateAndFactory(
                    year,
                    month,
                    factory,
                    major
            );
            templatePlans.forEach(p -> {
                p.setId(null);
                p.setYear(year);
                p.setMonth(month);
//                apsGasPipelineCapacityPlanMapper.insertApsGasPipelineCapacityPlan(p);
            });
            apsGasPipelineCapacityPlanMapper.insert(templatePlans);
            dtStart.add(Calendar.MONTH, 1);
        }
    }
}
aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsPlanTaskServiceImpl.java
@@ -90,8 +90,7 @@
    }
    @Override
    public AjaxResult generatorPlan()
    {
    public AjaxResult generatorPlan() {
        String plateOrderPlanKey = PLATE_ORDER_PLAN.getKey();
        boolean existsLock = redisLockUtils.existLock(plateOrderPlanKey, PLAN_TASK_TYPE.PLATE_PLAN.getCode());
        if (existsLock){
@@ -104,19 +103,21 @@
        if (existsDbTask){
            return AjaxResult.warn("钣金工单计划任务正在执行中!!");
        }
        String currentBatchNum = requireBatchService.getNewBatchNumber();
        try {
            redisLockUtils.getLock(plateOrderPlanKey,PLAN_TASK_TYPE.PLATE_PLAN.getCode(), 3*60L);
            String batchNum= requireBatchService.getNewBatchNumber();
            this.savePlanTask(batchNum);
            apsPlateStandardRequireService.generatorPlan(batchNum);
            this.updateTaskStatus(batchNum, PLAN_TASK_STATUS.FINISHED);
            redisLockUtils.getLock(plateOrderPlanKey, PLAN_TASK_TYPE.PLATE_PLAN.getCode(), 15 * 60L);
            this.savePlanTask(currentBatchNum);
            //Thread.sleep(60*1000);
            apsPlateStandardRequireService.generatorPlan(currentBatchNum);
            /*清除已经存在的 å·¥å•计划完工时间*/
            orderEndDayMapper.batchRemove();
            log.info("计划任务执行完成!"+batchNum);
            this.updateTaskStatus(currentBatchNum, PLAN_TASK_STATUS.FINISHED);
            log.info("计划任务执行完成!" + currentBatchNum);
            return success();
        }catch (Exception e){
            redisLockUtils.releaseLock(plateOrderPlanKey,PLAN_TASK_TYPE.PLATE_PLAN.getCode());
            log.error("计划任务执行失败!"+e.getMessage());
            this.updateTaskStatus(currentBatchNum, PLAN_TASK_STATUS.ERROR);
            return AjaxResult.error("计划任务执行失败!"+e.getMessage());
        }finally {
            redisLockUtils.releaseLock(plateOrderPlanKey,PLAN_TASK_TYPE.PLATE_PLAN.getCode());
aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsPlate/ApsPlateProcessShopStatServiceImpl.java
@@ -18,6 +18,7 @@
import com.aps.core.domain.ApsPlate.ApsPlateProcessShopStat;
import com.aps.core.domain.ApsPlate.ApsPlateProcessStat;
import com.aps.core.mapper.*;
import com.aps.core.service.ApsPlate.IApsPlateProcessStatService;
import com.aps.system.api.domain.SysDictData;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.node.ObjectNode;
@@ -59,6 +60,9 @@
    @Resource
    private ApsPlatePlanMapper apsPlatePlanMapper;
    @Autowired
    private IApsPlateProcessStatService apsPlateProcessStatService;
    /**
@@ -136,6 +140,7 @@
    @Override
    public void saveShopStat() {
        try {
            apsPlateProcessStatService.savePlateProcessStat();
            // å¼€å§‹ä¹‹å‰å…ˆåˆ é™¤æ‰€æœ‰åŽ†å²æ•°æ®
            apsPlateProcessShopStatMapper.deleteAll();
aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsPlate/ApsPlateProcessStatServiceImpl.java
@@ -2,12 +2,15 @@
import java.math.BigDecimal;
import java.time.*;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
import cn.hutool.core.util.IdUtil;
import com.aps.common.core.utils.uuid.IdUtils;
import com.aps.common.security.utils.SecurityUtils;
import com.aps.core.domain.ApsPlate.ApsPlateStandardRequireBomOrderDetail;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.aps.core.mapper.ApsPlateProcessStatMapper;
@@ -109,9 +112,11 @@
    public void savePlateProcessStat() {
        String batchNum = IdUtils.fastSimpleUUID();
        List<ApsPlateProcessStat> tempList = apsPlateProcessStatMapper.queryTempStat();
        ApsPlateProcessStat apsPlateProcessStat = tempList.stream().filter(x -> x.getWorkOrderNo().equals("MO-250409003498")).findFirst().get();
        Map<String, List<ApsPlateProcessStat>> groupByOrderNo = tempList.stream().collect(groupingBy(ApsPlateProcessStat::getWorkOrderNo));
        Boolean hasBefore = false;
        LocalDateTime now = LocalDateTime.now();
        List<ApsPlateProcessStat> totalList=new ArrayList<>();
        for (Map.Entry<String, List<ApsPlateProcessStat>> entry : groupByOrderNo.entrySet()) {
            List<ApsPlateProcessStat> statPerOrder = entry.getValue();
            /*num ä¸ºæ ¹æ®å®Œå·¥æ—¶é—´æŽ’序出的序号,按此排序,可保证是按完工时间倒叙排列*/
@@ -176,13 +181,21 @@
                    }
                }
                last = stat;
                apsPlateProcessStatMapper.insertApsPlateProcessStat(stat);
                totalList.add(stat);
                //apsPlateProcessStatMapper.insertApsPlateProcessStat(stat);
            }
            hasBefore=false;
        }
        apsPlateProcessStatMapper.removeOtherStat(batchNum);
        if(!totalList.isEmpty()){
            int batchSize = 1000;
            totalList.forEach(x->x.setId(String.valueOf(IdUtil.getSnowflakeNextId())));
            for (int i = 0; i < totalList.size(); i += batchSize) {
                int end = Math.min(i + batchSize, totalList.size());
                List<ApsPlateProcessStat> batch = totalList.subList(i, end);
                apsPlateProcessStatMapper.batchInsertPlateStat(batch);
            }
        }
    }
aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsPlate/ApsPlateStandardRequireBatchServiceImpl.java
@@ -136,16 +136,12 @@
    @Transactional
    @Override
    public void initRequireBatch() {
        ApsPlateStandardRequireBatch batch=apsPlateStandardRequireBatchMapper.selectLastRequireBatch();
        if (batch!=null){
            String batchNumber = batch.getBatchNumber();
            apsPlateStandardRequireMapper.deleteLastPatch(batchNumber);
            apsPlateStandardRequireBomOrderDetailMapper.deleteLastPatch(batchNumber);
            apsPlateStandardRequireBomStockDetailMapper.deleteLastPatch(batchNumber);
            apsPlateStandardRequireErrorMapper.deleteLastPatch(batchNumber);
    public void initRequireBatch(String currentBatchNumber) {
        apsPlateStandardRequireMapper.deleteLastPatch(currentBatchNumber);
        apsPlateStandardRequireBomOrderDetailMapper.deleteLastPatch(currentBatchNumber);
        apsPlateStandardRequireBomStockDetailMapper.deleteLastPatch(currentBatchNumber);
        apsPlateStandardRequireErrorMapper.deleteLastPatch(currentBatchNumber);
            apsPlatePlanMapper.initUnMatchQty();
            apsMaterialStorageManagementMapper.initRemainderStock();
        }
    }
}
aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsPlate/ApsPlateStandardRequireErrorServiceImpl.java
@@ -1,7 +1,11 @@
package com.aps.core.service.impl.ApsPlate;
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.ApsPlate.ApsPlateStandardRequire;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.aps.core.mapper.ApsPlateStandardRequireErrorMapper;
@@ -93,4 +97,21 @@
    {
        return apsPlateStandardRequireErrorMapper.deleteApsPlateStandardRequireErrorById(id);
    }
    @Override
    public void saveRequireError(ApsPlateStandardRequire require, String message) {
        ApsPlateStandardRequireError data = ApsPlateStandardRequireError.builder()
                .id(IdUtil.getSnowflakeNextId())
                .requireId(require.getId())
                .batchNumber(require.getBatchNumber())
                .docNum(require.getDocNum())
                .itemNum(require.getBomLineCode())
                .orgCode(require.getOrgCode())
                .message(message)
                .delFlag("0")
                .build();
        data.setCreateBy(SecurityUtils.getUsername());
        data.setCreateTime(DateUtils.getNowDate());
        apsPlateStandardRequireErrorMapper.insertApsPlateStandardRequireError(data);
    }
}
aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsPlate/ApsPlateStandardRequireServiceImpl.java
@@ -1,29 +1,27 @@
package com.aps.core.service.impl.ApsPlate;
import java.math.BigDecimal;
import java.util.*;
import cn.hutool.core.util.IdUtil;
import com.aps.common.core.utils.DateUtils;
import com.aps.common.security.utils.DictUtils;
import com.aps.common.security.utils.SecurityUtils;
import com.aps.core.domain.*;
import com.aps.core.domain.ApsPlate.ApsPlatePlan;
import com.aps.core.domain.ApsPlate.ApsPlateStandardRequireBomOrderDetail;
import com.aps.core.domain.ApsPlate.ApsPlateStandardRequireBomStockDetail;
import com.aps.core.domain.ApsBom;
import com.aps.core.domain.ApsMaterialStorageManagement;
import com.aps.core.domain.ApsPlate.*;
import com.aps.core.domain.ApsStandardProcessRouteLine;
import com.aps.core.mapper.*;
import com.aps.core.service.*;
import com.aps.core.service.ApsPlate.*;
import com.aps.core.service.IApsBomService;
import com.aps.core.service.IApsMaterialStorageManagementService;
import com.aps.core.service.IApsStandardProcessRouteLineService;
import com.aps.system.api.domain.SysDictData;
import jakarta.annotation.Resource;
import com.aps.core.domain.ApsPlate.ApsPlateStandardRequire;
import com.aps.core.mapper.ApsPlateStandardRequireMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
import java.math.BigDecimal;
import java.util.*;
/**
 * é’£é‡‘工单标准需求Service业务层处理
@@ -39,29 +37,17 @@
    private ApsPlateStandardRequireMapper apsPlateStandardRequireMapper;
    @Resource
    private ApsPlateStandardRequireBatchMapper requireBatchMapper;
    @Resource
    ApsPlatePlanMapper platePlanMapper;
    @Resource
    ApsBomHeaderMapper bomHeaderMapper;
    @Resource
    IApsBomService bomLineService;
    @Resource
    ApsMaterialStorageManagementMapper itemStorageMapper;
    @Resource
    ApsPlateStandardRequireBomStockDetailMapper plateBomStockDetailMapper;
    @Resource
    IApsPlateStandardRequireBomStockDetailService bomStockDetailService;
    @Resource
    ApsStandardProcessRouteHeaderMapper standardProcessRouteHeaderMapper;
    @Resource
    ApsStandardProcessRouteLineMapper ApsStandardProcessRouteLineMapper;
    @Resource
    ApsPlateStandardRequireBomOrderDetailMapper plateBomOrderDetailMapper;
@@ -76,10 +62,11 @@
    IApsStandardProcessRouteLineService routeLineService;
    @Resource
    IApsPlateStandardRequireBatchService requireBatchService;
    IApsPlateStandardRequireErrorService requireErrorService;
    @Resource
    private IApsMaterialStorageManagementService storageManagementService;
    @Resource
    IApsPlateStandardRequireBatchService requireBatchService;
    /**
     * æŸ¥è¯¢é’£é‡‘工单标准需求
     * 
@@ -167,9 +154,7 @@
    @Transactional
    @Override
    public void generatorPlan(String batchNum){
        /*初始化数据*/
        requireBatchService.initRequireBatch();
        requireBatchService.initRequireBatch(batchNum);
        /*定义工厂为南通 */
        String plantCode="FORTUNA";
        /*获取钣金主单信息*/
@@ -296,7 +281,10 @@
        if (itemStorageOpt.isPresent()) {
            ApsMaterialStorageManagement     itemStorage=itemStorageOpt.get();
            BigDecimal remainderStock =itemStorage.getRemainderStock();
            BigDecimal remainderStock =BigDecimal.ZERO;
            if(null!=itemStorage.getRemainderStock()){
                remainderStock = itemStorage.getRemainderStock();
            }
            /*计算净需求 é»˜è®¤=需求数量*/
            if (remainderStock.compareTo(BigDecimal.ZERO) == 0) {
                require.setNetRequirement(require.getBomUseAmount());
aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsStandardProcessRouteLineServiceImpl.java
@@ -12,6 +12,7 @@
import com.aps.core.domain.ApsStandardProcessRouteHeader;
import com.aps.core.mapper.ApsPlateStandardRequireErrorMapper;
import com.aps.core.mapper.ApsStandardProcessRouteHeaderMapper;
import com.aps.core.service.ApsPlate.IApsPlateStandardRequireErrorService;
import jakarta.annotation.Resource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
@@ -34,7 +35,7 @@
    @Resource
    ApsStandardProcessRouteHeaderMapper standardProcessRouteHeaderMapper;
    @Resource
    ApsPlateStandardRequireErrorMapper requireErrorMapper;
    IApsPlateStandardRequireErrorService requireErrorService;
    @Resource
    private RedisTemplate redisTemplate;
@@ -141,7 +142,7 @@
            ret.setRouteTime(totalRouteTime);
            ret.setRouteId(routeHeader.getRouteId());
        }else {
            saveRequireError(require,"标准工艺路线不存在");
            requireErrorService.saveRequireError(require,"标准工艺路线不存在");
        }
        // è¿”回总工时
        return ret;
@@ -170,7 +171,7 @@
            ret.setRouteTime(totalRouteTime.multiply(netRequirement));
            return  ret;
        } else {
            saveRequireError(require,"标准工艺路线不存在");
            requireErrorService.saveRequireError(require,"标准工艺路线不存在");
            /*// æŸ¥è¯¢æ ‡å‡†å·¥è‰ºè·¯çº¿å¤´éƒ¨ä¿¡æ¯
            Optional<ApsStandardProcessRouteHeader> firstProcessRoute = standardProcessRouteHeaderMapper.queryStandardProcessRouteHeaderByPlantAndItemCode(plant, itemCode).stream().findFirst();
            if (firstProcessRoute.isPresent()) {
@@ -193,19 +194,4 @@
        }
    }
    private void saveRequireError(ApsPlateStandardRequire require,String message) {
        ApsPlateStandardRequireError data = ApsPlateStandardRequireError.builder()
                .id(IdUtil.getSnowflakeNextId())
                .requireId(require.getId())
                .batchNumber(require.getBatchNumber())
                .docNum(require.getDocNum())
                .itemNum(require.getBomLineCode())
                .orgCode(require.getOrgCode())
                .message(message)
                .delFlag("0")
                .build();
        data.setCreateBy(SecurityUtils.getUsername());
        data.setCreateTime(DateUtils.getNowDate());
        requireErrorMapper.insertApsPlateStandardRequireError(data);
    }
}
aps-modules/aps-core/src/main/resources/mapper/core/ApsBomHeaderMapper.xml
@@ -109,13 +109,10 @@
        LEFT JOIN aps_bom_line b on a.bom_header_id=b.bom_header_id
        LEFT JOIN aps_material_management d on b.item_code=d.item_number
        LEFT JOIN aps_material_management c on a.item_code=c.item_number
        <where>
        where   d.material_type='制造件' and c.material_type='制造件'
            <if test="orgCode != null and orgCode != ''">
                and a.org_code=#{orgCode} and d.applicable_factories=#{orgCode}
            </if>
            and d.material_type='制造件'
            and c.material_type='制造件'
        </where>
        ORDER BY mainItemCode
    </select>
</mapper>
aps-modules/aps-core/src/main/resources/mapper/core/ApsGasPipelineCapacityPlanMapper.xml
@@ -10,6 +10,7 @@
        <result property="year"    column="year"    />
        <result property="month"    column="month"    />
        <result property="major"    column="major"    />
        <result property="workshop"    column="workshop"    />
        <result property="dayProduceType"    column="day_produce_type"    />
        <result property="dayProduceNum"    column="day_produce_num"    />
        <result property="dayProduceUnit"    column="day_produce_unit"    />
@@ -26,7 +27,7 @@
    </resultMap>
    <sql id="selectApsGasPipelineCapacityPlanVo">
        select id, process_name, year, month, major, day_produce_type, day_produce_num, day_produce_unit, personnel_number, day_produce_all_num, days, month_produce_all_num, remark, create_by, create_time, update_by, update_time, org_code from aps_gas_pipeline_capacity_plan
        select id, process_name, year, month, major, workshop, day_produce_type, day_produce_num, day_produce_unit, personnel_number, day_produce_all_num, days, month_produce_all_num, remark, create_by, create_time, update_by, update_time, org_code from aps_gas_pipeline_capacity_plan
    </sql>
    <select id="selectApsGasPipelineCapacityPlanList" parameterType="com.aps.core.domain.ApsGasPipelineCapacityPlan" resultMap="ApsGasPipelineCapacityPlanResult">
@@ -36,6 +37,7 @@
            <if test="year != null  and year != ''"> and year = #{year}</if>
            <if test="month != null  and month != ''"> and month = #{month}</if>
            <if test="major != null  and major != ''"> and major = #{major}</if>
            <if test="workshop != null  and workshop != ''"> and workshop = #{workshop}</if>
            <if test="dayProduceType != null  and dayProduceType != ''"> and day_produce_type = #{dayProduceType}</if>
            <if test="dayProduceNum != null "> and day_produce_num = #{dayProduceNum}</if>
            <if test="dayProduceUnit != null  and dayProduceUnit != ''"> and day_produce_unit = #{dayProduceUnit}</if>
@@ -63,6 +65,7 @@
            <if test="year != null">year,</if>
            <if test="month != null">month,</if>
            <if test="major != null">major,</if>
            <if test="workshop != null">workshop,</if>
            <if test="dayProduceType != null">day_produce_type,</if>
            <if test="dayProduceNum != null">day_produce_num,</if>
            <if test="dayProduceUnit != null">day_produce_unit,</if>
@@ -83,6 +86,7 @@
            <if test="year != null">#{year},</if>
            <if test="month != null">#{month},</if>
            <if test="major != null">#{major},</if>
            <if test="workshop != null">workshop,</if>
            <if test="dayProduceType != null">#{dayProduceType},</if>
            <if test="dayProduceNum != null">#{dayProduceNum},</if>
            <if test="dayProduceUnit != null">#{dayProduceUnit},</if>
@@ -106,6 +110,7 @@
            <if test="year != null">year = #{year},</if>
            <if test="month != null">month = #{month},</if>
            <if test="major != null">major = #{major},</if>
            <if test="workshop != null">workshop,</if>
            <if test="dayProduceType != null">day_produce_type = #{dayProduceType},</if>
            <if test="dayProduceNum != null">day_produce_num = #{dayProduceNum},</if>
            <if test="dayProduceUnit != null">day_produce_unit = #{dayProduceUnit},</if>
@@ -133,4 +138,12 @@
            #{id}
        </foreach>
    </delete>
    <delete id="deleteByDateAndFactory" >
        delete from aps_gas_pipeline_capacity_plan
               where year = #{year}
                   and month = #{month}
                   and org_code = #{factory}
                   and major = #{major}
    </delete>
</mapper>
aps-modules/aps-core/src/main/resources/mapper/core/ApsPlate/ApsPlateProcessStatMapper.xml
@@ -173,10 +173,13 @@
            production_quantity,
            standard_time,
            process_total_time,
            process_plan_start_day,
            process_plan_end_day,
            order_plan_end_day,
            batch_number,
            create_by,
            del_flag
            del_flag,
            warning
        )
        values
        <foreach collection="list" item="item" index="index" separator=",">
@@ -190,10 +193,13 @@
            #{item.productionQuantity},
            #{item.standardTime},
            #{item.processTotalTime},
            #{item.processPlanStartDay},
            #{item.processPlanEndDay},
            #{item.orderPlanEndDay},
            #{item.batchNumber},
            #{item.createBy},
            '0'
            '0',
            #{item.warning}
        )
        </foreach>
    </insert>
aps-modules/aps-core/src/main/resources/mapper/core/ApsPlate/ApsPlateStandardRequireBomOrderDetailMapper.xml
@@ -127,7 +127,7 @@
    </delete>
    <update id="deleteLastPatch" parameterType="String">
        update aps_plate_standard_require_bom_order_detail set del_flag = '1' where batch_number = #{batchNumber}
        update aps_plate_standard_require_bom_order_detail set del_flag = '1' where del_flag = '0' and batch_number != #{batchNumber}
    </update>
    <insert id="batchInsert" parameterType="com.aps.core.domain.ApsPlate.ApsPlateStandardRequireBomOrderDetail">
aps-modules/aps-core/src/main/resources/mapper/core/ApsPlate/ApsPlateStandardRequireBomStockDetailMapper.xml
@@ -120,7 +120,9 @@
    </delete>
    <update id="deleteLastPatch" parameterType="String">
        update aps_plate_standard_require_bom_stock_detail set del_flag = '1' where batch_number = #{batchNumber}
        update aps_plate_standard_require_bom_stock_detail
        set del_flag = '1'
        where del_flag = '0' and batch_number != #{batchNumber}
    </update>
    <insert id="batchInsert" parameterType="com.aps.core.domain.ApsPlate.ApsPlateStandardRequireBomStockDetail">
aps-modules/aps-core/src/main/resources/mapper/core/ApsPlate/ApsPlateStandardRequireErrorMapper.xml
@@ -103,6 +103,8 @@
        </foreach>
    </delete>
    <update id="deleteLastPatch" parameterType="String">
        update aps_plate_standard_require_error set del_flag = '1' where batch_number = #{batchNumber}
        update aps_plate_standard_require_error
        set del_flag = '1'
        where del_flag = '0' and batch_number != #{batchNumber}
    </update>
</mapper>
aps-modules/aps-core/src/main/resources/mapper/core/ApsPlate/ApsPlateStandardRequireMapper.xml
@@ -226,6 +226,6 @@
        </foreach>
    </insert>
    <update id="deleteLastPatch" parameterType="String">
        update aps_plate_standard_require set del_flag = '1' where batch_number = #{batchNumber}
        update aps_plate_standard_require set del_flag = '1' where del_flag = '0' and batch_number != #{batchNumber}
    </update>
</mapper>
aps-modules/aps-core/src/main/resources/templates/ÉÏ´«ÆøÌ幤µ¥Êý¾ÝÄ£°å.xlsx
Binary files differ
aps-modules/aps-core/src/main/resources/templates/ÉÏ´«ÆøÌåÔ¤²âÊý¾ÝÄ£°å.xlsx
Binary files differ
aps-modules/aps-core/src/main/resources/templates/ÆøÌ幤µ¥Êý¾ÝÄ£°åv1.0.xlsx
Binary files differ
aps-modules/aps-core/src/main/resources/templates/ÆøÌåÔ¤²âÊý¾ÝÄ£°åv1.0.xlsx
Binary files differ
aps-modules/aps-job/src/main/java/com/aps/job/service/impl/ApsWeldSeamStandardJobServiceImpl.java
@@ -1,5 +1,6 @@
package com.aps.job.service.impl;
import cn.hutool.core.collection.ListUtil;
import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson2.JSONArray;
import com.alibaba.fastjson2.JSONObject;
@@ -179,11 +180,16 @@
            deleteAllApsWeldSeamStandardJob();
            
            // æ‰¹é‡æ’入新数据
            batchInsertApsWeldSeamStandardJob(jobList);
            List<List<ApsWeldSeamStandardJob>> dataGroupInterface = ListUtil.split(jobList, 1000);
            for (List<ApsWeldSeamStandardJob> data : dataGroupInterface) {
                batchInsertApsWeldSeamStandardJob(data);
            }
            
            // åŒæ­¥æ•°æ®åˆ°ä¸šåŠ¡è¡¨
            syncToBizTable(jobList);
            List<List<ApsWeldSeamStandardJob>> dataGroup = ListUtil.split(jobList, 1000);
            for (List<ApsWeldSeamStandardJob> data : dataGroup) {
                syncToBizTable(data);
            }
            return true;
        } catch (Exception e) {
            log.error("同步物料标准焊缝数据异常", e);
aps-modules/aps-job/src/main/java/com/aps/job/util/AbstractQuartzJob.java
@@ -78,7 +78,11 @@
        sysJobLog.setStartTime(startTime);
        sysJobLog.setStopTime(new Date());
        long runMs = sysJobLog.getStopTime().getTime() - sysJobLog.getStartTime().getTime();
        sysJobLog.setJobMessage(sysJobLog.getJobName() + " æ€»å…±è€—时:" + runMs + "毫秒");
        long totalSeconds = runMs / 1000;
        long minutes = totalSeconds / 60;
        long seconds = totalSeconds % 60;
        String formattedTime = minutes + "分" + seconds + "秒";
        sysJobLog.setJobMessage(sysJobLog.getJobName() + " æ€»å…±è€—时:" +formattedTime);
        if (e != null)
        {
            sysJobLog.setStatus("1");