订单init1

highway
zhaoxiaolin 1 year ago
parent 1124174468
commit fa768ee255

@ -35,7 +35,7 @@ public class ProOrderController extends BaseController {
/**
*
*/
@RequiresPermissions("order:order:list")
@RequiresPermissions("mes:pro:order:list")
@GetMapping("/list")
public AjaxResult list(ProOrder proOrder) {
List<ProOrder> list = proOrderService.selectProOrderList(proOrder);
@ -45,7 +45,7 @@ public class ProOrderController extends BaseController {
/**
*
*/
@RequiresPermissions("order:order:export")
@RequiresPermissions("mes:pro:order:export")
@Log(title = "订单", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, ProOrder proOrder) {
@ -57,7 +57,7 @@ public class ProOrderController extends BaseController {
/**
*
*/
@RequiresPermissions("order:order:query")
@RequiresPermissions("mes:pro:order:query")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") String id) {
return success(proOrderService.selectProOrderById(id));
@ -66,7 +66,7 @@ public class ProOrderController extends BaseController {
/**
*
*/
@RequiresPermissions("order:order:add")
@RequiresPermissions("mes:pro:order:add")
@Log(title = "订单", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody ProOrder proOrder) {
@ -76,7 +76,7 @@ public class ProOrderController extends BaseController {
/**
*
*/
@RequiresPermissions("order:order:edit")
@RequiresPermissions("mes:pro:order:edit")
@Log(title = "订单", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody ProOrder proOrder) {
@ -86,7 +86,7 @@ public class ProOrderController extends BaseController {
/**
*
*/
@RequiresPermissions("order:order:remove")
@RequiresPermissions("mes:pro:order:remove")
@Log(title = "订单", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable String[] ids) {

@ -43,6 +43,10 @@ public class ProOrder extends TreeEntity {
@Excel(name = "订单数量")
private Long quantity;
/** 已拆分订单数量 */
@Excel(name = "已拆分订单数量")
private Long quantitySplit;
/** 单位 */
@Excel(name = "单位")
private String unit;
@ -51,6 +55,14 @@ public class ProOrder extends TreeEntity {
@Excel(name = "任务清单")
private String workerOrder;
public Long getQuantitySplit() {
return quantitySplit;
}
public void setQuantitySplit(Long quantitySplit) {
this.quantitySplit = quantitySplit;
}
/** 计划生产日期 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "计划生产日期", width = 30, dateFormat = "yyyy-MM-dd")

@ -2,6 +2,7 @@ package com.op.mes.service.impl;
import java.util.List;
import com.op.common.core.utils.DateUtils;
import com.op.common.core.utils.uuid.IdUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.op.mes.mapper.ProOrderMapper;
@ -49,6 +50,7 @@ public class ProOrderServiceImpl implements IProOrderService {
*/
@Override
public int insertProOrder(ProOrder proOrder) {
proOrder.setId(IdUtils.fastSimpleUUID());
proOrder.setCreateTime(DateUtils.getNowDate());
return proOrderMapper.insertProOrder(proOrder);
}

@ -12,6 +12,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="prodCode" column="prod_code" />
<result property="prodDesc" column="prod_desc" />
<result property="quantity" column="quantity" />
<result property="quantitySplit" column="quantity_split" />
<result property="unit" column="unit" />
<result property="workerOrder" column="worker_order" />
<result property="planProDate" column="plan_pro_date" />
@ -29,7 +30,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectProOrderVo">
select id, factory_code, order_type, order_code, prod_code, prod_desc, quantity, unit, worker_order, plan_pro_date, plan_complete, atrr1, atrr2, atrr3, status, parent_order, create_by, create_time, update_by, update_time, prod_type from pro_order
select id, factory_code, order_type, order_code, prod_code, prod_desc, quantity, quantity_split
unit, worker_order, plan_pro_date, plan_complete, atrr1, atrr2, atrr3,
status, parent_order, create_by, create_time, update_by, update_time, prod_type
from pro_order
</sql>
<select id="selectProOrderList" parameterType="ProOrder" resultMap="ProOrderResult">
@ -69,6 +73,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="prodCode != null">prod_code,</if>
<if test="prodDesc != null">prod_desc,</if>
<if test="quantity != null">quantity,</if>
<if test="quantitySplit != null">quantity_split,</if>
<if test="unit != null">unit,</if>
<if test="workerOrder != null">worker_order,</if>
<if test="planProDate != null">plan_pro_date,</if>
@ -92,6 +97,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="prodCode != null">#{prodCode},</if>
<if test="prodDesc != null">#{prodDesc},</if>
<if test="quantity != null">#{quantity},</if>
<if test="quantitySplit != null">#{quantitySplit},</if>
<if test="unit != null">#{unit},</if>
<if test="workerOrder != null">#{workerOrder},</if>
<if test="planProDate != null">#{planProDate},</if>
@ -118,6 +124,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="prodCode != null">prod_code = #{prodCode},</if>
<if test="prodDesc != null">prod_desc = #{prodDesc},</if>
<if test="quantity != null">quantity = #{quantity},</if>
<if test="quantitySplit != null">quantity_split = #{quantitySplit},</if>
<if test="unit != null">unit = #{unit},</if>
<if test="workerOrder != null">worker_order = #{workerOrder},</if>
<if test="planProDate != null">plan_pro_date = #{planProDate},</if>

Loading…
Cancel
Save