代码提交
This commit is contained in:
parent
60552b6c65
commit
1bac1777ce
|
|
@ -6,6 +6,7 @@ import com.bonus.common.core.domain.AjaxResult;
|
|||
import com.bonus.common.core.page.TableDataInfo;
|
||||
import com.bonus.system.domain.SysConfig;
|
||||
import com.bonus.system.domain.SystemConfig;
|
||||
import com.bonus.system.domain.vo.SystemConfigVo;
|
||||
import com.bonus.system.service.ISystemConfigService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
|
@ -37,8 +38,8 @@ public class SystemConfigController extends BaseController {
|
|||
* 获取参数配置单个列表
|
||||
*/
|
||||
@GetMapping("/getConfig")
|
||||
public AjaxResult getConfig(SystemConfig config) {
|
||||
List<SystemConfig> list = configService.list(config);
|
||||
public AjaxResult getConfig() {
|
||||
List<SystemConfigVo> list = configService.listConfig();
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
@RequiresPermissions("sys:config:add")
|
||||
|
|
|
|||
|
|
@ -54,4 +54,6 @@ public interface TransferApplyMapper {
|
|||
Integer transferReceive(TransferFileDto dto);
|
||||
|
||||
Integer isAllReceive(TransferFileDto dto);
|
||||
|
||||
Integer updateTransferStatus(TransferFileDto dto);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ public class TransferApplyServiceImpl implements TransferApplyService {
|
|||
dto.setCreateUserName(getLoginUser().getUsername());
|
||||
dto.setUpdateUserId(getLoginUser().getUserId().intValue());
|
||||
dto.setUpdateUserName(getLoginUser().getUsername());
|
||||
String proName = transferApplyMapper.getProNameById(dto);
|
||||
String proName = transferApplyMapper.getProNameById(dto);
|
||||
dto.setProName(proName);
|
||||
Integer i = transferApplyMapper.insert(dto);
|
||||
List<TransferFileDto> transferFileDtos = dto.getTransferFileDtos();
|
||||
|
|
@ -147,12 +147,20 @@ public class TransferApplyServiceImpl implements TransferApplyService {
|
|||
|
||||
@Override
|
||||
public AjaxResult transferReceive(TransferFileDto dto) {
|
||||
// transferApplyMapper.transferReceive(dto);
|
||||
// // 查询该申请下,是否所有文件都已接收
|
||||
// Integer num = transferApplyMapper.isAllReceive(dto);
|
||||
// if (num == 1){
|
||||
// return AjaxResult.success("接收成功");
|
||||
// }
|
||||
return null;
|
||||
try {
|
||||
transferApplyMapper.transferReceive(dto);
|
||||
// 查询该申请下,是否所有文件都已接收
|
||||
Integer num = transferApplyMapper.isAllReceive(dto);
|
||||
if (num == 1) {
|
||||
transferApplyMapper.updateTransferStatus(dto);
|
||||
}
|
||||
if (num > 0) {
|
||||
return AjaxResult.success("接收成功");
|
||||
} else {
|
||||
return AjaxResult.error("接收失败");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
return AjaxResult.error("接口异常");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -285,6 +285,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
receive_time = now()
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
<update id="updateTransferStatus">
|
||||
UPDATE da_ky_transfer_apply
|
||||
SET transfer_status = '1'
|
||||
WHERE id = #{transferApplyId}
|
||||
</update>
|
||||
<delete id="delTransferFiles">
|
||||
DELETE FROM da_ky_transfer_file
|
||||
WHERE transfer_apply_id = #{id}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,15 @@
|
|||
package com.bonus.system.domain.vo;
|
||||
|
||||
import com.bonus.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 参数配置表 sys_config
|
||||
*
|
||||
* @author bonus
|
||||
*/
|
||||
@Data
|
||||
public class SystemConfigVo {
|
||||
private String configCode;
|
||||
private String useStatus;
|
||||
}
|
||||
|
|
@ -2,6 +2,7 @@ package com.bonus.system.mapper;
|
|||
|
||||
import com.bonus.common.core.domain.AjaxResult;
|
||||
import com.bonus.system.domain.SystemConfig;
|
||||
import com.bonus.system.domain.vo.SystemConfigVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
|
@ -20,4 +21,5 @@ public interface ISystemConfigMapper {
|
|||
|
||||
Integer del(SystemConfig config);
|
||||
|
||||
List<SystemConfigVo> listConfig();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package com.bonus.system.service;
|
|||
import com.bonus.common.core.domain.AjaxResult;
|
||||
import com.bonus.system.domain.SysConfig;
|
||||
import com.bonus.system.domain.SystemConfig;
|
||||
import com.bonus.system.domain.vo.SystemConfigVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
|
@ -13,6 +14,7 @@ import java.util.List;
|
|||
*/
|
||||
public interface ISystemConfigService {
|
||||
|
||||
List<SystemConfigVo> listConfig();
|
||||
List<SystemConfig> list(SystemConfig config);
|
||||
|
||||
AjaxResult add(SystemConfig config);
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package com.bonus.system.service.impl;
|
|||
import com.bonus.common.core.domain.AjaxResult;
|
||||
import com.bonus.system.domain.SysConfig;
|
||||
import com.bonus.system.domain.SystemConfig;
|
||||
import com.bonus.system.domain.vo.SystemConfigVo;
|
||||
import com.bonus.system.mapper.ISystemConfigMapper;
|
||||
import com.bonus.system.service.ISystemConfigService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
|
@ -19,6 +20,11 @@ public class SystemConfigServiceImpl implements ISystemConfigService {
|
|||
@Autowired
|
||||
private ISystemConfigMapper systemConfigMapper;
|
||||
|
||||
@Override
|
||||
public List<SystemConfigVo> listConfig() {
|
||||
return systemConfigMapper.listConfig();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SystemConfig> list(SystemConfig config) {
|
||||
return systemConfigMapper.list(config);
|
||||
|
|
|
|||
|
|
@ -34,4 +34,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
use_status as useStatus
|
||||
from da_ky_system_config
|
||||
</select>
|
||||
<select id="listConfig" resultType="com.bonus.system.domain.vo.SystemConfigVo">
|
||||
select
|
||||
config_code as configCode,
|
||||
use_status as useStatus
|
||||
from da_ky_system_config
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
Loading…
Reference in New Issue