diff --git a/ant-design-vue-jeecg/src/views/productplan/ZyProductPlanList.vue b/ant-design-vue-jeecg/src/views/productplan/ZyProductPlanList.vue index 7bd5c2bb..b992b52c 100644 --- a/ant-design-vue-jeecg/src/views/productplan/ZyProductPlanList.vue +++ b/ant-design-vue-jeecg/src/views/productplan/ZyProductPlanList.vue @@ -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) diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/controller/ZyProductPlanController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/controller/ZyProductPlanController.java index 169a5c0b..c8590c4f 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/controller/ZyProductPlanController.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/controller/ZyProductPlanController.java @@ -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 edit(@RequestBody ZyProductPlan zyProductPlan) { @@ -117,6 +109,15 @@ public class ZyProductPlanController extends JeecgController 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删除 *