Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
8a31f093fe
|
|
@ -45,6 +45,7 @@ public class HandoverInfo implements Serializable {
|
||||||
|
|
||||||
private List<ProductInfo> productInfos;
|
private List<ProductInfo> productInfos;
|
||||||
|
|
||||||
|
|
||||||
public HandoverInfo(String merchantName, String startTime, String endTime, String staff, List<PayInfo> payInfos, List<HandoverInfo.MemberData> memberData, String totalAmount, String imprest, String payable, String handIn, String returnAmount, String orderNum
|
public HandoverInfo(String merchantName, String startTime, String endTime, String staff, List<PayInfo> payInfos, List<HandoverInfo.MemberData> memberData, String totalAmount, String imprest, String payable, String handIn, String returnAmount, String orderNum
|
||||||
, List<ProductCategory> productCategories, String quickAmount, List<ProductInfoPO> productInfoPOS, List<ProductInfo> productInfos
|
, List<ProductCategory> productCategories, String quickAmount, List<ProductInfoPO> productInfoPOS, List<ProductInfo> productInfos
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,8 @@ import org.springframework.stereotype.Service;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
|
import static com.chaozhanggui.system.cashierservice.sign.CodeEnum.USERNOLOGIN;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class DataService {
|
public class DataService {
|
||||||
|
|
@ -49,6 +51,9 @@ public class DataService {
|
||||||
@Autowired
|
@Autowired
|
||||||
tbHandoverMapper tbHandoverMapper;
|
tbHandoverMapper tbHandoverMapper;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
TbTokenMapper tbTokenMapper;
|
||||||
|
|
||||||
|
|
||||||
public Result handoverprintData(String token, Integer id){
|
public Result handoverprintData(String token, Integer id){
|
||||||
|
|
||||||
|
|
@ -56,6 +61,15 @@ public class DataService {
|
||||||
JSONObject info= TokenUtil.parseParamFromToken(token);
|
JSONObject info= TokenUtil.parseParamFromToken(token);
|
||||||
MsgException.checkNull(info,"获取信息失败");
|
MsgException.checkNull(info,"获取信息失败");
|
||||||
|
|
||||||
|
|
||||||
|
TbToken tbToken = tbTokenMapper.selectByToken(token);
|
||||||
|
|
||||||
|
if (ObjectUtil.isEmpty(tbToken)) {
|
||||||
|
return Result.fail(USERNOLOGIN);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
TbmerchantAccount tbmerchantAccount= tbmerchantAccountMapper.selectByPrimaryKey(Integer.valueOf(info.get("accountId").toString()));
|
TbmerchantAccount tbmerchantAccount= tbmerchantAccountMapper.selectByPrimaryKey(Integer.valueOf(info.get("accountId").toString()));
|
||||||
MsgException.checkNull(tbmerchantAccount,"商户信息不存在");
|
MsgException.checkNull(tbmerchantAccount,"商户信息不存在");
|
||||||
|
|
||||||
|
|
@ -70,15 +84,12 @@ public class DataService {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
ShopUserDuty shopUserDuty=shopUserDutyMapper.selectByPrimaryKey(id);
|
|
||||||
// ShopUserDuty shopUserDuty=shopUserDutyMapper.selectByShopIdAndDay(tbShopInfo.getId(),tradeDay);
|
|
||||||
MsgException.checkNull(shopUserDuty,"交班信息不存在");
|
|
||||||
|
|
||||||
|
|
||||||
TbPlussShopStaff shopStaff= tbPlussShopStaffMapper.selectByPrimaryKey(Integer.valueOf(info.get("staffId").toString()));
|
TbPlussShopStaff shopStaff= tbPlussShopStaffMapper.selectByPrimaryKey(Integer.valueOf(info.get("staffId").toString()));
|
||||||
MsgException.checkNull(shopStaff,"员工信息不存在");
|
MsgException.checkNull(shopStaff,"员工信息不存在");
|
||||||
|
|
||||||
|
ShopUserDuty shopUserDuty=shopUserDutyMapper.selectByPrimaryKey(id);
|
||||||
|
|
||||||
|
if(ObjectUtil.isNotNull(shopUserDuty)&&ObjectUtil.isNotEmpty(shopUserDuty)){
|
||||||
List<HandoverInfo.PayInfo> list=null;
|
List<HandoverInfo.PayInfo> list=null;
|
||||||
List<HandoverInfo.MemberData> memberData=null;
|
List<HandoverInfo.MemberData> memberData=null;
|
||||||
List<HandoverInfo.ProductCategory> productCategories=null;
|
List<HandoverInfo.ProductCategory> productCategories=null;
|
||||||
|
|
@ -123,8 +134,24 @@ public class DataService {
|
||||||
productInfoPOS,productInfos
|
productInfoPOS,productInfos
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
return Result.success(CodeEnum.SUCCESS,handoverInfo);
|
return Result.success(CodeEnum.SUCCESS,handoverInfo);
|
||||||
|
}else{
|
||||||
|
HandoverInfo handoverInfo=new HandoverInfo(tbShopInfo.getShopName(),
|
||||||
|
ObjectUtil.isNotEmpty(tbToken.getCreateTime())? DateUtils.getTime(tbToken.getCreateTime()):null,
|
||||||
|
DateUtils.getTime(new Date()),
|
||||||
|
ObjectUtil.isNull(shopStaff.getName())?"":shopStaff.getName(),
|
||||||
|
null,null,"0",
|
||||||
|
"0",
|
||||||
|
"0",
|
||||||
|
"0",
|
||||||
|
"0",
|
||||||
|
"0",
|
||||||
|
null,"0",
|
||||||
|
null,null
|
||||||
|
|
||||||
|
);
|
||||||
|
return Result.success(CodeEnum.SUCCESS,handoverInfo);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue