feat: 术士套包、定数包功能开发

dev_fifo1.0
chenhc 1 year ago
parent bfca9fa283
commit 50490a88dc

@ -6,4 +6,6 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface IoDestinyProcessMapper extends BaseMapper<IoDestinyProcessEntity> {
}
String selectMaxDestinyNo(String destinyId);
}

@ -100,7 +100,7 @@ public class UdiProductEntity {
private String updateUser;
private Date createTime;
private String createUser;
private String destinyType;
private Integer destinyType;
/**
* (

@ -55,4 +55,6 @@ public class BasicSkProjectRequest extends ListPageRequest {
* 1使2
*/
private Integer type;
private Integer status;
}

@ -190,6 +190,13 @@ public class UdiRelevanceResponse {
@ApiModelProperty(value = "耗材材质")
private String matrial;
/**
* 1使2
*/
@TableField(value = "destinyType")
@ApiModelProperty(value = "类型1定数包内部使用2项目、组套外部关联")
private Integer destinyType;
public int getBhzxxsbzsl() {
if (bhzxxsbzsl == null || bhzxxsbzsl == 0) {
return 1;

@ -1,13 +1,16 @@
package com.glxp.api.service.inout.impl;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.pagehelper.PageHelper;
import com.glxp.api.common.res.BaseResponse;
import com.glxp.api.common.util.ResultVOUtils;
import com.glxp.api.dao.basic.BasicSkProjectMapper;
import com.glxp.api.dao.inout.IoDestinyProcessCodeMapper;
import com.glxp.api.dao.inout.IoDestinyProcessMapper;
import com.glxp.api.entity.auth.AuthAdmin;
import com.glxp.api.entity.basic.BasicSkProjectEntity;
import com.glxp.api.entity.basic.UdiEntity;
import com.glxp.api.entity.inout.IoDestinyProcessCodeEntity;
import com.glxp.api.entity.inout.IoDestinyProcessEntity;
@ -18,6 +21,7 @@ import com.glxp.api.res.inout.IodestinyProcessResponse;
import com.glxp.api.service.auth.CustomerService;
import com.glxp.api.service.basic.UdiRelevanceService;
import com.glxp.api.service.basic.impl.BasicDestinyRelService;
import com.glxp.api.util.StringUtils;
import com.glxp.api.util.udi.FilterUdiUtils;
import com.glxp.api.util.udi.UdiCalCountUtil;
import org.springframework.stereotype.Service;
@ -40,7 +44,8 @@ public class IoDestinyProcessDetailServiceImpl implements IoDestinyProcessDetail
private IoDestinyProcessDetailMapper ioDestinyProcessDetailMapper;
@Resource
private IoDestinyProcessCodeMapper ioDestinyProcessCodeMapper;
@Resource
private BasicSkProjectMapper basicSkProjectMapper;
@Resource
CustomerService customerService;
@Resource
@ -81,7 +86,8 @@ public class IoDestinyProcessDetailServiceImpl implements IoDestinyProcessDetail
ioDestinyProcessMapper.updateById(ioDestinyProcessEntity);
}else{
ioDestinyProcessEntity.setId(IdUtil.getSnowflakeNextId());
ioDestinyProcessEntity.setDestinyNo(filterUdiRelRequest.getDestinyNo());
//destinyNo 处理为 destinyId + 00000001 格式
ioDestinyProcessEntity.setDestinyNo(generateDestinyNoByDestinyId(filterUdiRelRequest.getDestinyId()));
ioDestinyProcessEntity.setDestinyId(filterUdiRelRequest.getDestinyId());
ioDestinyProcessEntity.setBillNo(filterUdiRelRequest.getBillNo());
ioDestinyProcessEntity.setBillDate(filterUdiRelRequest.getBillDate());
@ -113,6 +119,27 @@ public class IoDestinyProcessDetailServiceImpl implements IoDestinyProcessDetail
return true;
}
/**
* ####000001
* @param destinyId
* @return
*/
private String generateDestinyNoByDestinyId(String destinyId) {
//查数据库编码的最大值 然后加1
String maxDestinyNo = ioDestinyProcessMapper.selectMaxDestinyNo(destinyId);
BasicSkProjectEntity basicSkProjectEntity = basicSkProjectMapper.selectById(destinyId);
String code = basicSkProjectEntity.getCode();
if (StrUtil.isNotEmpty(maxDestinyNo)){
//解析加1
String newString = maxDestinyNo.replace(code, "");
long parseLong = Long.parseLong(newString);
return code+ StringUtils.padl(parseLong+1,8);
}else {
//初始化
return code+"00000001";
}
}
@Override
public List<IoDestinyProcessDetailEntity> addDestinyProcess(IodestinyProcessRequest iodestinyProcessRequest) {

@ -10,6 +10,9 @@
<if test="type != '' and type != null">
AND type = #{type}
</if>
<if test="status != '' and status != null">
AND status = #{status}
</if>
<if test="name != '' and name != null">
AND name LIKE concat('%', #{name}, '%')
</if>

@ -19,7 +19,15 @@
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
id, destinyId, destinyNo, billNo, billDate, invCode, remark, createTime, updateTime,
id, destinyId, destinyNo, billNo, billDate, invCode, remark, createTime, updateTime,
`createUser`, updateUser, `status`
</sql>
</mapper>
<select id="selectMaxDestinyNo" resultType="java.lang.String">
select destinyNo
from io_destiny_process
where destinyId = #{destinyId}
order by destinyNo desc limit 1
</select>
</mapper>

@ -2010,7 +2010,7 @@ CALL Pro_Temp_ColumnWork('basic_sk_project', 'status',
' int(0) NULL DEFAULT NULL COMMENT '' 状态1.草稿2.未审核3.已审核,4.已拒绝)''', 1);
CALL Pro_Temp_ColumnWork('basic_products', 'destinyType',
' int(0) NULL DEFAULT NULL COMMENT''1:定数包''',
' int(0) NULL DEFAULT NULL COMMENT''类型1定数包内部使用2项目、组套外部关联''',
1);
@ -2021,3 +2021,7 @@ CALL Pro_Temp_ColumnWork('basic_sk_sicker', 'deptName',
CALL Pro_Temp_ColumnWork('basic_sk_sicker', 'deptCode',
' varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL',
1);
INSERT IGNORE INTO auth_menu(`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query_param`, `is_frame`, `is_cache`, `menu_type`,
`visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`)
VALUES (2093, '术士套包管理', 1643, 6, 'destiny/warlockBag', 'basic/destiny/warlockBag', NULL, 1, 0, 'C', '0', '0', NULL, NULL, '超级用户', '2024-04-15 14:13:39', NULL, NULL, NULL);

Loading…
Cancel
Save