| | |
| | | import com.zt.life.modules.configItemChange.model.ConfigItemChange; |
| | | import com.zt.life.modules.configItemChange.service.ConfigItemChangeService; |
| | | import com.zt.life.modules.configItemWarehouse.model.WarehouseConfigItem; |
| | | import com.zt.life.modules.configItemWarehouse.service.WarehouseConfigItemService; |
| | | import com.zt.life.sys.dto.OssDto; |
| | | import com.zt.life.sys.service.SysOssConfigService; |
| | | import com.zt.modules.coderule.service.SysCodeRuleService; |
| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | import springfox.documentation.annotations.ApiIgnore; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | |
| | | @Autowired |
| | | private SysOssConfigService sysOssConfigService; |
| | | |
| | | @Autowired |
| | | private WarehouseConfigItemService configItemService; |
| | | @GetMapping("page") |
| | | @ApiOperation("分页") |
| | | @ApiImplicitParams({ |
| | |
| | | @ApiImplicitParam(name = Constant.Q.LIMIT, value = Constant.QV.LIMIT, required = true, dataType = Constant.QT.INT), |
| | | @ApiImplicitParam(name = Constant.Q.ORDER_FIELD, value = Constant.QV.ORDER_FIELD, dataType = Constant.QT.STRING), |
| | | @ApiImplicitParam(name = Constant.Q.ORDER, value = Constant.QV.ORDER, dataType = Constant.QT.STRING), |
| | | @ApiImplicitParam(name = "code", value = "配置项入库编号", dataType = Constant.QT.STRING, format = "a.code^LK"), |
| | | @ApiImplicitParam(name = "code", value = "配置项变更编号", dataType = Constant.QT.STRING, format = "a.code^LK"), |
| | | @ApiImplicitParam(name = "projectCode", value = "项目编号", dataType = Constant.QT.STRING, format = "p.code^EQ"), |
| | | @ApiImplicitParam(name = "softwareName", value = "项目名称", dataType = Constant.QT.STRING, format = "p.software_name^EQ"), |
| | | @ApiImplicitParam(name = "libraryType", value = "库类型", dataType = Constant.QT.STRING, format = "a.library_type^EQ") }) |
| | |
| | | |
| | | @GetMapping("getDto") |
| | | @ApiOperation("信息") |
| | | public Result<ConfigItemChangeDto> getDto(Long projectId, Long ChangeId) { |
| | | ConfigItemChangeDto data = configItemChangeService.getDto(projectId, ChangeId); |
| | | if (ChangeId!=null) { |
| | | for (WarehouseConfigItem configItem : data.getConfigItemList()) { |
| | | public Result<ConfigItemChangeDto> getDto(Long projectId, Long changeId) { |
| | | ConfigItemChangeDto data = configItemChangeService.getDto(projectId, changeId); |
| | | if (changeId!=null) { |
| | | for (WarehouseConfigItem configItem : data.getConfigChangeList()) { |
| | | Long configItemId = configItem.getId(); |
| | | OssDto ossDto = sysOssConfigService.getOssByBusiType(configItemId, "config_item_warehouse"); |
| | | if (ossDto != null) { |
| | |
| | | return Result.ok(); |
| | | } |
| | | |
| | | @DeleteMapping("deleteConfigItem") |
| | | @DeleteMapping("deleteConfigChange") |
| | | @ApiOperation("删除") |
| | | @LogOperation("删除") |
| | | public Result delete(@RequestBody Long[] ids){ |
| | |
| | | return Result.ok(); |
| | | } |
| | | |
| | | @GetMapping("getItemList") |
| | | @ApiOperation("获取入库配置项列表") |
| | | public PageResult<WarehouseConfigItem> getItemList(Long projectId,String ids) { |
| | | String type ="change_select_id"; |
| | | List<WarehouseConfigItem> resultList = configItemService.warehouseConfigList(projectId,ids,type); |
| | | return PageResult.ok(resultList); |
| | | } |
| | | @GetMapping("exportConfigChange") |
| | | @ApiOperation("打印变更申请单") |
| | | @LogOperation("打印变更申请单") |
| | | public void exportConfigChange(Long id, HttpServletRequest request, HttpServletResponse response) { |
| | | configItemChangeService.exportConfigChange(id,request, response); |
| | | } |
| | | } |