|
@ -24,12 +24,14 @@ import com.epmet.commons.tools.validator.ValidatorUtils; |
|
|
import com.epmet.commons.tools.validator.group.AddGroup; |
|
|
import com.epmet.commons.tools.validator.group.AddGroup; |
|
|
import com.epmet.commons.tools.validator.group.DefaultGroup; |
|
|
import com.epmet.commons.tools.validator.group.DefaultGroup; |
|
|
import com.epmet.commons.tools.validator.group.UpdateGroup; |
|
|
import com.epmet.commons.tools.validator.group.UpdateGroup; |
|
|
|
|
|
import com.epmet.modules.partymember.entity.ScreenEnterpriseOutputEntity; |
|
|
import com.epmet.modules.partymember.service.ScreenEnterpriseOutputService; |
|
|
import com.epmet.modules.partymember.service.ScreenEnterpriseOutputService; |
|
|
import com.epmet.resi.partymember.dto.ScreenEnterpriseOutputDTO; |
|
|
import com.epmet.resi.partymember.dto.ScreenEnterpriseOutputDTO; |
|
|
import com.epmet.resi.partymember.dto.partymember.form.vegetableFormDTO; |
|
|
import com.epmet.resi.partymember.dto.partymember.form.vegetableFormDTO; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.web.bind.annotation.*; |
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
|
|
|
|
|
|
|
import java.util.List; |
|
|
import java.util.Map; |
|
|
import java.util.Map; |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -42,42 +44,47 @@ import java.util.Map; |
|
|
@RestController |
|
|
@RestController |
|
|
@RequestMapping("screenenterpriseoutput") |
|
|
@RequestMapping("screenenterpriseoutput") |
|
|
public class ScreenEnterpriseOutputController { |
|
|
public class ScreenEnterpriseOutputController { |
|
|
|
|
|
|
|
|
@Autowired |
|
|
@Autowired |
|
|
private ScreenEnterpriseOutputService screenEnterpriseOutputService; |
|
|
private ScreenEnterpriseOutputService screenEnterpriseOutputService; |
|
|
|
|
|
|
|
|
@GetMapping("page") |
|
|
@GetMapping("page") |
|
|
public Result<PageData<ScreenEnterpriseOutputDTO>> page(@RequestParam Map<String, Object> params){ |
|
|
public Result<PageData<ScreenEnterpriseOutputDTO>> page(@RequestParam Map<String, Object> params) { |
|
|
PageData<ScreenEnterpriseOutputDTO> page = screenEnterpriseOutputService.page(params); |
|
|
PageData<ScreenEnterpriseOutputDTO> page = screenEnterpriseOutputService.page(params); |
|
|
return new Result<PageData<ScreenEnterpriseOutputDTO>>().ok(page); |
|
|
return new Result<PageData<ScreenEnterpriseOutputDTO>>().ok(page); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@GetMapping("{id}") |
|
|
@GetMapping("{id}") |
|
|
public Result<ScreenEnterpriseOutputDTO> get(@PathVariable("id") String id){ |
|
|
public Result<ScreenEnterpriseOutputDTO> get(@PathVariable("id") String id) { |
|
|
ScreenEnterpriseOutputDTO data = screenEnterpriseOutputService.get(id); |
|
|
ScreenEnterpriseOutputDTO data = screenEnterpriseOutputService.get(id); |
|
|
return new Result<ScreenEnterpriseOutputDTO>().ok(data); |
|
|
return new Result<ScreenEnterpriseOutputDTO>().ok(data); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* |
|
|
* @param |
|
|
|
|
|
* @return com.epmet.commons.tools.utils.Result |
|
|
* @description: 上报 |
|
|
* @description: 上报 |
|
|
* @author qushutong |
|
|
* @author qushutong |
|
|
* @date 2024/3/22 14:52 |
|
|
* @date 2024/3/22 14:52 |
|
|
* @param |
|
|
|
|
|
* @return com.epmet.commons.tools.utils.Result |
|
|
|
|
|
* @Version1.0 |
|
|
* @Version1.0 |
|
|
**/ |
|
|
**/ |
|
|
@PostMapping("yifengScreen/submitOutput") |
|
|
@PostMapping("yifengScreen/submitOutput") |
|
|
public Result submitOutput(@RequestBody vegetableFormDTO dto){ |
|
|
public Result submitOutput(@RequestBody vegetableFormDTO dto) { |
|
|
//效验数据
|
|
|
//效验数据
|
|
|
// ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
|
|
|
// ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
|
|
|
screenEnterpriseOutputService.submitOutput(dto); |
|
|
screenEnterpriseOutputService.submitOutput(dto); |
|
|
return new Result(); |
|
|
return new Result(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@GetMapping("yifengScreen/getVegetableByEnterprise/{placeOrgName}") |
|
|
|
|
|
public Result<List<ScreenEnterpriseOutputEntity>> getVegetableByEnterprise(@PathVariable("placeOrgName") String placeOrgName) { |
|
|
|
|
|
return new Result<List<ScreenEnterpriseOutputEntity>>().ok(screenEnterpriseOutputService.getListVegetable(placeOrgName)); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
@PutMapping |
|
|
@PutMapping |
|
|
public Result update(@RequestBody ScreenEnterpriseOutputDTO dto){ |
|
|
public Result update(@RequestBody ScreenEnterpriseOutputDTO dto) { |
|
|
//效验数据
|
|
|
//效验数据
|
|
|
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
|
|
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
|
|
screenEnterpriseOutputService.update(dto); |
|
|
screenEnterpriseOutputService.update(dto); |
|
@ -85,7 +92,7 @@ public class ScreenEnterpriseOutputController { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@DeleteMapping |
|
|
@DeleteMapping |
|
|
public Result delete(@RequestBody String[] ids){ |
|
|
public Result delete(@RequestBody String[] ids) { |
|
|
//效验数据
|
|
|
//效验数据
|
|
|
AssertUtils.isArrayEmpty(ids, "id"); |
|
|
AssertUtils.isArrayEmpty(ids, "id"); |
|
|
screenEnterpriseOutputService.delete(ids); |
|
|
screenEnterpriseOutputService.delete(ids); |
|
@ -94,11 +101,12 @@ public class ScreenEnterpriseOutputController { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@PostMapping |
|
|
@PostMapping |
|
|
public Result save(@RequestBody ScreenEnterpriseOutputDTO dto){ |
|
|
public Result save(@RequestBody ScreenEnterpriseOutputDTO dto) { |
|
|
//效验数据
|
|
|
//效验数据
|
|
|
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|
|
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|
|
screenEnterpriseOutputService.save(dto); |
|
|
screenEnterpriseOutputService.save(dto); |
|
|
return new Result(); |
|
|
return new Result(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |