生产计划-撤消问题修复 4.19

zhc4dev
zhc077 2 years ago
parent 9941f3589c
commit e9ad7fa255
  1. 4
      ant-design-vue-jeecg/src/views/productplan/ZyProductPlanList.vue
  2. 19
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/controller/ZyProductPlanController.java

@ -262,7 +262,7 @@ export default {
url: {
list: "/org.jeecg.modules.productplan/zyProductPlan/list",
paiweitu: "/org.jeecg.modules.productplan/zyProductPlan/paiweitu",
updateStatus: "/org.jeecg.modules.productplan/zyProductPlan/edit",
updateStatus: "/org.jeecg.modules.productplan/zyProductPlan/updateStatus",
delete: "/org.jeecg.modules.productplan/zyProductPlan/delete",
deleteBatch: "/org.jeecg.modules.productplan/zyProductPlan/deleteBatch",
exportXlsUrl: "/org.jeecg.modules.productplan/zyProductPlan/exportXls",
@ -315,7 +315,7 @@ export default {
// alert(JSON.stringify(record));
getAction(this.url.paiweitu, record).then((res) => {
if (res.success) {
// console.log("the paiweitu----------" + JSON.stringify(res.result));
console.log("the paiweitu----------" + JSON.stringify(res.result));
// alert(JSON.stringify(res.result));
} else {
this.$message.warning(res.message)

@ -8,7 +8,6 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.exception.JeecgBootException;
@ -16,23 +15,16 @@ import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.modules.productplan.entity.ZyProductPlan;
import org.jeecg.modules.productplan.entity.vo.PaiWeiTuVo;
import org.jeecg.modules.productplan.enums.ProductPlanStatusEnum;
import org.jeecg.modules.productplan.service.IZyProductPlanService;
import org.jeecg.modules.system.entity.SysDepart;
import org.jeecg.modules.system.entity.SysUser;
import org.jeecg.modules.system.service.ISysDepartService;
import org.jeecg.modules.system.service.ISysUserService;
import org.jeecg.modules.team.entity.Station;
import org.jeecg.modules.workorder.entity.WorkOrder;
import org.jeecg.modules.workorder.enums.WorkOrderStatusEnum;
import org.jeecg.modules.workorder.service.IWorkOrderService;
import org.jeecg.modules.workproduct.entity.ZyProduct;
import org.jeecg.modules.workproduct.service.IZyProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
import javax.jws.Oneway;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Arrays;
@ -107,7 +99,7 @@ public class ZyProductPlanController extends JeecgController<ZyProductPlan, IZyP
* @param zyProductPlan
* @return
*/
@AutoLog(value = "生产计划-编辑")
// @AutoLog(value = "生产计划-编辑")
@ApiOperation(value = "生产计划-编辑", notes = "生产计划-编辑")
@PutMapping(value = "/edit")
public Result<?> edit(@RequestBody ZyProductPlan zyProductPlan) {
@ -117,6 +109,15 @@ public class ZyProductPlanController extends JeecgController<ZyProductPlan, IZyP
return Result.OK("编辑成功!");
}
@ApiOperation(value = "生产计划-撤销", notes = "生产计划-撤销")
@PutMapping(value = "/updateStatus")
public Result<?> updateStatus(@RequestBody ZyProductPlan zyProductPlan) {
ZyProductPlan productPlan = this.zyProductPlanService.getById(zyProductPlan.getId());
Optional.ofNullable(productPlan).orElseThrow(() -> new JeecgBootException(zyProductPlan.getId() + ":不存在!"));
zyProductPlanService.updateById(zyProductPlan);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*

Loading…
Cancel
Save