订单管理模块(订单导出)

highway
wws 1 year ago
parent 4e176bc6ab
commit d624fa64a0

@ -24,24 +24,22 @@ public class ProOrder extends TreeEntity {
@Excel(name = "计划工厂编码")
private String planFactoryCode;
/** 计划工厂编码 */
@Excel(name = "工厂编码")
/** 工厂编码 */
private String factoryCode;
/** 订单类型 */
@Excel(name = "订单类型")
private String orderType;
/** 订单号 */
@Excel(name = "订单号")
@Excel(name = "订单号",width = 30)
private String orderCode;
/** 物料号 */
@Excel(name = "物料号")
@Excel(name = "物料号",width = 30)
private String prodCode;
/** 物料名称 */
@Excel(name = "物料名称")
@Excel(name = "物料名称",width = 30)
private String prodDesc;
/** 订单数量 */
@ -57,7 +55,6 @@ public class ProOrder extends TreeEntity {
private String unit;
/** 任务清单 */
@Excel(name = "任务清单")
private String workerOrder;
public Long getQuantitySplit() {
@ -70,32 +67,28 @@ public class ProOrder extends TreeEntity {
/** 计划生产日期 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "计划生产日期", width = 30, dateFormat = "yyyy-MM-dd")
@Excel(name = "计划生产日期", width = 20, dateFormat = "yyyy-MM-dd")
private Date planProDate;
/** 计划完成日期 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "计划完成日期", width = 30, dateFormat = "yyyy-MM-dd")
@Excel(name = "计划完成日期", width = 20, dateFormat = "yyyy-MM-dd")
private Date planComplete;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String atrr1;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String atrr2;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String atrr3;
/** 0未拆分 */
@Excel(name = "0未拆分")
@Excel(name = "订单状态", readConverterExp = "o0=拆分,o1=已拆分")
private String status;
/** 上级工单 */
@Excel(name = "上级工单")
private String parentOrder;
public String getPlanFactoryCode() {
@ -107,10 +100,10 @@ public class ProOrder extends TreeEntity {
}
/** 产品类型 */
@Excel(name = "产品类型")
@Excel(name = "产品类型", readConverterExp = "white=白坯,prod=成品")
private String prodType;
/** 物料型号 */
@Excel(name = "物料名称")
private String prodSpc;
// 计划生产日期开始
@ -119,6 +112,36 @@ public class ProOrder extends TreeEntity {
// 计划生产日期结束
private String planDateEnd;
/** 创建日期 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "创建日期", width = 20, dateFormat = "yyyy-MM-dd")
private Date createTime;
/** 更新日期 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "更新日期", width = 20, dateFormat = "yyyy-MM-dd")
private Date updateTime;
@Override
public Date getCreateTime() {
return createTime;
}
@Override
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
@Override
public Date getUpdateTime() {
return updateTime;
}
@Override
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public String getPlanDateStart() {
return planDateStart;
}

@ -24,6 +24,10 @@ import org.springframework.stereotype.Service;
import com.op.plan.mapper.ProOrderMapper;
import com.op.plan.service.IProOrderService;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest;
import static com.op.common.core.web.domain.AjaxResult.error;
import static com.op.common.core.web.domain.AjaxResult.success;
@ -290,8 +294,12 @@ public class ProOrderServiceImpl implements IProOrderService {
@Override
@DS("#header.poolName")
public int insertProOrder(ProOrder proOrder) {
//获取当前所选工厂
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
String key = "#header.poolName";
// 获取当前时间
Date date = DateUtils.getNowDate();
proOrder.setPlanFactoryCode(request.getHeader(key.substring(8)));
proOrder.setId(IdUtils.fastSimpleUUID());
proOrder.setParentOrder("0");
proOrder.setStatus("o0");

Loading…
Cancel
Save