dengzedong
9 天以前 826d35df6a24f08bc281ab93adcdd71ea381c67b
py文件重新上传后,修改预测项和调度项setting的pyFile
已修改9个文件
已添加1个文件
43 ■■■■■ 文件已修改
iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/dao/MmModelArithSettingsDao.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/MmModelArithSettingsService.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmModelArithSettingsServiceImpl.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/sche/dao/StScheduleModelSettingDao.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/sche/service/StScheduleModelSettingService.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/sche/service/impl/StScheduleModelSettingServiceImpl.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mpk/service/impl/MpkFileServiceImpl.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iailab-module-model/iailab-module-model-biz/src/main/resources/mapper/mcs/MmModelArithSettings.xml 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iailab-module-model/iailab-module-model-biz/src/main/resources/mapper/mcs/StScheduleModelSettingDao.xml 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iailab-module-model/iailab-module-model-biz/src/main/resources/template/cpp.vm 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/dao/MmModelArithSettingsDao.java
@@ -4,6 +4,7 @@
import com.iailab.framework.tenant.core.db.dynamic.TenantDS;
import com.iailab.module.model.mcs.pre.entity.MmModelArithSettingsEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
@@ -30,4 +31,6 @@
     * @param list
     */
    void insertList(List<MmModelArithSettingsEntity> list);
    void updatePyFile(@Param("likeValue") String likeValue,@Param("value") String value);
}
iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/MmModelArithSettingsService.java
@@ -13,4 +13,6 @@
    void saveList(List<MmModelArithSettingsEntity> list);
    List<MmModelArithSettingsEntity> getByModelId(String modelId);
    void updatePyFile(String pyModule, String fileName);
}
iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmModelArithSettingsServiceImpl.java
@@ -53,4 +53,9 @@
        modelIdMap.put(modelId, list);
        return list;
    }
    @Override
    public void updatePyFile(String pyModule, String fileName) {
        baseMapper.updatePyFile(pyModule + "." + fileName.substring(0,fileName.lastIndexOf("_")),pyModule + "." + fileName);
    }
}
iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/sche/dao/StScheduleModelSettingDao.java
@@ -4,6 +4,7 @@
import com.iailab.framework.tenant.core.db.dynamic.TenantDS;
import com.iailab.module.model.mcs.sche.entity.StScheduleModelSettingEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
 * @author PanZhibao
@@ -13,4 +14,5 @@
@TenantDS
@Mapper
public interface StScheduleModelSettingDao extends BaseMapperX<StScheduleModelSettingEntity> {
    void updatePyFile(@Param("likeValue") String likeValue, @Param("value") String value);
}
iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/sche/service/StScheduleModelSettingService.java
@@ -18,4 +18,6 @@
    void deleteByModelId(String modelId);
    void saveList(String modelId, List<StScheduleModelSettingSaveReqVO> saveList);
    void updatePyFile(String pyModule, String fileName);
}
iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/sche/service/impl/StScheduleModelSettingServiceImpl.java
@@ -53,4 +53,9 @@
            baseDao.insert(entity);
        }
    }
    @Override
    public void updatePyFile(String pyModule, String fileName) {
        baseDao.updatePyFile(pyModule + "." + fileName.substring(0,fileName.lastIndexOf("_")),pyModule + "." + fileName);
    }
}
iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mpk/service/impl/MpkFileServiceImpl.java
@@ -14,6 +14,8 @@
import com.iailab.framework.security.core.util.SecurityFrameworkUtils;
import com.iailab.framework.tenant.core.context.TenantContextHolder;
import com.iailab.module.infra.api.config.ConfigApi;
import com.iailab.module.model.mcs.pre.service.MmModelArithSettingsService;
import com.iailab.module.model.mcs.sche.service.StScheduleModelSettingService;
import com.iailab.module.model.mpk.common.MdkConstant;
import com.iailab.module.model.mpk.common.utils.CmdUtils;
import com.iailab.module.model.mpk.common.utils.DllUtils;
@@ -67,6 +69,12 @@
    @Autowired
    private ProjectPackageHistoryModelService projectPackageHistoryModelService;
    @Autowired
    private MmModelArithSettingsService mmModelArithSettingsService;
    @Autowired
    private StScheduleModelSettingService stScheduleModelSettingService;
    @Autowired
    private ConfigApi configApi;
@@ -204,6 +212,11 @@
            }
        }
        // 修改预测项pyFile参数
        mmModelArithSettingsService.updatePyFile(dto.getPyModule(),fileName);
        // 修改调度项pyFile参数
        stScheduleModelSettingService.updatePyFile(dto.getPyModule(),fileName);
        MpkFileEntity entity = ConvertUtils.sourceToTarget(dto, MpkFileEntity.class);
        entity.setUpdater(SecurityFrameworkUtils.getLoginUserId());
        entity.setUpdateDate(new Date());
iailab-module-model/iailab-module-model-biz/src/main/resources/mapper/mcs/MmModelArithSettings.xml
@@ -2,6 +2,9 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.iailab.module.model.mcs.pre.dao.MmModelArithSettingsDao">
    <update id="updatePyFile">
        update t_mm_model_arith_settings set value = #{value} where `key` = 'pyFile' and `value` like CONCAT(#{likeValue},'%')
    </update>
    <select id="getMmModelArithSettings" resultType="com.iailab.module.model.mcs.pre.entity.MmModelArithSettingsEntity"
            parameterType="map">
        SELECT
iailab-module-model/iailab-module-model-biz/src/main/resources/mapper/mcs/StScheduleModelSettingDao.xml
对比新文件
@@ -0,0 +1,7 @@
<?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.iailab.module.model.mcs.sche.dao.StScheduleModelSettingDao">
    <update id="updatePyFile">
        update t_st_schedule_model_setting set value = #{value} where `key` = 'pyFile' and `value` like CONCAT(#{likeValue},'%')
    </update>
</mapper>
iailab-module-model/iailab-module-model-biz/src/main/resources/template/cpp.vm
@@ -23,7 +23,6 @@
        jstring keyJString = env->NewStringUTF("pyFile");
        jobject javaValueObj = env->CallObjectMethod(settings, getMID, keyJString);
        const char* strValue = env->GetStringUTFChars((jstring)javaValueObj, NULL);
        cout << strValue << endl;
        PyObject* pModule = create_py_module(strValue);
        /*PyObject* pModule = create_py_module("${pyModule}.${pyName}");*/