Commit 9064c384 authored by wanglong's avatar wanglong

更新接口信息

parent 493ed597
package com.yeejoin.amos.boot.module.ugp.biz.controller; package com.yeejoin.amos.boot.module.ugp.biz.controller;
import com.alibaba.fastjson.JSONObject;
import com.yeejoin.amos.boot.biz.common.controller.BaseController; import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.module.ugp.api.dto.WelderDto; import com.yeejoin.amos.boot.module.ugp.api.dto.WelderDto;
import com.yeejoin.amos.boot.module.ugp.biz.service.impl.OrgServiceImpl;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.typroject.tyboot.core.foundation.enumeration.UserType; import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation; import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseHelper; import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel; import org.typroject.tyboot.core.restful.utils.ResponseModel;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
@RestController @RestController
@Api(tags = "焊工信息") @Api(tags = "焊工信息")
@RequestMapping(value = "/welder") @RequestMapping(value = "/welder")
public class WelderController extends BaseController { public class WelderController extends BaseController {
@Autowired
OrgServiceImpl orgService;
/** /**
* 新增焊工信息 * 新增焊工信息
...@@ -27,4 +38,19 @@ public class WelderController extends BaseController { ...@@ -27,4 +38,19 @@ public class WelderController extends BaseController {
return ResponseHelper.buildResponse(null); return ResponseHelper.buildResponse(null);
} }
/**
* 获取焊工信息
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@GetMapping(value = "/selectWelder")
@ApiOperation(httpMethod = "GET", value = "新增焊工信息", notes = "新增焊工信息")
public ResponseModel<List<Map>> selectWelder(@RequestParam("unitId") String companyId) {
List<Map> info = orgService.getInfo(companyId);
return ResponseHelper.buildResponse(info);
}
} }
...@@ -56,7 +56,7 @@ public class EquipmentServiceImpl extends BaseService<EquipmentDto, Equipment, E ...@@ -56,7 +56,7 @@ public class EquipmentServiceImpl extends BaseService<EquipmentDto, Equipment, E
for (Equipment i : equipment) { for (Equipment i : equipment) {
JSONObject name = new JSONObject(); JSONObject name = new JSONObject();
name.put("name", i.getName()); name.put("name", i.getName());
name.put("company_id", i.getCompanyId()); name.put("code", i.getCode());
names.add(name); names.add(name);
} }
......
...@@ -51,7 +51,7 @@ public class MaterialServiceImpl extends BaseService<MaterialDto, Material, Mate ...@@ -51,7 +51,7 @@ public class MaterialServiceImpl extends BaseService<MaterialDto, Material, Mate
for (Material i : materials) { for (Material i : materials) {
JSONObject name = new JSONObject(); JSONObject name = new JSONObject();
name.put("name", i.getName()); name.put("name", i.getName());
name.put("company_id", i.getCompanyId()); name.put("code", i.getCode());
names.add(name); names.add(name);
} }
......
...@@ -57,8 +57,10 @@ public class ProjectResourceServiceImpl extends BaseService<ProjectResourceDto, ...@@ -57,8 +57,10 @@ public class ProjectResourceServiceImpl extends BaseService<ProjectResourceDto,
for (Object json2 : subForm) { for (Object json2 : subForm) {
String select = JSON.parseObject(JSON.toJSONString(json2)).getString("select"); String select = JSON.parseObject(JSON.toJSONString(json2)).getString("select");
// if (!jsonObject.getString("sequenceNbr").isEmpty()){
String companyId = jsonObject.getString("company_id"); // jsonObject.getString("sequenceNbr");
// }
String code = jsonObject.getString("code");
String type = jsonObject.getString("type"); String type = jsonObject.getString("type");
if (type.equals(设备资源.getStatus())) { if (type.equals(设备资源.getStatus())) {
projectResource.setType(设备资源.getState()); projectResource.setType(设备资源.getState());
...@@ -69,7 +71,7 @@ public class ProjectResourceServiceImpl extends BaseService<ProjectResourceDto, ...@@ -69,7 +71,7 @@ public class ProjectResourceServiceImpl extends BaseService<ProjectResourceDto,
if (type.equals(管材资源.getStatus())) { if (type.equals(管材资源.getStatus())) {
projectResource.setType(管材资源.getState()); projectResource.setType(管材资源.getState());
} }
projectResource.setProjectId(Long.valueOf(companyId)); projectResource.setProjectId(Long.valueOf(code));
projectResource.setResourceId(Long.valueOf(select)); projectResource.setResourceId(Long.valueOf(select));
this.save(projectResource); this.save(projectResource);
......
...@@ -48,7 +48,7 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project ...@@ -48,7 +48,7 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
for (Project i : projects) { for (Project i : projects) {
JSONObject name = new JSONObject(); JSONObject name = new JSONObject();
name.put("name", i.getName()); name.put("name", i.getName());
name.put("company_id", i.getCompanyId()); name.put("sequenceNbr", i.getSequenceNbr());
names.add(name); names.add(name);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment