diff --git a/ant-design-vue-jeecg/src/views/hanger/HangerList.vue b/ant-design-vue-jeecg/src/views/hanger/HangerList.vue
index 06eec61c..c1d0963d 100644
--- a/ant-design-vue-jeecg/src/views/hanger/HangerList.vue
+++ b/ant-design-vue-jeecg/src/views/hanger/HangerList.vue
@@ -9,16 +9,16 @@
-
-
-
-
+
+
+ 查询
+ 重置
-
-
-
-
-
+
+
+
+
+
diff --git a/ant-design-vue-jeecg/src/views/jeecg/SelectDemo.vue b/ant-design-vue-jeecg/src/views/jeecg/SelectDemo.vue
index 955c11ce..97988022 100644
--- a/ant-design-vue-jeecg/src/views/jeecg/SelectDemo.vue
+++ b/ant-design-vue-jeecg/src/views/jeecg/SelectDemo.vue
@@ -110,7 +110,9 @@
-
+
+
选中的用户(v-model):{{ formData.userIds }}
diff --git a/ant-design-vue-jeecg/src/views/productplan/ZyProductPlanList.vue b/ant-design-vue-jeecg/src/views/productplan/ZyProductPlanList.vue
index 98d770aa..38b9e64d 100644
--- a/ant-design-vue-jeecg/src/views/productplan/ZyProductPlanList.vue
+++ b/ant-design-vue-jeecg/src/views/productplan/ZyProductPlanList.vue
@@ -1,9 +1,80 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 查询
+ 重置
+
+
@@ -13,23 +84,6 @@
新增
导出
-
-
-
-
-
-
-
-
-
- 删除
-
-
- 批量操作
-
-
-
@@ -54,27 +108,6 @@
class="j-table-force-nowrap"
@change="handleTableChange">
-
-
-
-
- 无图片
-
-
-
- 无文件
-
- 下载
-
-
-
编辑
@@ -127,11 +160,20 @@ export default {
align: "center",
dataIndex: 'productCode'
},
- // {
- // title: '车间编号',
- // align: "center",
- // dataIndex: 'workshopId'
- // },
+ {
+ title: '产品编号',
+ align: "center",
+ dataIndex: 'productNo'
+ }, {
+ title: '产品名称',
+ align: "center",
+ dataIndex: 'productName'
+ },
+ {
+ title: '生产企业',
+ align: "center",
+ dataIndex: 'productOrg'
+ },
{
title: '车间名称',
align: "center",
@@ -239,7 +281,7 @@ export default {
getAction(this.url.paiweitu, record).then((res) => {
if (res.success) {
// this.dataSource = res.result.records || res.result;
- console.log("the paiweitu----------"+JSON.stringify(res.result))
+ console.log("the paiweitu----------" + JSON.stringify(res.result))
} else {
this.$message.warning(res.message)
}
diff --git a/ant-design-vue-jeecg/src/views/productplan/modules/ZyProductPlanForm.vue b/ant-design-vue-jeecg/src/views/productplan/modules/ZyProductPlanForm.vue
index 78e17b87..f4b0f230 100644
--- a/ant-design-vue-jeecg/src/views/productplan/modules/ZyProductPlanForm.vue
+++ b/ant-design-vue-jeecg/src/views/productplan/modules/ZyProductPlanForm.vue
@@ -29,8 +29,11 @@
prop="responsiblePerson">
-
+
+
+
+
@@ -58,7 +61,7 @@
-
+
@@ -112,7 +115,13 @@ export default {
return {
groupxVal: "groupx,group_name,id",
groupxVal2: "sys_user,realname,id",
- model: {},
+ model: {
+ workTime: new Date(),
+ status:0,
+ auditBy:66,
+ auditTimr: new Date(),
+ speedUp:0,
+ },
labelCol: {
xs: {span: 24},
sm: {span: 5},
@@ -127,7 +136,7 @@ export default {
{required: true, message: "工单不能为空"},
],
workshopId: [
- {required: true, message: "工单不能为空"},
+ {required: true, message: "车间不能为空"},
],
teamId: [
{required: true, message: "班组不能为空"},
@@ -141,6 +150,7 @@ export default {
],
},
url: {
+ groupxList: "/groupx/list",
add: "/org.jeecg.modules.productplan/zyProductPlan/add",
edit: "/org.jeecg.modules.productplan/zyProductPlan/edit",
queryById: "/org.jeecg.modules.productplan/zyProductPlan/queryById"
@@ -155,10 +165,28 @@ export default {
created() {
//备份model原始值
this.modelDefault = JSON.parse(JSON.stringify(this.model));
+ // console.log(this.getNowDate())
+ // this.getNowDate(); //调用函数
},
methods: {
+ departSelected() {
+ let that = this;
+ let param = {
+ "id": that.model.workshopId,
+ }
+ // alert(param.toString());
+ getAction(that.url.groupxList, param).then((res) => {
+ if (res.success) {
+ // console.log("----------" + JSON.stringify(res.result.records))
+ let phone = JSON.stringify(res.result.records[0].enterprisesNanager);
+ that.model = Object.assign(that.model, {'mobile': phone});
+ this.$forceUpdate();
+ }
+ });
+ },
getGroupxValChange() {
this.groupxVal = "groupx,group_name,id,depart_id='" + this.model.workshopId + "'";
+ this.departSelected();
},
getEnterprisesManagerValChange() {
this.groupxVal2 = "sys_user,realname,id,id=(select enterprises_manager from groupx where id='" + this.model.teamId + "')";
@@ -199,6 +227,37 @@ export default {
})
},
- }
+
+ getNowDate() {
+ var date = new Date();
+ var sign2 = ":";
+ var year = date.getFullYear() // 年
+ var month = date.getMonth() + 1; // 月
+ var day = date.getDate(); // 日
+ var hour = date.getHours(); // 时
+ var minutes = date.getMinutes(); // 分
+ var seconds = date.getSeconds() //秒
+ var weekArr = ['星期一', '星期二', '星期三', '星期四', '星期五', '星期六', '星期天'];
+ var week = weekArr[date.getDay()];
+ // 给一位数的数据前面加 “0”
+ if (month >= 1 && month <= 9) {
+ month = "0" + month;
+ }
+ if (day >= 0 && day <= 9) {
+ day = "0" + day;
+ }
+ if (hour >= 0 && hour <= 9) {
+ hour = "0" + hour;
+ }
+ if (minutes >= 0 && minutes <= 9) {
+ minutes = "0" + minutes;
+ }
+ if (seconds >= 0 && seconds <= 9) {
+ seconds = "0" + seconds;
+ }
+ this.model.workTime = year + "-" + month + "-" + day + " " + hour + sign2 + minutes + sign2 + seconds;
+ },
+ },
+
}
\ No newline at end of file
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 14a14b18..4723bc78 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
@@ -1,12 +1,14 @@
package org.jeecg.modules.productplan.controller;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
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.system.base.controller.JeecgController;
@@ -14,10 +16,15 @@ 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.service.IZyProductPlanService;
+import org.jeecg.modules.system.entity.SysDepart;
+import org.jeecg.modules.system.service.ISysDepartService;
+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;
@@ -36,6 +43,11 @@ public class ZyProductPlanController extends JeecgController add(@RequestBody ZyProductPlan zyProductPlan) {
+ String productCode = zyProductPlan.getProductCode();
+ ZyProduct zyProduct = iZyProductService.getOne(new LambdaQueryWrapper().eq(ZyProduct::getWorkOrderId, productCode));
+ zyProductPlan.setProductNo(StringUtils.isNotBlank(zyProduct.getProductCode()) ? zyProduct.getProductCode() : "");
+ zyProductPlan.setProductName(StringUtils.isNotBlank(zyProduct.getProductName()) ? zyProduct.getProductName() : "");
+ if (StringUtils.isNotBlank(zyProduct.getEnterprisesId())) {
+ SysDepart sysDepart = iSysDepartService.getById(zyProduct.getEnterprisesId());
+ zyProductPlan.setProductOrg(StringUtils.isNotBlank(sysDepart.getDepartName()) ? sysDepart.getDepartName() : "");
+ }
zyProductPlanService.save(zyProductPlan);
//TODO 更新work_order表work_order_status为“1” (不能为其新增生产计划)
return Result.OK("添加成功!");
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/entity/ZyProductPlan.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/entity/ZyProductPlan.java
index 2e6b8de5..46fa78b4 100644
--- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/entity/ZyProductPlan.java
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/entity/ZyProductPlan.java
@@ -64,6 +64,15 @@ public class ZyProductPlan implements Serializable {
@Excel(name = "工单编号", width = 15)
@ApiModelProperty(value = "工单编号")
private String productCode;
+
+ //产品编码
+ private String productNo;
+
+ //产品名称
+ private String productName;
+
+ //生产企业
+ private String productOrg;
/**
* 车间id
*/
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/service/impl/StationServiceImpl.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/service/impl/StationServiceImpl.java
index 5d03e585..555cd425 100644
--- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/service/impl/StationServiceImpl.java
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/service/impl/StationServiceImpl.java
@@ -53,21 +53,11 @@ public class StationServiceImpl extends ServiceImpl impl
if (maxStationNum.intValue() != entity.getStationNum()) {
//先把下一编号减1
Station station1 = this.getOne(new LambdaQueryWrapper().eq(Station::getStationNum, entity.getStationNum() + 1));
-// station1.setStationNum(null);
this.lambdaUpdate().set(Station::getStationNum, null).eq(Station::getId, station1.getId()).update();
-
-// Station station = new Station();
-// station.setId(id);
-// station.setStationNum(null);
this.lambdaUpdate().set(Station::getStationNum, null).eq(Station::getId, id).update();
-// station.setStationNum(entity.getStationNum() + 1);
-// this.updateById(station);
this.lambdaUpdate().set(Station::getStationNum, entity.getStationNum() + 1).eq(Station::getId, id).update();
- this.lambdaUpdate().set(Station::getStationNum, entity.getStationNum() - 1).eq(Station::getId, station1.getId()).update();
-
-// station1.setStationNum(entity.getStationNum() - 1);
-// this.updateById(station1);
+ this.lambdaUpdate().set(Station::getStationNum, entity.getStationNum()).eq(Station::getId, station1.getId()).update();
}
}
@@ -81,19 +71,11 @@ public class StationServiceImpl extends ServiceImpl impl
if (entity.getStationNum() > 1) {
//先把上一编号加1
Station station1 = this.getOne(new LambdaQueryWrapper().eq(Station::getStationNum, entity.getStationNum() - 1));
- station1.setStationNum(null);
- this.updateById(station1);
-
- Station station = new Station();
- station.setId(id);
- station.setStationNum(null);
- this.updateById(station);
-
+ this.lambdaUpdate().set(Station::getStationNum, null).eq(Station::getId, station1.getId()).update();
+ this.lambdaUpdate().set(Station::getStationNum, null).eq(Station::getId, id).update();
- station.setStationNum(entity.getStationNum() - 1);
- this.updateById(station);
- station1.setStationNum(entity.getStationNum() + 1);
- this.updateById(station1);
+ this.lambdaUpdate().set(Station::getStationNum, entity.getStationNum() - 1).eq(Station::getId, id).update();
+ this.lambdaUpdate().set(Station::getStationNum, entity.getStationNum()).eq(Station::getId, station1.getId()).update();
}
}
}
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/workproduct/entity/ZyProduct.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/workproduct/entity/ZyProduct.java
index 72b95bd3..20d408fa 100644
--- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/workproduct/entity/ZyProduct.java
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/workproduct/entity/ZyProduct.java
@@ -58,6 +58,10 @@ public class ZyProduct implements Serializable {
@Excel(name = "产品编号", width = 15)
@ApiModelProperty(value = "产品编号")
private String productCode;
+
+ @Excel(name = "产品编号", width = 50)
+ @ApiModelProperty(value = "产品名称")
+ private String productName;
/**工单*/
@Excel(name = "工单", width = 15)
@ApiModelProperty(value = "工单")