录入价格功能放到订单变更里面
This commit is contained in:
parent
708dcd1acd
commit
28f87258a2
@ -84,8 +84,11 @@ public class OrderYsServiceImpl implements OrderYsService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void createOrUpdate(ProjectOrderSaveReqVO operateReqVO) {
|
public void createOrUpdate(ProjectOrderSaveReqVO operateReqVO) {
|
||||||
|
LambdaQueryWrapper<OrderYsDO> eq = new LambdaQueryWrapper<OrderYsDO>().eq(OrderYsDO::getCode, operateReqVO.getCode());
|
||||||
|
OrderYsDO orderYsDO = orderYsMapper.selectOne(eq);
|
||||||
|
if (ObjectUtil.isEmpty(orderYsDO)){
|
||||||
if (operateReqVO.getHasPrice().equals(1)) {
|
if (operateReqVO.getHasPrice().equals(1)) {
|
||||||
OrderYsDO orderYsDO = new OrderYsDO();
|
orderYsDO = new OrderYsDO();
|
||||||
orderYsDO.setCode(operateReqVO.getCode());
|
orderYsDO.setCode(operateReqVO.getCode());
|
||||||
orderYsDO.setProjectName(operateReqVO.getProjectName());
|
orderYsDO.setProjectName(operateReqVO.getProjectName());
|
||||||
orderYsDO.setCgTime(LocalDateTime.now());
|
orderYsDO.setCgTime(LocalDateTime.now());
|
||||||
@ -109,8 +112,25 @@ public class OrderYsServiceImpl implements OrderYsService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
orderYsMapper.insert(orderYsDO);
|
orderYsMapper.insert(orderYsDO);
|
||||||
|
}else {
|
||||||
|
orderYsDO.setCgYs(operateReqVO.getPrice());
|
||||||
|
LocalDateTime[] paymentTimes = {
|
||||||
|
operateReqVO.getSixFuKuanTime(),
|
||||||
|
operateReqVO.getFiveFuKuanTime(),
|
||||||
|
operateReqVO.getFourFuKuanTime(),
|
||||||
|
operateReqVO.getThreeFuKuanTime(),
|
||||||
|
operateReqVO.getTwoFuKuanTime(),
|
||||||
|
operateReqVO.getShouFuKuanTime()
|
||||||
|
};
|
||||||
|
for (LocalDateTime paymentTime : paymentTimes) {
|
||||||
|
if (!ObjectUtil.isEmpty(paymentTime)) {
|
||||||
|
orderYsDO.setPaymentDate(paymentTime);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
orderYsMapper.updateById(orderYsDO);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -195,10 +195,15 @@ public class ProjectOrderServiceImpl implements ProjectOrderService {
|
|||||||
LambdaQueryWrapper<OrderYsDO> eq = new LambdaQueryWrapper<OrderYsDO>().eq(OrderYsDO::getCode, updateReqVO.getCode());
|
LambdaQueryWrapper<OrderYsDO> eq = new LambdaQueryWrapper<OrderYsDO>().eq(OrderYsDO::getCode, updateReqVO.getCode());
|
||||||
OrderYsDO orderYsDO = orderYsMapper.selectOne(eq);
|
OrderYsDO orderYsDO = orderYsMapper.selectOne(eq);
|
||||||
if (ObjectUtil.isEmpty(orderYsDO)){
|
if (ObjectUtil.isEmpty(orderYsDO)){
|
||||||
|
if (updateReqVO.getHasPrice().equals(1)) {
|
||||||
orderYsDO = new OrderYsDO();
|
orderYsDO = new OrderYsDO();
|
||||||
orderYsDO.setCode(updateReqVO.getCode());
|
orderYsDO.setCode(updateReqVO.getCode());
|
||||||
orderYsDO.setProjectName(updateReqVO.getProjectName());
|
orderYsDO.setProjectName(updateReqVO.getProjectName());
|
||||||
orderYsDO.setCgTime(LocalDateTime.now());
|
orderYsDO.setCgTime(LocalDateTime.now());
|
||||||
|
orderYsDO.setCgKhname(customerService.getCustomer(updateReqVO.getCustomerId()).getName());
|
||||||
|
if(updateReqVO.getPrice()==null){
|
||||||
|
orderYsDO.setCgYs(new BigDecimal(0));
|
||||||
|
}else {
|
||||||
orderYsDO.setCgYs(updateReqVO.getPrice());
|
orderYsDO.setCgYs(updateReqVO.getPrice());
|
||||||
LocalDateTime[] paymentTimes = {
|
LocalDateTime[] paymentTimes = {
|
||||||
updateReqVO.getSixFuKuanTime(),
|
updateReqVO.getSixFuKuanTime(),
|
||||||
@ -214,6 +219,8 @@ public class ProjectOrderServiceImpl implements ProjectOrderService {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
orderYsMapper.insert(orderYsDO);
|
orderYsMapper.insert(orderYsDO);
|
||||||
}else {
|
}else {
|
||||||
orderYsDO.setCgYs(updateReqVO.getPrice());
|
orderYsDO.setCgYs(updateReqVO.getPrice());
|
||||||
@ -470,7 +477,7 @@ public class ProjectOrderServiceImpl implements ProjectOrderService {
|
|||||||
// List<StorageLogNowDO> pageResult = storageLogService.getStorageNowPagesmall(pageReqVO);//查询符合条件的值
|
// List<StorageLogNowDO> pageResult = storageLogService.getStorageNowPagesmall(pageReqVO);//查询符合条件的值
|
||||||
for (AttentiontodoDO attentiontodoRespVO : attentiontodook) {
|
for (AttentiontodoDO attentiontodoRespVO : attentiontodook) {
|
||||||
{
|
{
|
||||||
// for (StorageLogNowDO storageLogNowDO : pageResult) {
|
// for (StorageLogNowDO storgeLogNowDO : pageResult) {
|
||||||
bdgzsomthingDO BdgzsomthingDO = new bdgzsomthingDO();
|
bdgzsomthingDO BdgzsomthingDO = new bdgzsomthingDO();
|
||||||
BdgzsomthingDO.setThingname(attentiontodoRespVO.getEvent());//事件名称
|
BdgzsomthingDO.setThingname(attentiontodoRespVO.getEvent());//事件名称
|
||||||
BdgzsomthingDO.setThings(operateReqVO.getProjectName()+operateReqVO.getContractNo()+"价格没有录入系统");//事件名称
|
BdgzsomthingDO.setThings(operateReqVO.getProjectName()+operateReqVO.getContractNo()+"价格没有录入系统");//事件名称
|
||||||
@ -507,7 +514,7 @@ public class ProjectOrderServiceImpl implements ProjectOrderService {
|
|||||||
|
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
if ("PRICE".equals(operateReqVO.getActive())){
|
if ("ALTER".equals(operateReqVO.getActive())){
|
||||||
updateProjectOrderPrice(operateReqVO);
|
updateProjectOrderPrice(operateReqVO);
|
||||||
}else {
|
}else {
|
||||||
updateProjectOrder(operateReqVO);
|
updateProjectOrder(operateReqVO);
|
||||||
|
@ -197,7 +197,7 @@
|
|||||||
<el-form-item label="首付款预计时间" prop="shouFuKuanTime">
|
<el-form-item label="首付款预计时间" prop="shouFuKuanTime">
|
||||||
<el-date-picker class="!w-250px" v-model="formData.shouFuKuanTime"
|
<el-date-picker class="!w-250px" v-model="formData.shouFuKuanTime"
|
||||||
type="date" value-format="x" placeholder="选择日期"
|
type="date" value-format="x" placeholder="选择日期"
|
||||||
:disabled="alterDisabled || detailDisabled" />
|
:disabled="detailDisabled || formData.hasPrice == 0" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
@ -207,7 +207,7 @@
|
|||||||
<el-form-item label="第三笔款预计时间" prop="threeFuKuanTime">
|
<el-form-item label="第三笔款预计时间" prop="threeFuKuanTime">
|
||||||
<el-date-picker class="!w-250px" v-model="formData.threeFuKuanTime"
|
<el-date-picker class="!w-250px" v-model="formData.threeFuKuanTime"
|
||||||
type="date" value-format="x" placeholder="选择日期"
|
type="date" value-format="x" placeholder="选择日期"
|
||||||
:disabled="alterDisabled || detailDisabled" />
|
:disabled="detailDisabled || formData.hasPrice == 0" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
@ -217,7 +217,7 @@
|
|||||||
<el-form-item label="第五笔款预计时间" prop="fiveFuKuanTime">
|
<el-form-item label="第五笔款预计时间" prop="fiveFuKuanTime">
|
||||||
<el-date-picker class="!w-250px" v-model="formData.fiveFuKuanTime"
|
<el-date-picker class="!w-250px" v-model="formData.fiveFuKuanTime"
|
||||||
type="date" value-format="x" placeholder="选择日期"
|
type="date" value-format="x" placeholder="选择日期"
|
||||||
:disabled="alterDisabled || detailDisabled" />
|
:disabled="detailDisabled || formData.hasPrice == 0" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -397,7 +397,7 @@
|
|||||||
<el-form-item label="第二笔预计时间" prop="twoFuKuanTime">
|
<el-form-item label="第二笔预计时间" prop="twoFuKuanTime">
|
||||||
<el-date-picker class="!w-250px" v-model="formData.twoFuKuanTime" type="date"
|
<el-date-picker class="!w-250px" v-model="formData.twoFuKuanTime" type="date"
|
||||||
value-format="x" placeholder="选择日期"
|
value-format="x" placeholder="选择日期"
|
||||||
:disabled="alterDisabled || detailDisabled" />
|
:disabled="detailDisabled || formData.hasPrice == 0" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
@ -407,7 +407,7 @@
|
|||||||
<el-form-item label="第四笔款预计时间" prop="fourFuKuanTime">
|
<el-form-item label="第四笔款预计时间" prop="fourFuKuanTime">
|
||||||
<el-date-picker class="!w-250px" v-model="formData.fourFuKuanTime" type="date"
|
<el-date-picker class="!w-250px" v-model="formData.fourFuKuanTime" type="date"
|
||||||
value-format="x" placeholder="选择日期"
|
value-format="x" placeholder="选择日期"
|
||||||
:disabled="alterDisabled || detailDisabled" />
|
:disabled="detailDisabled || formData.hasPrice == 0" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
@ -417,7 +417,7 @@
|
|||||||
<el-form-item label="第六笔款预计时间" prop="sixFuKuanTime">
|
<el-form-item label="第六笔款预计时间" prop="sixFuKuanTime">
|
||||||
<el-date-picker class="!w-250px" v-model="formData.sixFuKuanTime" type="date"
|
<el-date-picker class="!w-250px" v-model="formData.sixFuKuanTime" type="date"
|
||||||
value-format="x" placeholder="选择日期"
|
value-format="x" placeholder="选择日期"
|
||||||
:disabled="alterDisabled || detailDisabled" />
|
:disabled="detailDisabled || formData.hasPrice == 0" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
@ -141,9 +141,9 @@ ref="multipleTableRef"
|
|||||||
<el-button link type="danger" @click="handleDelete(scope.row.id)" v-if="(scope.row.orderStatus == 4 && scope.row.hasAlter == 0) ||scope.row.orderStatus == 3 ">
|
<el-button link type="danger" @click="handleDelete(scope.row.id)" v-if="(scope.row.orderStatus == 4 && scope.row.hasAlter == 0) ||scope.row.orderStatus == 3 ">
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button link type="primary" @click="openDetail('price',scope.row.id)" v-if="scope.row.orderStatus!=4&&scope.row.hasPrice==1">
|
<!-- <el-button link type="primary" @click="openDetail('price',scope.row.id)" v-if="scope.row.orderStatus!=4&&scope.row.hasPrice==1">-->
|
||||||
录入价格
|
<!-- 录入价格-->
|
||||||
</el-button>
|
<!-- </el-button>-->
|
||||||
<el-button link type="primary" @click="openDetail('update', scope.row.id)" v-if="scope.row.orderStatus == 4 || scope.row.orderStatus == 3">
|
<el-button link type="primary" @click="openDetail('update', scope.row.id)" v-if="scope.row.orderStatus == 4 || scope.row.orderStatus == 3">
|
||||||
编辑
|
编辑
|
||||||
</el-button>
|
</el-button>
|
||||||
|
Loading…
Reference in New Issue
Block a user