物资配置管理--增加SQL查询字段
This commit is contained in:
parent
2f7951adbc
commit
a5571a6468
|
|
@ -1,6 +1,6 @@
|
|||
package com.bonus.common.biz.constant;
|
||||
/**
|
||||
* 仓储站点配置项
|
||||
* 机具站点配置项
|
||||
*
|
||||
* @author bonus
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -5,9 +5,12 @@ package com.bonus.common.biz.constant;
|
|||
*
|
||||
* @author bonus
|
||||
*/
|
||||
public class MaterialConstants
|
||||
{
|
||||
private MaterialConstants(){}
|
||||
public class MaterialConstants {
|
||||
|
||||
private MaterialConstants() {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* UTF-8 字符集
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -39,10 +39,10 @@ public class MaTypeConfigServiceImpl implements MaTypeConfigService {
|
|||
int result;
|
||||
switch (maTypeConfigDto.getBindFlag()) {
|
||||
case 1:
|
||||
result = handleBind(maTypeConfigDto.getBindFlag(), maTypeConfigDto.getTypeId(), maTypeConfigDto.getUserId());
|
||||
result = handleBind(maTypeConfigDto.getBindRoleType(), maTypeConfigDto.getTypeId(), maTypeConfigDto.getUserId());
|
||||
return result == 1 ? AjaxResult.success("绑定成功") : AjaxResult.error("绑定失败");
|
||||
case 2:
|
||||
result = handleUnBind(maTypeConfigDto.getBindFlag(), maTypeConfigDto.getTypeId(), maTypeConfigDto.getUserId());
|
||||
result = handleUnBind(maTypeConfigDto.getBindRoleType(), maTypeConfigDto.getTypeId(), maTypeConfigDto.getUserId());
|
||||
return result == 1 ? AjaxResult.success("解绑成功") : AjaxResult.error("解绑失败");
|
||||
default:
|
||||
// 处理其他情况或抛出异常
|
||||
|
|
|
|||
|
|
@ -166,9 +166,10 @@ public class TypeServiceImpl implements ITypeService {
|
|||
public List<MaTypeConfigVo> selectThreeFourLevelTypeListAndParent(Type type) {
|
||||
// 查询四级节点列表
|
||||
List<MaTypeConfigVo> fourLevelTypeList = typeMapper.selectFourLevelTypeListAndParent(type);
|
||||
List<MaTypeConfigVo> threeLevelTypeList = null;
|
||||
if (fourLevelTypeList != null && !fourLevelTypeList.isEmpty()) {
|
||||
// 查询三级节点列表
|
||||
List<MaTypeConfigVo> threeLevelTypeList = typeMapper.selectThreeLevelTypeListAndParent(type);
|
||||
threeLevelTypeList = typeMapper.selectThreeLevelTypeListAndParent(type);
|
||||
if (threeLevelTypeList != null && !threeLevelTypeList.isEmpty()) {
|
||||
// 循环,把三级节点放入fourLevelTypeList集合中
|
||||
for (MaTypeConfigVo fourLevelType : fourLevelTypeList) {
|
||||
|
|
@ -182,7 +183,7 @@ public class TypeServiceImpl implements ITypeService {
|
|||
}
|
||||
}
|
||||
}
|
||||
return fourLevelTypeList;
|
||||
return threeLevelTypeList;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -64,6 +64,9 @@ public class MaTypeConfigVo implements java.io.Serializable {
|
|||
@ApiModelProperty(value = "请求API时调用参数--左侧Tree层级")
|
||||
private String level;
|
||||
|
||||
@ApiModelProperty(value = "是否选中")
|
||||
private Boolean isCheck = false;
|
||||
|
||||
@ApiModelProperty(value = "子节点")
|
||||
private List<MaTypeConfigVo> children = new ArrayList<>();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ import com.bonus.common.core.web.page.TableDataInfo;
|
|||
@RestController
|
||||
@RequestMapping("/purchase_check_info")
|
||||
public class PurchaseCheckInfoController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private IPurchaseCheckInfoService purchaseCheckInfoService;
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package com.bonus.material.purchase.controller;
|
|||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import com.bonus.common.log.enums.OperaType;
|
||||
import com.bonus.common.security.annotation.RequiresPermissions;
|
||||
import com.bonus.material.common.annotation.PreventRepeatSubmit;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
|
@ -16,7 +17,6 @@ import org.springframework.web.bind.annotation.RequestBody;
|
|||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.bonus.common.log.annotation.SysLog;
|
||||
import com.bonus.common.security.annotation.RequiresPermissions;
|
||||
import com.bonus.material.purchase.domain.PurchaseMacodeInfo;
|
||||
import com.bonus.material.purchase.service.IPurchaseMacodeInfoService;
|
||||
import com.bonus.common.core.web.controller.BaseController;
|
||||
|
|
@ -34,6 +34,7 @@ import com.bonus.common.core.web.page.TableDataInfo;
|
|||
@RestController
|
||||
@RequestMapping("/purchase_macode_info")
|
||||
public class PurchaseMacodeInfoController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private IPurchaseMacodeInfoService purchaseMacodeInfoService;
|
||||
|
||||
|
|
|
|||
|
|
@ -6,8 +6,7 @@ import com.bonus.material.purchase.domain.PurchaseCheckInfo;
|
|||
/**
|
||||
* 新购验收任务Service接口
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2024-10-16
|
||||
* @author syruan
|
||||
*/
|
||||
public interface IPurchaseCheckInfoService {
|
||||
/**
|
||||
|
|
@ -16,7 +15,7 @@ public interface IPurchaseCheckInfoService {
|
|||
* @param id 新购验收任务主键
|
||||
* @return 新购验收任务
|
||||
*/
|
||||
public PurchaseCheckInfo selectPurchaseCheckInfoById(Long id);
|
||||
PurchaseCheckInfo selectPurchaseCheckInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 查询新购验收任务列表
|
||||
|
|
@ -24,7 +23,7 @@ public interface IPurchaseCheckInfoService {
|
|||
* @param purchaseCheckInfo 新购验收任务
|
||||
* @return 新购验收任务集合
|
||||
*/
|
||||
public List<PurchaseCheckInfo> selectPurchaseCheckInfoList(PurchaseCheckInfo purchaseCheckInfo);
|
||||
List<PurchaseCheckInfo> selectPurchaseCheckInfoList(PurchaseCheckInfo purchaseCheckInfo);
|
||||
|
||||
/**
|
||||
* 新增新购验收任务
|
||||
|
|
@ -32,7 +31,7 @@ public interface IPurchaseCheckInfoService {
|
|||
* @param purchaseCheckInfo 新购验收任务
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertPurchaseCheckInfo(PurchaseCheckInfo purchaseCheckInfo);
|
||||
int insertPurchaseCheckInfo(PurchaseCheckInfo purchaseCheckInfo);
|
||||
|
||||
/**
|
||||
* 修改新购验收任务
|
||||
|
|
@ -40,7 +39,7 @@ public interface IPurchaseCheckInfoService {
|
|||
* @param purchaseCheckInfo 新购验收任务
|
||||
* @return 结果
|
||||
*/
|
||||
public int updatePurchaseCheckInfo(PurchaseCheckInfo purchaseCheckInfo);
|
||||
int updatePurchaseCheckInfo(PurchaseCheckInfo purchaseCheckInfo);
|
||||
|
||||
/**
|
||||
* 批量删除新购验收任务
|
||||
|
|
@ -48,7 +47,7 @@ public interface IPurchaseCheckInfoService {
|
|||
* @param ids 需要删除的新购验收任务主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deletePurchaseCheckInfoByIds(Long[] ids);
|
||||
int deletePurchaseCheckInfoByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除新购验收任务信息
|
||||
|
|
@ -56,5 +55,5 @@ public interface IPurchaseCheckInfoService {
|
|||
* @param id 新购验收任务主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deletePurchaseCheckInfoById(Long id);
|
||||
int deletePurchaseCheckInfoById(Long id);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,15 +9,17 @@ import com.bonus.material.purchase.mapper.PurchaseCheckInfoMapper;
|
|||
import com.bonus.material.purchase.domain.PurchaseCheckInfo;
|
||||
import com.bonus.material.purchase.service.IPurchaseCheckInfoService;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 新购验收任务Service业务层处理
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2024-10-16
|
||||
* @author syruan
|
||||
*/
|
||||
@Service
|
||||
public class PurchaseCheckInfoServiceImpl implements IPurchaseCheckInfoService {
|
||||
@Autowired
|
||||
|
||||
@Resource
|
||||
private PurchaseCheckInfoMapper purchaseCheckInfoMapper;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -336,11 +336,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
|
||||
<select id="getMaTypeSelectVoListByParentId" resultType="com.bonus.material.ma.vo.MaTypeSelectVo">
|
||||
select
|
||||
type_id,type_name,parent_id,level
|
||||
type_id as typeId,
|
||||
type_name as typeName,
|
||||
parent_id as parentId,
|
||||
level
|
||||
from
|
||||
ma_type
|
||||
where
|
||||
parent_id = #{typeId} and del_flag = 0
|
||||
parent_id = #{parentId} and del_flag = 0
|
||||
</select>
|
||||
|
||||
<select id="selectFourLevelTypeListAndParent" resultMap="MaTypeConfigVoResult">
|
||||
|
|
|
|||
|
|
@ -17,12 +17,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="companyId" column="company_id" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectPurchaseCheckInfoVo">
|
||||
select id, task_id, purchase_time, arrival_time, purchaser, create_by, create_time, update_by, update_time, remark, company_id from purchase_check_info
|
||||
<sql id="selectPurchaseCheckInfoBaseSQL">
|
||||
select
|
||||
id, task_id, purchase_time, arrival_time, purchaser, create_by,
|
||||
create_time, update_by, update_time, remark, company_id
|
||||
from
|
||||
purchase_check_info
|
||||
</sql>
|
||||
|
||||
<sql id="selectPurchaseCheckInfoJoinSQL">
|
||||
select
|
||||
pci.id, pci.task_id, pci.purchase_time, pci.arrival_time, pci.purchaser, pci.create_by,
|
||||
pci.create_time, pci.update_by, pci.update_time, pci.remark, pci.company_id
|
||||
from
|
||||
purchase_check_info pci
|
||||
</sql>
|
||||
|
||||
<select id="selectPurchaseCheckInfoList" parameterType="com.bonus.material.purchase.domain.PurchaseCheckInfo" resultMap="PurchaseCheckInfoResult">
|
||||
<include refid="selectPurchaseCheckInfoVo"/>
|
||||
<include refid="selectPurchaseCheckInfoBaseSQL"/>
|
||||
<where>
|
||||
<if test="taskId != null "> and task_id = #{taskId}</if>
|
||||
<if test="purchaseTime != null "> and purchase_time = #{purchaseTime}</if>
|
||||
|
|
@ -33,7 +45,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</select>
|
||||
|
||||
<select id="selectPurchaseCheckInfoById" parameterType="Long" resultMap="PurchaseCheckInfoResult">
|
||||
<include refid="selectPurchaseCheckInfoVo"/>
|
||||
<include refid="selectPurchaseCheckInfoBaseSQL"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue