单据上传功能代码提交

dev
郑明梁 2 years ago
parent dcb4cad964
commit 47b1bd2cd4

@ -11,6 +11,7 @@ import com.glxp.api.annotation.AuthRuleAnnotation;
import com.glxp.api.common.enums.ResultEnum;
import com.glxp.api.common.res.BaseResponse;
import com.glxp.api.common.util.ResultVOUtils;
import com.glxp.api.dao.inout.UnitMaintainPlatformDao;
import com.glxp.api.entity.inout.UnitMaintainPlatformEntity;
import com.glxp.api.entity.system.PlatformEntity;
import com.glxp.api.req.inout.PlatformLinkRequest;
@ -41,11 +42,13 @@ public class PlatformController {
private PlatformService platformService;
@Resource
private CustomerService customerService;
@Resource
private UnitMaintainPlatformDao unitMaintainPlatformDao;
@AuthRuleAnnotation("")
@PostMapping("/udiwms/platform/remove")
public BaseResponse remove(@RequestBody PlatformEntity platformEntity) {
if (platformService.remove(platformEntity.getId()) > 0) {
if (unitMaintainPlatformDao.deleteById(platformEntity.getId())) {
ResultVOUtils.success("删除成功");
}
return ResultVOUtils.error(500, "删除失败");
@ -119,6 +122,9 @@ public class PlatformController {
public BaseResponse update(@RequestBody PlatformLinkRequest platformLinkRequest) {
//判断此数据是否重复
String verifyResult = platformService.verifyUnitMaintainPlatform(platformLinkRequest);
if (!verifyResult.equals("success")) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, verifyResult);
}

@ -38,7 +38,7 @@ public interface UnitMaintainPlatformDao {
UnitMaintainPlatformEntity findLinkData(@Param("customerId") long customerId, @Param("action") String action, @Param("unitId") String unitId);
void deleteById(String id);
boolean deleteById(String id);
Long selectCount(@Param("unitId") String unitId, @Param("action") String action);

Loading…
Cancel
Save