Merge branch 'master' of http://47.115.223.229:8888/yangjun/sadjv3_java
This commit is contained in:
commit
ec2488a0f2
|
@ -7124,7 +7124,7 @@ public class OrdersServiceImpl extends ServiceImpl<OrdersDao, Orders> implements
|
||||||
userService.sendWxMessage(apkey, data, user.getWxOpenId());
|
userService.sendWxMessage(apkey, data, user.getWxOpenId());
|
||||||
}
|
}
|
||||||
//执行对应项目减去技师物料包
|
//执行对应项目减去技师物料包
|
||||||
materialArtificerService.accomplishOrders(orders.getMassageTypeId(),orders.getArtificerId());
|
materialArtificerService.accomplishOrders(orders.getMassageTypeId(),orders.getArtificerId(),orders.getOrdersNo());
|
||||||
|
|
||||||
if(orders.getOldOrdersId()!=null && orders.getOldOrdersId() !=0){
|
if(orders.getOldOrdersId()!=null && orders.getOldOrdersId() !=0){
|
||||||
Orders oldOrders = baseMapper.selectById(orders.getOldOrdersId());
|
Orders oldOrders = baseMapper.selectById(orders.getOldOrdersId());
|
||||||
|
|
|
@ -1,7 +1,11 @@
|
||||||
package com.sqx.modules.material.controller.app;
|
package com.sqx.modules.material.controller.app;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.sqx.common.utils.PageUtils;
|
||||||
import com.sqx.common.utils.Result;
|
import com.sqx.common.utils.Result;
|
||||||
|
import com.sqx.modules.helpCenter.entity.HelpClassify;
|
||||||
import com.sqx.modules.material.entity.MaterialArtificer;
|
import com.sqx.modules.material.entity.MaterialArtificer;
|
||||||
|
import com.sqx.modules.material.entity.MaterialRecord;
|
||||||
import com.sqx.modules.material.service.MaterialArtificerService;
|
import com.sqx.modules.material.service.MaterialArtificerService;
|
||||||
import com.sqx.modules.material.service.MaterialMassageService;
|
import com.sqx.modules.material.service.MaterialMassageService;
|
||||||
import com.sqx.modules.material.service.MaterialService;
|
import com.sqx.modules.material.service.MaterialService;
|
||||||
|
@ -27,4 +31,10 @@ public class AppMaterialController {
|
||||||
public Result selectMaterialArtificer(Integer page, Integer limit, MaterialArtificer materialArtificer) {
|
public Result selectMaterialArtificer(Integer page, Integer limit, MaterialArtificer materialArtificer) {
|
||||||
return materialService.selectMaterialArtificer(page,limit, materialArtificer);
|
return materialService.selectMaterialArtificer(page,limit, materialArtificer);
|
||||||
}
|
}
|
||||||
|
@GetMapping("/selectMaterialRecord")
|
||||||
|
@ApiOperation("app查询技师物料记录")
|
||||||
|
public Result selectMaterialRecord(Integer page, Integer limit, MaterialRecord materialRecord) {
|
||||||
|
IPage<MaterialRecord> page1 = materialService.selectMaterialRecord(page,limit, materialRecord);
|
||||||
|
return Result.success().put("data",new PageUtils(page1));
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -5,6 +5,7 @@ import java.util.List;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.sqx.common.utils.Result;
|
||||||
import com.sqx.modules.material.entity.*;
|
import com.sqx.modules.material.entity.*;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
@ -74,4 +75,6 @@ public interface MaterialMapper extends BaseMapper<Material> {
|
||||||
IPage<MaterialMassageResult> selectMaterialMassage(IPage<MaterialMassageResult> page1, @Param("materialMassage") MaterialMassage materialMassage);
|
IPage<MaterialMassageResult> selectMaterialMassage(IPage<MaterialMassageResult> page1, @Param("materialMassage") MaterialMassage materialMassage);
|
||||||
|
|
||||||
IPage<Material> selectPages(IPage<Material> page1, @Param("material")Material material);
|
IPage<Material> selectPages(IPage<Material> page1, @Param("material")Material material);
|
||||||
|
|
||||||
|
IPage<MaterialRecord> selectMaterialRecord(IPage<MaterialRecord> page1, @Param("materialRecord") MaterialRecord materialRecord);
|
||||||
}
|
}
|
|
@ -37,6 +37,8 @@ public class MaterialRecord implements Serializable {
|
||||||
private String endDate;
|
private String endDate;
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String materialName;
|
private String materialName;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String materiaImg;
|
||||||
/**
|
/**
|
||||||
* 技师id
|
* 技师id
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -17,7 +17,7 @@ public interface MaterialArtificerService extends IService<MaterialArtificer> {
|
||||||
|
|
||||||
Result materialArtificerUpdata(MaterialArtificer materialArtificer);
|
Result materialArtificerUpdata(MaterialArtificer materialArtificer);
|
||||||
|
|
||||||
String accomplishOrders(Long MessageTypeId, Long artificerId);
|
String accomplishOrders(Long MessageTypeId, Long artificerId,String orderNo);
|
||||||
|
|
||||||
void changePay(Long id, Long userId, Integer number);
|
void changePay(Long id, Long userId, Integer number);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
package com.sqx.modules.material.service;
|
package com.sqx.modules.material.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.sqx.common.utils.Result;
|
import com.sqx.common.utils.Result;
|
||||||
import com.sqx.modules.artificer.entity.Agency;
|
import com.sqx.modules.artificer.entity.Agency;
|
||||||
import com.sqx.modules.material.entity.Material;
|
import com.sqx.modules.material.entity.Material;
|
||||||
import com.sqx.modules.material.entity.MaterialArtificer;
|
import com.sqx.modules.material.entity.MaterialArtificer;
|
||||||
import com.sqx.modules.material.entity.MaterialMassage;
|
import com.sqx.modules.material.entity.MaterialMassage;
|
||||||
|
import com.sqx.modules.material.entity.MaterialRecord;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
@ -75,4 +77,6 @@ public interface MaterialService extends IService<Material> {
|
||||||
Result selectMaterialMassage(Integer page, Integer limit, MaterialMassage materialMassage);
|
Result selectMaterialMassage(Integer page, Integer limit, MaterialMassage materialMassage);
|
||||||
|
|
||||||
Result materialList(Material material);
|
Result materialList(Material material);
|
||||||
|
|
||||||
|
IPage<MaterialRecord> selectMaterialRecord(Integer page, Integer limit, MaterialRecord materialRecord);
|
||||||
}
|
}
|
|
@ -94,14 +94,14 @@ public class MaterialArtificerServiceImpl extends ServiceImpl<MaterialArtificerM
|
||||||
materialRecord.setCreateUser(materialArtificer.getUpdateUser());
|
materialRecord.setCreateUser(materialArtificer.getUpdateUser());
|
||||||
materialRecord.setArtificerId(materialArtificerData.getArtificerId());
|
materialRecord.setArtificerId(materialArtificerData.getArtificerId());
|
||||||
materialRecord.setUpdateUser(materialArtificer.getUpdateUser());
|
materialRecord.setUpdateUser(materialArtificer.getUpdateUser());
|
||||||
materialRecord.setRecordDescribe(DateUtil.date()+"管理员:"+materialArtificer.getUpdateUser()+(materialArtificer.getType().equals(1)?"新增剩余数量:":"减少剩余数量:")+materialArtificer.getBalance()+"总和:"+materialArtificer.getResidue());
|
materialRecord.setRecordDescribe(DateUtil.date()+"管理员:"+materialArtificer.getUpdateUser()+(materialArtificer.getType().equals(1)?"新增数量:":"减少数量:")+materialArtificer.getBalance());
|
||||||
materialRecordService.addMaterialRecord(materialRecord);
|
materialRecordService.addMaterialRecord(materialRecord);
|
||||||
}
|
}
|
||||||
return Result.success(result == 1 ?"修改成功":"修改失败");
|
return Result.success(result == 1 ?"修改成功":"修改失败");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String accomplishOrders(Long messageTypeId, Long artificerId) {
|
public String accomplishOrders(Long messageTypeId, Long artificerId,String orderNo) {
|
||||||
QueryWrapper<MaterialMassage> materialMassageQueryWrapper = new QueryWrapper();
|
QueryWrapper<MaterialMassage> materialMassageQueryWrapper = new QueryWrapper();
|
||||||
QueryWrapper<MaterialArtificer> materialArtificerQueryWrapper = new QueryWrapper();
|
QueryWrapper<MaterialArtificer> materialArtificerQueryWrapper = new QueryWrapper();
|
||||||
QueryWrapper<MassageType> massageTypeQueryWrapper = new QueryWrapper();
|
QueryWrapper<MassageType> massageTypeQueryWrapper = new QueryWrapper();
|
||||||
|
@ -134,7 +134,7 @@ public class MaterialArtificerServiceImpl extends ServiceImpl<MaterialArtificerM
|
||||||
materialRecord.setCreateUser(Long.valueOf(materialArtificers.get(i).getArtificerId()));
|
materialRecord.setCreateUser(Long.valueOf(materialArtificers.get(i).getArtificerId()));
|
||||||
materialRecord.setArtificerId(materialArtificers.get(i).getArtificerId());
|
materialRecord.setArtificerId(materialArtificers.get(i).getArtificerId());
|
||||||
materialRecord.setUpdateUser(Long.valueOf(materialArtificers.get(i).getArtificerId()));
|
materialRecord.setUpdateUser(Long.valueOf(materialArtificers.get(i).getArtificerId()));
|
||||||
materialRecord.setRecordDescribe(DateUtil.date()+(materialRecord.getType().equals(1)?"新增剩余数量:":"减少剩余数量:")+materialMassageList.get(i).getConsume()+"总和:"+materialRecord.getTotal());
|
materialRecord.setRecordDescribe(DateUtil.date()+" 订单编号:"+orderNo +"; "+(materialRecord.getType().equals(1)?"新增数量:":"减少数量:")+materialMassageList.get(i).getConsume());
|
||||||
materialRecordService.addMaterialRecord(materialRecord);
|
materialRecordService.addMaterialRecord(materialRecord);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -168,7 +168,7 @@ public class MaterialArtificerServiceImpl extends ServiceImpl<MaterialArtificerM
|
||||||
materialRecord.setCreateUser(Long.valueOf(materialArtificer.getArtificerId()));
|
materialRecord.setCreateUser(Long.valueOf(materialArtificer.getArtificerId()));
|
||||||
materialRecord.setArtificerId(materialArtificer.getArtificerId());
|
materialRecord.setArtificerId(materialArtificer.getArtificerId());
|
||||||
materialRecord.setUpdateUser(Long.valueOf(materialArtificer.getArtificerId()));
|
materialRecord.setUpdateUser(Long.valueOf(materialArtificer.getArtificerId()));
|
||||||
materialRecord.setRecordDescribe(DateUtil.date()+"通过商城购买"+(materialRecord.getType().equals(1)?"新增剩余数量:":"减少剩余数量:")+materialArtificer.getResidue()+"总和:"+materialRecord.getTotal());
|
materialRecord.setRecordDescribe(DateUtil.date()+"通过商城购买"+(materialRecord.getType().equals(1)?"新增数量:":"减少数量:")+materialArtificer.getResidue());
|
||||||
materialRecordService.addMaterialRecord(materialRecord);
|
materialRecordService.addMaterialRecord(materialRecord);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -222,5 +222,11 @@ public class MaterialServiceImpl extends ServiceImpl<MaterialMapper, Material> i
|
||||||
return Result.success().put("data", materialIPage);
|
return Result.success().put("data", materialIPage);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IPage<MaterialRecord> selectMaterialRecord(Integer page, Integer limit, MaterialRecord materialRecord) {
|
||||||
|
IPage<MaterialRecord> page1 = new Page(page, limit);
|
||||||
|
return materialMapper.selectMaterialRecord(page1,materialRecord);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -168,4 +168,23 @@ INSERT INTO material
|
||||||
and m.status = #{material.status}
|
and m.status = #{material.status}
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="selectMaterialRecord" resultType="com.sqx.modules.material.entity.MaterialRecord">
|
||||||
|
select b.material_name,a.type,a.total,a.number,a.record_describe,a.create_time,c.img as materiaImg from material_record a ,material b ,self_goods c
|
||||||
|
<where>
|
||||||
|
a.material_id = b.id and b.goods_id = c.id
|
||||||
|
<if test="materialRecord.artificerId!=null and materialRecord.artificerId !=''">
|
||||||
|
and a.artificer_Id = #{materialRecord.artificerId}
|
||||||
|
</if>
|
||||||
|
<if test="materialRecord.materialName!=null and materialRecord.materialName !='' ">
|
||||||
|
and b.material_name like concat('%',#{materialRecord.materialName},'%')
|
||||||
|
</if>
|
||||||
|
<if test="materialRecord.createTime!=null and materialRecord.createTime !='' ">
|
||||||
|
and a.create_time like concat('%',#{materialRecord.createTime},'%')
|
||||||
|
</if>
|
||||||
|
|
||||||
|
</where>
|
||||||
|
ORDER BY a.create_time desc
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
Loading…
Reference in New Issue