parent
465d760d69
commit
9248214549
|
|
@ -21,7 +21,7 @@ import java.util.TimeZone;
|
||||||
@EnableDiscoveryClient
|
@EnableDiscoveryClient
|
||||||
@EnableScheduling
|
@EnableScheduling
|
||||||
@EnableFeignClients
|
@EnableFeignClients
|
||||||
@EnableLogRecord(tenant = "com.nflg")
|
@EnableLogRecord(tenant = "BOM")
|
||||||
public class BomnewApplication {
|
public class BomnewApplication {
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,50 @@
|
||||||
|
package com.nflg.product.bomnew.api.user;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.nflg.product.base.core.api.BaseApi;
|
||||||
|
import com.nflg.product.bomnew.pojo.entity.BomNewLogEntity;
|
||||||
|
import com.nflg.product.bomnew.pojo.query.BomNewLogQuery;
|
||||||
|
import com.nflg.product.bomnew.service.BomNewLogService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import nflg.product.common.vo.ResultVO;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* t_bom_new_log 表控制层
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @author makejava
|
||||||
|
* @since 2024-03-06 08:30:00
|
||||||
|
*/
|
||||||
|
@Api(tags = "日志")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("bomNewLogEntity")
|
||||||
|
public class BomNewLogApi extends BaseApi {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 服务对象
|
||||||
|
*/
|
||||||
|
@Resource
|
||||||
|
private BomNewLogService bomNewLogService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询所有数据
|
||||||
|
*
|
||||||
|
* @param query Query 查询实体
|
||||||
|
* @return 所有数据
|
||||||
|
*/
|
||||||
|
@PostMapping("getListByPage")
|
||||||
|
@ApiOperation("auto-获取日志")
|
||||||
|
public ResultVO<IPage<BomNewLogEntity>> selectBomNewLogEntityPageByCondition(@RequestBody BomNewLogQuery query) {
|
||||||
|
return ResultVO.success(bomNewLogService.getListByPage(query));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -1,8 +1,10 @@
|
||||||
package com.nflg.product.bomnew.mapper.master;
|
package com.nflg.product.bomnew.mapper.master;
|
||||||
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.nflg.product.bomnew.pojo.entity.BomNewLogEntity;
|
import com.nflg.product.bomnew.pojo.entity.BomNewLogEntity;
|
||||||
|
import com.nflg.product.bomnew.pojo.query.BomNewLogQuery;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* t_bom_new_log 表数据库访问层
|
* t_bom_new_log 表数据库访问层
|
||||||
|
|
@ -12,4 +14,6 @@ import com.nflg.product.bomnew.pojo.entity.BomNewLogEntity;
|
||||||
* @since 2024-03-01 17:10:57
|
* @since 2024-03-01 17:10:57
|
||||||
*/
|
*/
|
||||||
public interface BomNewLogMapper extends BaseMapper<BomNewLogEntity> {
|
public interface BomNewLogMapper extends BaseMapper<BomNewLogEntity> {
|
||||||
|
|
||||||
|
Page<BomNewLogEntity> getListByPage(Page<BomNewLogQuery> page , @Param("query") BomNewLogQuery query);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -48,6 +48,11 @@ public interface BomNewMbomParentMapper extends BaseMapper<BomNewMbomParentEntit
|
||||||
|
|
||||||
BomNewMbomMiddleVO getParentById(@Param("rowId") Long rowId );
|
BomNewMbomMiddleVO getParentById(@Param("rowId") Long rowId );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 将MBOM迁移到历史表
|
||||||
|
*/
|
||||||
|
void insertMBomIntoHistory(@Param("rowId") Long rowId);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ import java.time.LocalDate;
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* @author makejava
|
* @author makejava
|
||||||
* @since 2024-03-01 17:10:57
|
* @since 2024-03-06 08:31:13
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
|
|
@ -31,10 +31,17 @@ public class BomNewLogEntity implements Serializable {
|
||||||
private Long rowId;
|
private Long rowId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 操作行ID
|
* 模块名称
|
||||||
|
*/
|
||||||
|
@TableField(value = "model_name")
|
||||||
|
@ApiModelProperty(value = "模块名称")
|
||||||
|
private String modelName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作行标识-对应bizNo
|
||||||
*/
|
*/
|
||||||
@TableField(value = "op_biz_no")
|
@TableField(value = "op_biz_no")
|
||||||
@ApiModelProperty(value = "操作行标识")
|
@ApiModelProperty(value = "操作行标识-对应bizNo")
|
||||||
private String opBizNo;
|
private String opBizNo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -86,6 +93,6 @@ public class BomNewLogEntity implements Serializable {
|
||||||
@ApiModelProperty(value = "部门名称")
|
@ApiModelProperty(value = "部门名称")
|
||||||
private String dptName;
|
private String dptName;
|
||||||
|
|
||||||
private static final long serialVersionUID = -52831510327211450L;
|
private static final long serialVersionUID = -56481813751074622L;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,61 @@
|
||||||
|
package com.nflg.product.bomnew.pojo.query;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* t_bom_new_log
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @author makejava
|
||||||
|
* @since 2024-03-06 08:30:05
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@ApiModel(value="com-nflg-product-bomnew-pojo-new-query-BomNewLogEntityQuery")
|
||||||
|
public class BomNewLogQuery implements Serializable {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 模块名称
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "模块名称")
|
||||||
|
private String modelName;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "操作动作")
|
||||||
|
private String opAction;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "操作人名称")
|
||||||
|
private String opUserName;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "操作人工号")
|
||||||
|
private String opUserJobNo;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "操作时间开始时间")
|
||||||
|
private String startDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结束操作时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "操作时间结束时间")
|
||||||
|
private LocalDateTime endDate;
|
||||||
|
/**
|
||||||
|
* 设置每页显示条数
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "设置每页显示条数")
|
||||||
|
private Long pageSize = 20L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 当前页
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "当前页")
|
||||||
|
private Long page = 1L;
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
}
|
||||||
|
|
@ -1,8 +1,12 @@
|
||||||
package com.nflg.product.bomnew.service;
|
package com.nflg.product.bomnew.service;
|
||||||
|
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.nflg.product.bomnew.mapper.master.BomNewLogMapper;
|
import com.nflg.product.bomnew.mapper.master.BomNewLogMapper;
|
||||||
import com.nflg.product.bomnew.pojo.entity.BomNewLogEntity;
|
import com.nflg.product.bomnew.pojo.entity.BomNewLogEntity;
|
||||||
|
import com.nflg.product.bomnew.pojo.query.BomNewLogQuery;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -11,9 +15,14 @@ import org.springframework.stereotype.Service;
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* @author makejava
|
* @author makejava
|
||||||
* @since 2024-03-01 17:10:57
|
* @since 2024-03-06 08:30:03
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class BomNewLogService extends ServiceImpl<BomNewLogMapper, BomNewLogEntity> {
|
public class BomNewLogService extends ServiceImpl<BomNewLogMapper, BomNewLogEntity> {
|
||||||
|
|
||||||
|
public IPage<BomNewLogEntity> getListByPage(BomNewLogQuery query){
|
||||||
|
Page<BomNewLogQuery> page=new Page<>(query.getPage(),query.getPageSize());
|
||||||
|
return this.getBaseMapper().getListByPage(page,query);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -616,17 +616,18 @@ public class BomNewPbomParentService extends ServiceImpl<BomNewPbomParentMapper,
|
||||||
public Boolean saveAllocationFactoryNew(AllocationFactoryParam params) {
|
public Boolean saveAllocationFactoryNew(AllocationFactoryParam params) {
|
||||||
VUtils.isTure(CollUtil.isEmpty(params.getData())).throwMessage("分配工厂数据为空");
|
VUtils.isTure(CollUtil.isEmpty(params.getData())).throwMessage("分配工厂数据为空");
|
||||||
//按分配的工厂分组
|
//按分配的工厂分组
|
||||||
if(BooleanEnum.TRUE.equals(params.getSetSubNode()) ){
|
if(BooleanEnum.FALSE.equals(params.getSetSubNode()) ){
|
||||||
return saveAllocationFactory(params.getData());
|
return saveAllocationFactory(params.getData());
|
||||||
}else {
|
}else {
|
||||||
params.getData().forEach(k->{
|
params.getData().forEach(k->{
|
||||||
try {
|
try {
|
||||||
List<BomNewPbomParentVO> allBom = this.getAllBomTree(k.getBomRowId());
|
List<BomNewPbomParentVO> allBom = this.getAllBomTree(k.getBomRowId());
|
||||||
List<Long> rowIds = allBom.stream().map(u -> u.getRowId()).collect(Collectors.toList());
|
List<Long> rowIds =new ArrayList<>();
|
||||||
|
rowIds.add(k.getRowId());
|
||||||
|
rowIds.addAll(allBom.stream().map(u -> u.getRowId()).collect(Collectors.toList()));
|
||||||
if(CollUtil.isNotEmpty(rowIds)) {
|
if(CollUtil.isNotEmpty(rowIds)) {
|
||||||
pbomChildService.getBaseMapper().setProductionFactoryCode(k.getProductionFactoryCode(), rowIds);
|
pbomChildService.getBaseMapper().setProductionFactoryCode(k.getProductionFactoryCode(), rowIds);
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (ExecutionException e) {
|
} catch (ExecutionException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
|
|
|
||||||
|
|
@ -77,21 +77,26 @@ public class ConvertToMBomBase {
|
||||||
protected BomNewMbomParentEntity buildMBomParent(String facCode) {
|
protected BomNewMbomParentEntity buildMBomParent(String facCode) {
|
||||||
BomNewMbomParentEntity mBomParent = new BomNewMbomParentEntity();
|
BomNewMbomParentEntity mBomParent = new BomNewMbomParentEntity();
|
||||||
BeanUtil.copyProperties(parent, mBomParent);
|
BeanUtil.copyProperties(parent, mBomParent);
|
||||||
BomNewMbomParentEntity oldParent = SpringUtil.getBean(BomNewMbomParentService.class).lambdaQuery().eq(BomNewMbomParentEntity::getMaterialNo, parent.getMaterialNo())
|
BomNewMbomParentEntity oldParent = SpringUtil.getBean(BomNewMbomParentService.class).lambdaQuery().eq(BomNewMbomParentEntity::getMaterialNo, parent.getMaterialNo()).eq(BomNewMbomParentEntity::getFacCode, facCode)
|
||||||
.eq(BomNewMbomParentEntity::getLastVersionIs, 1).eq(BomNewMbomParentEntity::getFacCode, facCode).one();
|
.last(" order by current_version desc limit 1").one();
|
||||||
if (Objects.nonNull(oldParent)) {
|
if (Objects.nonNull(oldParent)) {
|
||||||
if (MBomConstantEnum.MBomStatusEnum.PUB_SAP.equalsValue(oldParent.getStatus())) {
|
if (MBomConstantEnum.MBomStatusEnum.PUB_SAP.equalsValue(oldParent.getStatus())) {
|
||||||
|
//将数据迁移到历史表
|
||||||
|
SpringUtil.getBean(BomNewMbomParentService.class).getBaseMapper().insertMBomIntoHistory(oldParent.getRowId());
|
||||||
|
|
||||||
mBomParent.setCurrentVersion(VersionUtil.getNextVersion(oldParent.getCurrentVersion()));
|
mBomParent.setCurrentVersion(VersionUtil.getMBomNextVersion(oldParent.getCurrentVersion()));
|
||||||
oldParent.setLastVersionIs(0);
|
|
||||||
this.mBomParentResult.add(oldParent);
|
SpringUtil.getBean(BomNewMbomDetailService.class).getBaseMapper().deleteByMap(ImmutableMap.of("bom_row_id", oldParent.getRowId()));
|
||||||
|
SpringUtil.getBean(BomNewMbomParentService.class).getBaseMapper().deleteById(oldParent.getRowId());
|
||||||
|
// oldParent.setLastVersionIs(0);
|
||||||
|
// this.mBomParentResult.add(oldParent);
|
||||||
} else {
|
} else {
|
||||||
SpringUtil.getBean(BomNewMbomDetailService.class).getBaseMapper().deleteByMap(ImmutableMap.of("bom_row_id", oldParent.getRowId()));
|
SpringUtil.getBean(BomNewMbomDetailService.class).getBaseMapper().deleteByMap(ImmutableMap.of("bom_row_id", oldParent.getRowId()));
|
||||||
SpringUtil.getBean(BomNewMbomParentService.class).getBaseMapper().deleteById(oldParent.getRowId());
|
SpringUtil.getBean(BomNewMbomParentService.class).getBaseMapper().deleteById(oldParent.getRowId());
|
||||||
mBomParent.setCurrentVersion(oldParent.getCurrentVersion());
|
mBomParent.setCurrentVersion(oldParent.getCurrentVersion());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
mBomParent.setCurrentVersion(VersionUtil.getNextVersion(""));
|
mBomParent.setCurrentVersion(VersionUtil.getMBomNextVersion(""));
|
||||||
}
|
}
|
||||||
mBomParent.setRowId(IdWorker.getId());
|
mBomParent.setRowId(IdWorker.getId());
|
||||||
mBomParent.setFacCode(facCode);
|
mBomParent.setFacCode(facCode);
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@ public class DbLogRecordServiceImpl implements ILogRecordService {
|
||||||
|
|
||||||
BomNewLogEntity logEnt=new BomNewLogEntity();
|
BomNewLogEntity logEnt=new BomNewLogEntity();
|
||||||
logEnt.setRowId(IdWorker.getId());
|
logEnt.setRowId(IdWorker.getId());
|
||||||
|
logEnt.setModelName(logRecord.getTenant());
|
||||||
logEnt.setOpBizNo(logRecord.getBizNo());
|
logEnt.setOpBizNo(logRecord.getBizNo());
|
||||||
logEnt.setOpAction(logRecord.getType());
|
logEnt.setOpAction(logRecord.getType());
|
||||||
logEnt.setOpContent(logRecord.getAction());
|
logEnt.setOpContent(logRecord.getAction());
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,8 @@ public class VersionUtil {
|
||||||
|
|
||||||
static final String versionPrefix = "A";
|
static final String versionPrefix = "A";
|
||||||
|
|
||||||
|
static final String mBomVersionPrefix = "B";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取下一个版本号(大版本)
|
* 获取下一个版本号(大版本)
|
||||||
*/
|
*/
|
||||||
|
|
@ -32,6 +34,15 @@ public class VersionUtil {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static String getMBomNextVersion(String preVersion) {
|
||||||
|
if (StrUtil.isBlank(preVersion)) {
|
||||||
|
return mBomVersionPrefix + "00";
|
||||||
|
}
|
||||||
|
|
||||||
|
Integer versionNum = Convert.toInt(StrUtil.replace(preVersion, mBomVersionPrefix, "")) + 1;
|
||||||
|
return mBomVersionPrefix + StrUtil.padPre(versionNum.toString(), 2, '0');
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取下一个小版本号(小版本)
|
* 获取下一个小版本号(小版本)
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -6,18 +6,42 @@
|
||||||
<!--@mbg.generated-->
|
<!--@mbg.generated-->
|
||||||
<!--@Table t_bom_new_log -->
|
<!--@Table t_bom_new_log -->
|
||||||
<id column="row_id" property="rowId" jdbcType="BIGINT"/>
|
<id column="row_id" property="rowId" jdbcType="BIGINT"/>
|
||||||
<result column="op_biz_no" property="opBizNo" jdbcType="BIGINT"/>
|
<result column="model_name" property="modelName" jdbcType="VARCHAR"/>
|
||||||
|
<result column="op_biz_no" property="opBizNo" jdbcType="VARCHAR"/>
|
||||||
<result column="op_action" property="opAction" jdbcType="VARCHAR"/>
|
<result column="op_action" property="opAction" jdbcType="VARCHAR"/>
|
||||||
<result column="op_content" property="opContent" jdbcType="VARCHAR"/>
|
<result column="op_content" property="opContent" jdbcType="VARCHAR"/>
|
||||||
<result column="op_content_ext" property="opContentExt" jdbcType="VARCHAR"/>
|
<result column="op_content_ext" property="opContentExt" jdbcType="VARCHAR"/>
|
||||||
<result column="op_user_job_no" property="opUserJobNo" jdbcType="VARCHAR"/>
|
<result column="op_user_job_no" property="opUserJobNo" jdbcType="VARCHAR"/>
|
||||||
<result column="op_user_name" property="opUserName" jdbcType="VARCHAR"/>
|
<result column="op_user_name" property="opUserName" jdbcType="VARCHAR"/>
|
||||||
<result column="op_time" property="opTime" jdbcType="TIMESTAMP"/>
|
<result column="op_time" property="opTime" jdbcType="TIMESTAMP"/>
|
||||||
<result column="dpt_name" property="dptName" jdbcType="VARCHAR" />
|
<result column="dpt_name" property="dptName" jdbcType="VARCHAR"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
<!--@mbg.generated-->
|
<!--@mbg.generated-->
|
||||||
row_id, op_biz_no, op_action, op_content, op_content_ext, op_user_job_no, op_user_name, op_time ,dpt_name </sql>
|
row_id, model_name, op_biz_no, op_action, op_content, op_content_ext, op_user_job_no, op_user_name, op_time, dpt_name </sql>
|
||||||
|
|
||||||
|
<sql id="whr">
|
||||||
|
<if test="query.modelName!=null and query.modelName!=''">
|
||||||
|
and model_name like concat('%',#{query.modelName},'%')
|
||||||
|
</if>
|
||||||
|
<if test="query.opAction!=null and query.opAction!=''">
|
||||||
|
and op_action like concat('%',#{query.opAction},'%')
|
||||||
|
</if>
|
||||||
|
<if test="query.opUserName!=null and query.opUserName!=''">
|
||||||
|
and op_user_name =#{query.opUserName}
|
||||||
|
</if>
|
||||||
|
<if test="query.opUserJobNo!=null and query.opUserJobNo!=''">
|
||||||
|
and op_user_job_no =#{query.opUserJobNo}
|
||||||
|
</if>
|
||||||
|
<if test="query.startDate!=null and query.startDate!=''">
|
||||||
|
and op_time >= #{query.startDate} and op_time <= #{query.endDate}
|
||||||
|
</if>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="getListByPage" resultType="com.nflg.product.bomnew.pojo.entity.BomNewLogEntity">
|
||||||
|
select * from t_bom_new_log where 1=1
|
||||||
|
<include refid="whr"/>
|
||||||
|
order by op_time desc
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
|
|
@ -187,5 +187,16 @@
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<!--将MBOM迁移到历史表-->
|
||||||
|
<insert id="insertMBomIntoHistory">
|
||||||
|
INSERT INTO `nflg`.`t_bom_new_mbom_parent_history` (`row_id`, `batch_no`, `drawing_no`, `fac_code`, `material_no`, `order_number`, `material_name`, `material_desc`, `material_texture`, `material_unit`, `unit_weight`, `total_weight`, `current_version`, `num`, `last_version_is`, `status`, `sysn_sap_user_name`, `sysn_sap_time`, `source_row_id`, `devise_user_code`, `devise_name`, `created_by`, `created_time`, `expire_end_time`, `remark`, `dept_name`, `level_num`, `change_desc`, `notice_nums`, `order_no`, `modify_time`)
|
||||||
|
select `row_id`, `batch_no`, `drawing_no`, `fac_code`, `material_no`, `order_number`, `material_name`, `material_desc`, `material_texture`, `material_unit`, `unit_weight`, `total_weight`, `current_version`, `num`, `last_version_is`, `status`, `sysn_sap_user_name`, `sysn_sap_time`, `source_row_id`, `devise_user_code`, `devise_name`, `created_by`, `created_time`, `expire_end_time`, `remark`, `dept_name`, `level_num`, `change_desc`, `notice_nums`, `order_no`, `modify_time` from t_bom_new_mbom_parent where row_id=#{rowId};
|
||||||
|
|
||||||
|
|
||||||
|
INSERT INTO `nflg`.`t_bom_new_mbom_detail_history` (`row_id`, `bom_row_id`, `parent_row_id`, `drawing_no`, `fac_code`, `material_no`, `current_version`, `order_number`, `material_name`, `material_desc`, `material_texture`, `material_unit`, `unit_weight`, `total_weight`, `num`, `project_type`, `super_material_status`, `virtual_part_is`, `source_row_id`, `devise_user_code`, `devise_name`, `created_by`, `created_time`, `remark`, `dept_name`, `level_num`, `change_desc`, `notice_nums`, `modify_time`, `material_back_status`, `virtual_part_type`)
|
||||||
|
|
||||||
|
select `row_id`, `bom_row_id`, `parent_row_id`, `drawing_no`, `fac_code`, `material_no`, `current_version`, `order_number`, `material_name`, `material_desc`, `material_texture`, `material_unit`, `unit_weight`, `total_weight`, `num`, `project_type`, `super_material_status`, `virtual_part_is`, `source_row_id`, `devise_user_code`, `devise_name`, `created_by`, `created_time`, `remark`, `dept_name`, `level_num`, `change_desc`, `notice_nums`, `modify_time`, `material_back_status`, `virtual_part_type` from t_bom_new_mbom_detail where bom_row_id=#{rowId};
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue