收银台打印小票
This commit is contained in:
parent
9a9ff1dca2
commit
5a5ec7c43c
@ -80,7 +80,11 @@ public class OilSuppliersController extends BaseController {
|
|||||||
sysLog.setContent("新增油站供应商的数据信息");
|
sysLog.setContent("新增油站供应商的数据信息");
|
||||||
sysLogService.saveVo(sysLog);
|
sysLogService.saveVo(sysLog);
|
||||||
}catch (Exception ignored){}
|
}catch (Exception ignored){}
|
||||||
return getSuccessResult(this.oilSuppliersService.insert(oilSuppliers));
|
int mm =this.oilSuppliersService.insert(oilSuppliers);
|
||||||
|
if(mm==1){
|
||||||
|
return getFailureResult("供应商名称不能重复");
|
||||||
|
}
|
||||||
|
return getSuccessResult(mm);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -86,6 +86,14 @@ public interface OilSuppliersMapper {
|
|||||||
*/
|
*/
|
||||||
int deleteById(Integer id);
|
int deleteById(Integer id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过名字查询油站信息
|
||||||
|
*
|
||||||
|
* @param name
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List getSuppliersByName(String name);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -143,6 +143,10 @@
|
|||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
<select id="getSuppliersByName"
|
||||||
|
resultType="com.fuint.business.petrolStationManagement.entity.OilSuppliers">
|
||||||
|
select * from oil_suppliers where supplier_name=#{name}
|
||||||
|
</select>
|
||||||
|
|
||||||
<!--新增所有列-->
|
<!--新增所有列-->
|
||||||
<insert id="insert" keyProperty="id" useGeneratedKeys="true">
|
<insert id="insert" keyProperty="id" useGeneratedKeys="true">
|
||||||
|
@ -40,7 +40,7 @@ public interface OilSuppliersService {
|
|||||||
* @param oilSuppliers 实例对象
|
* @param oilSuppliers 实例对象
|
||||||
* @return 实例对象
|
* @return 实例对象
|
||||||
*/
|
*/
|
||||||
OilSuppliers insert(OilSuppliers oilSuppliers);
|
Integer insert(OilSuppliers oilSuppliers);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改数据
|
* 修改数据
|
||||||
|
@ -56,12 +56,16 @@ public class OilSuppliersServiceImpl implements OilSuppliersService {
|
|||||||
* @return 实例对象
|
* @return 实例对象
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public OilSuppliers insert(OilSuppliers oilSuppliers) {
|
public Integer insert(OilSuppliers oilSuppliers) {
|
||||||
|
List<OilSuppliers> oilSuppliers1 =this.oilSuppliersDao.getSuppliersByName(oilSuppliers.getSupplierName());
|
||||||
|
if(oilSuppliers1.size()>0){
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||||
oilSuppliers.setStoreId(nowAccountInfo.getStoreId());
|
oilSuppliers.setStoreId(nowAccountInfo.getStoreId());
|
||||||
oilSuppliers.setCreateBy(nowAccountInfo.getStaffId().toString());
|
oilSuppliers.setCreateBy(nowAccountInfo.getStaffId().toString());
|
||||||
this.oilSuppliersDao.insert(oilSuppliers);
|
this.oilSuppliersDao.insert(oilSuppliers);
|
||||||
return oilSuppliers;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1057,8 +1057,6 @@ export default {
|
|||||||
// consumeAmount:this.consumeAmount,
|
// consumeAmount:this.consumeAmount,
|
||||||
// // 屯油卡付款
|
// // 屯油卡付款
|
||||||
// consumeRefuelMoney:this.consumeRefuelMoney.toFixed(2),
|
// consumeRefuelMoney:this.consumeRefuelMoney.toFixed(2),
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// 打印商品支付后的订单
|
// 打印商品支付后的订单
|
||||||
@ -1080,13 +1078,10 @@ export default {
|
|||||||
}
|
}
|
||||||
oilOrderR.push(o)
|
oilOrderR.push(o)
|
||||||
})
|
})
|
||||||
console.log("111111111111111111111111111")
|
|
||||||
|
|
||||||
let goodsOrderR = []
|
let goodsOrderR = []
|
||||||
if (this.goodsInfo) {
|
if (this.goodsInfo) {
|
||||||
this.goodsInfo.forEach(order => {
|
this.goodsInfo.forEach(order => {
|
||||||
console.log("111111111111111111111111111")
|
|
||||||
|
|
||||||
let o = {
|
let o = {
|
||||||
oilName: order.name,
|
oilName: order.name,
|
||||||
unit: order.num + "" + order.unit,
|
unit: order.num + "" + order.unit,
|
||||||
@ -1095,8 +1090,6 @@ export default {
|
|||||||
goodsOrderR.push(o)
|
goodsOrderR.push(o)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// 支付方式
|
// 支付方式
|
||||||
const payTypeMap = {
|
const payTypeMap = {
|
||||||
'CASH': '现金',
|
'CASH': '现金',
|
||||||
|
Loading…
Reference in New Issue
Block a user