Merge branch 'feature/DM/nflg-bom-transition' of http://192.168.0.40:3000/root/nflg_project into feature/DM/nflg-bom-transition
This commit is contained in:
commit
b5c91dfe0b
|
|
@ -173,7 +173,7 @@ public class OriginalBomApi extends BaseApi {
|
|||
//跟新EBom 根节点
|
||||
// ebomParentService.getBaseMapper().updateRootState();
|
||||
ebomParentService.updateRootState();
|
||||
ebomParentService.getBaseMapper().updateRootForWaitReview();
|
||||
ebomParentService.updateRootForWaitReview();
|
||||
|
||||
return ResultVO.success(result);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -79,8 +79,12 @@ public interface BomNewEbomParentMapper extends BaseMapper<BomNewEbomParentEntit
|
|||
List<ReverseReportVO> eBomReverseReportNewst(@Param("materialNo")String materialNo);
|
||||
Integer getCountForWaitReviewByMaterialNo(@Param("materialNo") String materialNo);
|
||||
|
||||
@Deprecated
|
||||
void updateRootForWaitReview();
|
||||
|
||||
void updateRootForWaitReview1();
|
||||
void updateRootForWaitReview2();
|
||||
|
||||
void resetBomExist(Long rowId);
|
||||
|
||||
Set<String> getMaterialParent(@Param("materialNos") Collection<String> materialNos ,@Param("createdBy") String createdBy);
|
||||
|
|
@ -121,7 +125,7 @@ public interface BomNewEbomParentMapper extends BaseMapper<BomNewEbomParentEntit
|
|||
Integer getSapErrorNum(String userCode);
|
||||
|
||||
List<BomNewEbomParentEntity> getLatestByMaterialNo(Collection<String> materialNos);
|
||||
|
||||
@Deprecated
|
||||
void updateLastVersionIs();
|
||||
|
||||
List<BomNewPbomParentVO> getReverseBoms(Long parentRowId);
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import org.apache.commons.lang.StringUtils;
|
|||
import org.ttzero.excel.annotation.ExcelColumn;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @author 曹鹏飞
|
||||
|
|
@ -18,6 +19,14 @@ public class OperationErrorMsgVO extends OperationErrorMsgBaseVO implements Seri
|
|||
@ExcelColumn("所在行")
|
||||
public String primaryKey;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
@ExcelColumn("创建时间")
|
||||
private LocalDateTime createdTime;
|
||||
|
||||
public OperationErrorMsgVO() {
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -233,6 +233,7 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
|
|||
* @param materialNo
|
||||
* @return
|
||||
*/
|
||||
@Deprecated
|
||||
public Set<String> getParentMaterialByMaterialNo(String materialNo, Boolean selfIs) {
|
||||
BomNewEbomMaterialUseEntity materialBom = bomNewEbomMaterialUseService.lambdaQuery().eq(BomNewEbomMaterialUseEntity::getMaterialNo, materialNo).one();
|
||||
Set<String> result = new HashSet<>();
|
||||
|
|
@ -295,6 +296,7 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
|
|||
* @param materialNos
|
||||
* @return
|
||||
*/
|
||||
@Deprecated
|
||||
public List<String> getBatchParentMaterialByMaterialNo(List<String> materialNos) {
|
||||
List<BomNewEbomMaterialUseEntity> materialBom = bomNewEbomMaterialUseService.lambdaQuery().in(BomNewEbomMaterialUseEntity::getMaterialNo, materialNos).list();
|
||||
List<String> result = new ArrayList<>();
|
||||
|
|
@ -357,6 +359,9 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 获取子级
|
||||
*
|
||||
|
|
@ -448,6 +453,7 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
|
|||
}
|
||||
//动态判断异常
|
||||
//CheckEBomExceptoinDynamic.check(parentChild);
|
||||
BomNewSortUtil.orderNumEbomSort(parentChild,0);
|
||||
return parentChild;
|
||||
|
||||
}
|
||||
|
|
@ -2143,7 +2149,7 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
|
|||
// ThreadUtil.execAsync(() -> computeLevelNumAndRootState());
|
||||
|
||||
if (eBomEdit.isRootForWaitReview()) {
|
||||
this.getBaseMapper().updateRootForWaitReview();
|
||||
updateRootForWaitReview();
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -2153,6 +2159,11 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
|
|||
return retParentVO;
|
||||
}
|
||||
|
||||
public void updateRootForWaitReview(){
|
||||
this.getBaseMapper().updateRootForWaitReview1();
|
||||
this.getBaseMapper().updateRootForWaitReview2();
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交物料
|
||||
* <p>
|
||||
|
|
@ -2210,7 +2221,7 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
|
|||
|
||||
// checkAndSaveEBomException(dto.getParent().getBomRowId());
|
||||
if (eBomEdit.isRootForWaitReview()) {
|
||||
this.getBaseMapper().updateRootForWaitReview();
|
||||
this.updateRootForWaitReview();
|
||||
}
|
||||
resetBomExist(dto.getParent().getRowId());
|
||||
return true;
|
||||
|
|
@ -2806,7 +2817,9 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
|
|||
.eq(BomNewSapErrorMsgEntity::getTargetRowId, rowId)
|
||||
.one();
|
||||
if (Objects.isNull(sapErrorMsgEntity)) return Collections.emptyList();
|
||||
return JSON.parseArray(sapErrorMsgEntity.getData(), OperationErrorMsgVO.class);
|
||||
List<OperationErrorMsgVO> resultList = JSON.parseArray(sapErrorMsgEntity.getData(), OperationErrorMsgVO.class);
|
||||
resultList.forEach(result -> result.setCreatedTime(sapErrorMsgEntity.getCreatedTime()));
|
||||
return resultList;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -139,7 +139,8 @@ public class BomNewPbomParentService extends ServiceImpl<BomNewPbomParentMapper,
|
|||
}
|
||||
}
|
||||
if (StrUtil.isNotBlank(materialNo)) {
|
||||
List<String> parentMaterialByMaterialNo = new ArrayList<>(getParentMaterialByMaterialNo(materialNo));
|
||||
List<String> parentMaterialByMaterialNo = new ArrayList<>(getParentMaterialByMaterialNo(materialNo));
|
||||
|
||||
parentMaterialByMaterialNo.add(materialNo);
|
||||
if (CollUtil.isNotEmpty(parentMaterialByMaterialNo)) {
|
||||
String queryFac= StrUtil.isBlank(query.getFacCode())? userRoleService.getUserFactory():query.getFacCode();
|
||||
|
|
@ -163,8 +164,10 @@ public class BomNewPbomParentService extends ServiceImpl<BomNewPbomParentMapper,
|
|||
}
|
||||
return new Page<>();
|
||||
} else {
|
||||
String queryFac= StrUtil.isBlank(query.getFacCode())? userRoleService.getUserFactory():query.getFacCode();
|
||||
|
||||
Page<BomNewPbomParentVO> result = this.getBaseMapper().workDetailsListByPage(new Page<>(query.getPage()
|
||||
, query.getPageSize()), query, userRoleService.getUserFactory(), SessionUtil.getDepartRowId(), SessionUtil.getUserCode());
|
||||
, query.getPageSize()), query, queryFac, SessionUtil.getDepartRowId(), SessionUtil.getUserCode());
|
||||
materialMainService.intiMaterialInfo(result.getRecords(), EBomConstant.EBOM_IGNORED_FIELDS_INIT_MATERIAL_DEFAULT);
|
||||
return result;
|
||||
}
|
||||
|
|
@ -202,15 +205,26 @@ public class BomNewPbomParentService extends ServiceImpl<BomNewPbomParentMapper,
|
|||
*/
|
||||
public void getGetParentMaterialByMaterialNoNew(Set<String> parentNoResult, Set<String> materialNos){
|
||||
|
||||
Set<String> relParentNoSet= getParent(parentNoResult,materialNos);
|
||||
|
||||
while (CollUtil.isNotEmpty(relParentNoSet)){
|
||||
|
||||
relParentNoSet= getParent(parentNoResult , relParentNoSet);
|
||||
}
|
||||
}
|
||||
|
||||
private Set<String> getParent(Set<String> parentNoResult, Set<String> materialNos){
|
||||
|
||||
List<BomNewPbomChildEntity> childList = pbomChildService.lambdaQuery().in(BomNewPbomChildEntity::getMaterialNo, materialNos).select(BomNewPbomChildEntity::getParentRowId).list();
|
||||
parentNoResult.addAll(materialNos);
|
||||
if(CollUtil.isEmpty(childList)){
|
||||
return new HashSet<>();
|
||||
}
|
||||
List<Long> parentRowIdList = childList.stream().map(u -> u.getParentRowId()).collect(Collectors.toList());
|
||||
List<BomNewPbomParentEntity> parentList = this.lambdaQuery().in(BomNewPbomParentEntity::getRowId, parentRowIdList).select(BomNewPbomParentEntity::getMaterialNo).list();
|
||||
Set<String> parentNoSet = parentList.stream().map(u -> u.getMaterialNo()).collect(Collectors.toSet());
|
||||
Set<String> relParentNoSet= Sets.difference(parentNoSet,parentNoResult);
|
||||
parentNoResult.addAll(materialNos);
|
||||
while (CollUtil.isNotEmpty(relParentNoSet)){
|
||||
getGetParentMaterialByMaterialNoNew(parentNoResult, relParentNoSet);
|
||||
}
|
||||
|
||||
return Sets.difference(parentNoSet,parentNoResult);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -386,6 +400,8 @@ public class BomNewPbomParentService extends ServiceImpl<BomNewPbomParentMapper,
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
BomNewSortUtil.orderNumPbomSort(parentChild,0);
|
||||
return parentChild;
|
||||
|
||||
}
|
||||
|
|
@ -1185,7 +1201,12 @@ public class BomNewPbomParentService extends ServiceImpl<BomNewPbomParentMapper,
|
|||
@Transactional(rollbackFor = Exception.class)
|
||||
public void upgrade(Long bomRowId) throws ExecutionException, InterruptedException {
|
||||
BomNewPbomParentEntity parent = this.getById(bomRowId);
|
||||
VUtils.isTure(Objects.isNull(parent)).throwMessage("该BOM版本不存在");
|
||||
VUtils.isTure(parent.getStatus() < PBomStatusEnum.PUBLISH.getValue()).throwMessage("只有已发布的BOM,才能发起变更");
|
||||
//检查当前用户是否有该工厂权限
|
||||
if(!userRoleService.getUserOfFactory().contains(parent.getFacCode())){
|
||||
VUtils.isTure(true).throwMessage("您没有该工厂的权限,无法升级");
|
||||
}
|
||||
LogRecordContext.putVariable("bom",parent);
|
||||
PBomUpgrade upgrade = new PBomUpgrade(parent, getAllBom(bomRowId, 0));
|
||||
upgrade.upgrade();
|
||||
|
|
@ -1549,7 +1570,9 @@ public class BomNewPbomParentService extends ServiceImpl<BomNewPbomParentMapper,
|
|||
.eq(BomNewSapErrorMsgEntity::getTargetRowId, rowId)
|
||||
.one();
|
||||
if (Objects.isNull(sapErrorMsgEntity)) return Collections.emptyList();
|
||||
return JSON.parseArray(sapErrorMsgEntity.getData(), OperationErrorMsgVO.class);
|
||||
List<OperationErrorMsgVO> resultList = JSON.parseArray(sapErrorMsgEntity.getData(), OperationErrorMsgVO.class);
|
||||
resultList.forEach(result -> result.setCreatedTime(sapErrorMsgEntity.getCreatedTime()));
|
||||
return resultList;
|
||||
}
|
||||
|
||||
public List<BomNewPbomParentVO> getReverseBoms(Long parentRowId) {
|
||||
|
|
|
|||
|
|
@ -517,9 +517,9 @@ public class DQBomService {
|
|||
savePbomParents(parents, root.getMaterialNo().startsWith("31") ? PBomStatusEnum.FACTORY_CONFIRM : PBomStatusEnum.PUBLISH);
|
||||
savePbomChildren(children, parents);
|
||||
|
||||
CompletableFuture.runAsync(() -> {
|
||||
bomNewPbomParentService.getBaseMapper().updatePBomMaterialUse();
|
||||
});
|
||||
// CompletableFuture.runAsync(() -> {
|
||||
// bomNewPbomParentService.getBaseMapper().updatePBomMaterialUse();
|
||||
// });
|
||||
}
|
||||
|
||||
private void savePbomChildren(List<BomNewDQbomChildEntity> children, List<BomNewDQbomParentEntity> parents) {
|
||||
|
|
|
|||
|
|
@ -81,7 +81,11 @@ public class UserRoleService {
|
|||
if(userMultiplantFacRoleCount>0){
|
||||
return ImmutableList.of(EBomConstant.MAIN_FACTORY_CODE_1010,EBomConstant.XIAN_TAO_FACTORY_CODE_1020);
|
||||
}else {
|
||||
return SessionUtil.getFullDeptName().contains("仙桃公司")? ImmutableList.of(EBomConstant.XIAN_TAO_FACTORY_CODE_1020) : ImmutableList.of(EBomConstant.MAIN_FACTORY_CODE_1010) ;
|
||||
String dptCde=materialMainService.getBaseMapper().getUserDepartmentDptCode(SessionUtil.getDepartRowId());
|
||||
if(StrUtil.isNotBlank(dptCde) && dptCde.contains("仙桃公司")){
|
||||
return ImmutableList.of(EBomConstant.XIAN_TAO_FACTORY_CODE_1020) ;
|
||||
}
|
||||
return ImmutableList.of(EBomConstant.MAIN_FACTORY_CODE_1010) ;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -173,7 +173,7 @@ public abstract class EBomToPbomBase {
|
|||
|
||||
|
||||
if (Objects.isNull(oldParent)) {
|
||||
return buildParentEntity(parentVo, facCode, oldParent, parentVo.getCurrentVersion());
|
||||
return buildParentEntity(parentVo, facCode, oldParent, StrUtil.isBlank(parentVo.getCurrentVersion())? VersionUtil.getNextVersion(""):parentVo.getCurrentVersion());
|
||||
|
||||
}
|
||||
//pbom 处于工作表
|
||||
|
|
@ -197,7 +197,8 @@ public abstract class EBomToPbomBase {
|
|||
return null;
|
||||
|
||||
} else { //pbom-处于正式表
|
||||
String bomVersion = VersionUtil.compare(parentVo.getCurrentVersion(), oldParent.getCurrentVersion()) > 0 ? parentVo.getCurrentVersion() : VersionUtil.getNextVersion(oldParent.getCurrentVersion());
|
||||
String version=StrUtil.isBlank(parentVo.getCurrentVersion())?VersionUtil.getNextVersion(""):parentVo.getCurrentVersion();
|
||||
String bomVersion = VersionUtil.compare(version, oldParent.getCurrentVersion()) > 0 ? version : VersionUtil.getNextVersion(oldParent.getCurrentVersion());
|
||||
return buildParentEntity(parentVo, facCode, oldParent, bomVersion);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,74 @@
|
|||
package com.nflg.product.bomnew.util;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.nflg.product.bomnew.pojo.vo.BomNewEbomParentVO;
|
||||
import com.nflg.product.bomnew.pojo.vo.BomNewPbomParentVO;
|
||||
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
public class BomNewSortUtil {
|
||||
|
||||
|
||||
static int sortOrderNum(String o1,String o2,int sort){
|
||||
if (Objects.isNull(o1)) {
|
||||
return 0;
|
||||
}
|
||||
if (Objects.isNull(o2)) {
|
||||
return 0;
|
||||
}
|
||||
int result = 0;
|
||||
try {
|
||||
if (sort == 0) { //升
|
||||
result = Integer.parseInt(o1 ) - Integer.parseInt(o2);
|
||||
} else if (sort == 1) {//降
|
||||
result = Integer.parseInt(o2 ) - Integer.parseInt(o1 );
|
||||
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
public static void orderNumPbomSort(List<BomNewPbomParentVO> list, int sort) {
|
||||
if (CollUtil.isEmpty(list)) {
|
||||
return;
|
||||
}
|
||||
|
||||
CollUtil.sort(list, new Comparator<BomNewPbomParentVO>() {
|
||||
@Override
|
||||
public int compare(BomNewPbomParentVO o1, BomNewPbomParentVO o2) {
|
||||
|
||||
|
||||
return sortOrderNum(o1.getOrderNumber(),o2.getOrderNumber(),sort);
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param list
|
||||
* @param sort
|
||||
*/
|
||||
public static void orderNumEbomSort(List<BomNewEbomParentVO> list, int sort) {
|
||||
|
||||
if (CollUtil.isEmpty(list)) {
|
||||
return;
|
||||
}
|
||||
|
||||
CollUtil.sort(list, new Comparator<BomNewEbomParentVO>() {
|
||||
@Override
|
||||
public int compare(BomNewEbomParentVO o1, BomNewEbomParentVO o2) {
|
||||
|
||||
return sortOrderNum(o1.getOrderNumber(),o2.getOrderNumber(),sort);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -317,6 +317,18 @@
|
|||
and a.last_version_is = 1
|
||||
AND a.virtual_package_is = 0;
|
||||
</update>
|
||||
<update id="updateRootForWaitReview1">
|
||||
update t_bom_new_ebom_parent
|
||||
set root_is_for_wait_review=0
|
||||
</update>
|
||||
<update id="updateRootForWaitReview2">
|
||||
update t_bom_new_ebom_parent a left join (
|
||||
select b.row_id, b.material_no,a.`status` from t_bom_new_ebom_parent a join t_bom_new_ebom_child b on a.row_id=b.parent_row_id and a.`status` in (1,3) and last_version_is=1
|
||||
) b
|
||||
on a.material_no=b.material_no
|
||||
set a.root_is_for_wait_review=1
|
||||
where a.`status` in (1, 3) and last_version_is=1 and b.row_id is null
|
||||
</update>
|
||||
<!--更新-待复核根节点-->
|
||||
<update id="updateRootForWaitReview">
|
||||
update t_bom_new_ebom_parent
|
||||
|
|
|
|||
|
|
@ -186,23 +186,23 @@
|
|||
]]>
|
||||
</select>
|
||||
<insert id="insertMBomIntoHistoryParent">
|
||||
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`)
|
||||
INSERT INTO `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>
|
||||
|
||||
<insert id="insertMBomIntoHistoryChild">
|
||||
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`)
|
||||
INSERT INTO `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>
|
||||
<!--将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`)
|
||||
INSERT INTO `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`)
|
||||
INSERT INTO `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>
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@
|
|||
);
|
||||
</delete>
|
||||
<insert id="syncOriginalBomToFormalParent">
|
||||
INSERT INTO `nflg`.`t_bom_new_original_parent_formal` (`row_id`, `batch_no`, `drawing_no`, `material_no`, `material_name`, `material_desc`, `current_version`, `num`, `root_is`, `user_root_is`, `bom_exist`, `should_bom_exist`, `last_version_is`, `material_texture`, `unit_weight`, `total_weight`, `devise_user_code`, `devise_name`, `status`, `edit_status`, `convert_to_ebom_time`, `dept_row_id`, `dept_name`, `source`, `remark`, `created_by`, `created_time`, `expire_end_time`, `level_num`)
|
||||
INSERT INTO `t_bom_new_original_parent_formal` (`row_id`, `batch_no`, `drawing_no`, `material_no`, `material_name`, `material_desc`, `current_version`, `num`, `root_is`, `user_root_is`, `bom_exist`, `should_bom_exist`, `last_version_is`, `material_texture`, `unit_weight`, `total_weight`, `devise_user_code`, `devise_name`, `status`, `edit_status`, `convert_to_ebom_time`, `dept_row_id`, `dept_name`, `source`, `remark`, `created_by`, `created_time`, `expire_end_time`, `level_num`)
|
||||
|
||||
select `row_id`, `batch_no`, `drawing_no`, `material_no`, `material_name`, `material_desc`, `current_version`, `num`, `root_is`, `user_root_is`, `bom_exist`, `should_bom_exist`, `last_version_is`, `material_texture`, `unit_weight`, `total_weight`, `devise_user_code`, `devise_name`, `status`, `edit_status`, `convert_to_ebom_time`, `dept_row_id`, `dept_name`, `source`, `remark`, `created_by`, `created_time`, `expire_end_time`, `level_num`
|
||||
from t_bom_new_original_parent where row_id in
|
||||
|
|
|
|||
Loading…
Reference in New Issue